Home Programming Linux Essentials - Second Edition

Linux Essentials - Second Edition

By Christine Bresnahan , Richard Blum
books-svg-icon Book
What do you get with a Packt Subscription?
This book & 7000+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook + Subscription?
Download this book in EPUB and PDF formats, plus a monthly download credit
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook?
Download this book in EPUB and PDF formats
Access this title in our online reader
DRM FREE - Read whenever, wherever and however you want
Online reader with customised display settings for better reading experience
What do you get with video?
Download this video in MP4 format
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with video?
Stream this video
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with Audiobook?
Download a zip folder consisting of audio files (in MP3 Format) along with supplementary PDF
What do you get with Exam Trainer?
Flashcards, Mock exams, Exam Tips, Practice Questions
Access these resources with our interactive certification platform
Mobile compatible-Practice whenever, wherever, however you want
What do you get with a Packt Subscription?
This book & 7000+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook + Subscription?
Download this book in EPUB and PDF formats, plus a monthly download credit
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook?
Download this book in EPUB and PDF formats
Access this title in our online reader
DRM FREE - Read whenever, wherever and however you want
Online reader with customised display settings for better reading experience
What do you get with video?
Download this video in MP4 format
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with video?
Stream this video
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with Audiobook?
Download a zip folder consisting of audio files (in MP3 Format) along with supplementary PDF
What do you get with Exam Trainer?
Flashcards, Mock exams, Exam Tips, Practice Questions
Access these resources with our interactive certification platform
Mobile compatible-Practice whenever, wherever, however you want
  1. Free Chapter
    INTRODUCTION
About this book
Linux Essentials, Second Edition provides a solid foundation of knowledge for anyone considering a career in information technology, for anyone new to the Linux operating system, and for anyone who is preparing to sit for the Linux Essentials Exam. Through this engaging resource, you can access key information in a learning-by-doing style. Hands-on tutorials and end-of-chapter exercises and review questions lead you in both learning and applying new information—information that will help you achieve your goals! With the experience provided in this compelling reference, you can sit down for the Linux Essentials Exam with confidence. An open-source operating system, Linux is a UNIX-based platform that is freely updated by developers. The nature of its development means that Linux is a low-cost and secure alternative to other operating systems, and is used in many different IT environments. Passing the Linux Essentials Exam prepares you to apply your knowledge regarding this operating system within the workforce.
Publication date:
September 2015
Publisher
Packt
Pages
368
ISBN
9781119092063

 

INTRODUCTION

This book you hold in your hands provides a solid introduction to the Linux operating system. As its title suggests, it will give you the essential knowledge to begin using and managing this powerful operating system (OS), which is an important one in today’s computing world.

The following pages explain why you should care about Linux, describe the purpose of the Linux Professional Institute’s Linux Essentials certification, offer advice on who should buy this book, detail how the book is organized, and explain some of the typographical and organizational elements within the book’s chapters.

 

What Is Linux?

Linux is a clone of the Unix OS, which has been popular in academic and business environments for years. Linux consists of a kernel, which is the core control software, and many libraries and utilities that rely on the kernel to provide features with which users interact. The OS is available in many distributions, which are collections of a specific kernel with specific support programs. Popular Linux distributions include Arch, CentOS, Debian, Fedora, Gentoo, Mandriva, openSUSE, Red Hat, Slackware, SUSE Enterprise, and Ubuntu, but there are hundreds—if not thousands—of other Linux distributions. This book focuses on tools and techniques that are used in most, if not all, distributions, although from time to time it demonstrates some distribution-specific tools.

Linux has several characteristics that make it worth learning and using:

  • Linux is open source software: the files used to create the working programs that make up Linux are freely available and may be modified and redistributed. If you dislike something about the way Linux works, you can change it yourself! (You may need modest-to-considerable programming skills to do so, however.)
  • Linux is available free of charge. Although some distributions require payment, most can be downloaded from the Internet and used without paying a cent. This is a great boon for students, businesses on a shoestring budget, or anybody wanting to save money. Those who want to pay for greater support can do so by hiring consultants or by purchasing service contracts.
  • As a clone of the older Unix OS, Linux has inherited a great deal of Unix software, including many important Internet server programs, databases, programming languages, and more.
  • Linux is highly scalable—it runs on everything from mobile devices to supercomputers. The Linux versions described in the greatest detail in this book run on a more limited range of hardware, but they can run on systems that are several years old or on the very latest hardware. Linux can make good use of systems that are too old for the latest version of Windows or Mac OS X.
  • Many businesses and nonprofit organizations rely on Linux. Although desktop systems still usually run Windows, Linux is often used to run the organizations’ websites, route their Internet traffic, and do other critical behind-the-scenes tasks. In some cases, Linux is used as the desktop OS too. Thus learning Linux will help your employment prospects.

You can install Linux on almost any system on which you normally run Windows or Mac OS X. You can install Linux by itself or side by side with another OS, so you can learn Linux without losing your ability to get work done in your regular OS.

 

What Is the Linux Essentials Certification?

The Linux Professional Institute, or LPI (www.lpi.org), offers a series of Linux certifications. These certifications aim to provide proof of skill levels for employers; if you’ve passed a particular certification, you should be competent to perform certain tasks on Linux computers. The LPI exams include Linux Essentials, LPIC-1, LPIC-2, and LPIC-3. As the name implies, the Linux Essentials exam is the lowest level of the four exams, covering the most basic tasks of using and administering a Linux computer. Its specific objectives can be found at http://wiki.lpi.org/wiki/LinuxEssentials. This book covers all of these topics, although not in the exact order in which they appear on the LPI website.

 

Who Should Read This Book?

You may have been assigned this book for a class that you’re taking, but if not, it can still have value for self-study or as a supplement to other resources. If you’re new to Linux, this book covers the material that you will need to learn the OS from the beginning. You can pick up this book and learn from it even if you’ve never used Linux before. If you’re already familiar with Linux, you’ll have a leg up on many of the topics described in these pages.

This book is written with the assumption that you know at least a little about computers generally, such as how to use a keyboard, how to insert a disc into an optical drive, and so on. Chances are that you have used computers in a substantial way in the past—perhaps even Linux, as an ordinary user—or maybe you have used Windows or Mac OS X. We do not assume that you have knowledge of Linux system administration.

System Requirements

As a practical matter, you’ll need a Linux system on which to practice and learn in a hands-on way. You can install Linux in several ways:

  • Alone as the only OS on the computer
  • Side by side with another OS
  • In an emulated computer environment provided by a virtualization program such as VMware (www.vmware.com) or VirtualBox (www.virtualbox.org)

If you’re taking a course on Linux, you may be able to use Linux in a lab environment. However, if you’re using this book in a self-study manner, you should plan to install Linux yourself. Although you can learn something just by reading this book, no amount of reading can substitute for hands-on experience with Linux!

You can use any popular Linux distribution with this book, although if you’re new to Linux, you’ll probably be happiest with one of the more user-friendly distributions, such as CentOS, Fedora, openSUSE, or Ubuntu. This book does not include instructions for how to install Linux; you should consult distribution-specific documentation to help with this task.

To install Linux and use all of its GUI tools, your computer should meet the following requirements:

CPU 400 MHz Pentium Pro or better

Minimum RAM 640 MiB

Recommended RAM At least 1,152 MiB

Hard Disk Space At least 9 GiB in unpartitioned space

Some distributions can work on less-powerful computers than these, and others may require better hardware to take full advantage of all of their features. Consult your distribution’s documentation to fine-tune these requirements.

 

How This Book Is Organized

This book consists of 15 chapters plus this introduction. The chapters are organized as follows:

Chapter 1: Selecting an Operating System This chapter provides a birds-eye view of the world of operating systems. The chapter will help you understand exactly what Linux is and the situations in which you might want to use it.

Chapter 2: Understanding Software Licensing This chapter describes copyright law and the licenses that both Linux and non-Linux OSs use to expand or restrict users’ rights to use and copy software.

Chapter 3: Investigating Linux’s Principles and Philosophy This chapter covers Linux’s history and the ways in which Linux, and other OSs, are commonly used.

Chapter 4: Using Common Linux Programs This chapter covers the major categories of Linux software, and it provides pointers to some of the most popular Linux programs.

Chapter 5: Managing Hardware This chapter provides advice on how to select and use hardware in Linux. Specific topics range from the central processing unit (CPU) to device drivers.

Chapter 6: Getting to Know the Command Line This chapter tackles using typed commands to control Linux. Although many new users find this topic intimidating, command-line control of Linux is important.

Chapter 7: Managing Files This chapter describes how to move, rename, delete, and edit files. Directories are just a special type of file, so they are covered here as well.

Chapter 8: Searching, Extracting, and Archiving Data This chapter summarizes the tools that you can use to find data on your computer, as well as how you can manipulate data archive files for data transport and backup purposes.

Chapter 9: Exploring Processes and Process Data This chapter describes how to install programs in Linux and how to adjust the priority of running programs or terminate selected programs.

Chapter 10: Editing Files This chapter introduces the topic of editing text files. This includes the basic features of the pico, nano, and vi text-mode text editors, as well as some common configuration file and formatted text file conventions.

Chapter 11: Creating Scripts This chapter describes how to create simple scripts, which are programs that can run other programs. You can use scripts to help automate otherwise tedious manual tasks, thus improving your productivity.

Chapter 12: Understanding Basic Security This chapter introduces the concepts that are critical to understanding Linux’s multiuser nature. It also covers the root account, which Linux uses for most administrative tasks.

Chapter 13: Creating Users and Groups This chapter covers the software and procedures you use to create, modify, and delete accounts and groups, which define who may use the computer.

Chapter 14: Setting Ownership and Permissions This chapter describes how to control which users may access files and in what ways they may do so. In conjunction with users and groups, ownership and permissions control your computer’s security.

Chapter 15: Managing Network Connections This chapter covers the critical topic of telling Linux how to use a network, including testing the connection and some basic network security measures.

Broadly speaking, the chapters are arranged in order of increasing complexity in terms of the tasks and systems described. The book begins with background information on Linux and the philosophies that drive its development. Subsequent chapters describe basic user tasks, such as moving files around. The book concludes with the tasks that are of most interest to system administrators, such as account management and network configuration.

Each chapter begins with a list of the topics covered in that chapter. At the end of each chapter, you’ll find a few elements that summarize the material and encourage you to go further:

The Essentials and Beyond This is a one-paragraph summary of the material covered in the chapter. If something sounds unfamiliar when you read it, go back and review the relevant section of the chapter!

Suggested Exercises Each chapter includes two to four exercises that you should perform to give yourself more hands-on experience with Linux. These exercises do not necessarily have “correct” answers; instead, they’re intended to promote exploration and discovery of your own computer and of Linux.

Review Questions Each chapter concludes with a series of 10 review questions, in multiple-choice, true/false, or fill-in-the-blank format. (Answers to review questions appear in Appendix A.) These questions can help you test your knowledge and prepare you for the Linux Essentials exam. Note, however, that these questions are not taken from LPI’s exam. You should not memorize the answers to these questions and assume that doing so will enable you to pass the exam. Instead, study the text of the book and use Linux.

To get the most out of this book, you should read each chapter from start to finish, perform the suggested exercises, and answer the review questions. Even if you’re already familiar with a topic, you should skim the chapter; Linux is complex enough that there are often multiple ways to accomplish a task; you may learn something even if you’re already competent in a given area.

 

Conventions Used in This Book

This book uses certain typographic styles in order to help you quickly identify important information and to avoid confusion over the meaning of words such as onscreen prompts. In particular, look for the following styles:

  • Italicized text indicates key terms that are described or defined for the first time in a chapter. (Italics are also used for emphasis.)
  • A monospaced font indicates the contents of configuration files, messages displayed at a text-mode Linux shell prompt, filenames, text-mode command names, and Internet URLs.
  • Italicized monospaced text indicates a variable—information that differs from one system or command run to another, such as the name of a client computer or the name of a user’s data file.
  • Bold monospaced text is information that you’re to type into the computer, usually at a Linux shell prompt. This text can also be italicized to indicate that you should substitute an appropriate value for your system. When isolated on their own lines, commands are preceded by nonbold monospaced $ or # command prompts, denoting regular user or system administrator use, respectively.

In addition to these text conventions, which can apply to individual words or to entire paragraphs, a few conventions highlight segments of text.

A margin note identifies additional information that may be relevant to the principal point of the accompanying paragraph, but that isn’t critical to its basic understanding. This could be a cross-reference to information in another chapter, an interesting but noncritical minor fact, or a warning about a rare pitfall of a procedure.


Many chapters of this book describe both GUI and text-mode methods of accomplishing tasks. Because you’re likely to be more familiar with GUI tools, most chapters begin with them; however, in most cases, Linux’s text-mode tools are more powerful. Furthermore, the Linux Essentials certification covers mainly text-mode tools. Therefore, be sure to learn the text-mode tools. As you gain proficiency with Linux, you’re likely to find yourself using the text-mode tools more often than the GUI tools because of the added flexibility that the text-mode tools provide. Furthermore, the GUI tools tend to vary a lot between distributions, whereas the text-mode tools vary much less.

About the Authors
  • Christine Bresnahan

    Christine Bresnahan has worked in the IT industry for more than 30 years and is currently an adjunct professor of Python programming and Linux system administration classes at Ivy Tech Community College in Indianapolis. She is the co-author of Linux Bible, Eighth Edition, and Linux Command Line and Shell Scripting Bible.

    Browse publications by this author
  • Richard Blum

    Richard Blum has more than 25 years as a network and systems administrator, currently managing Microsoft, Unix, Linux, and Novell servers for a network with more than 3,500 users. He has developed online programming and Linux courses that he teaches to students worldwide.

    Browse publications by this author