Skip to main content
main-content

Über dieses Buch

This is Linux for those of us who don’t mind typing. All Linux users and administrators tend to like the flexibility and speed of Linux administration from the command line in byte–sized chunks, instead of fairly standard graphical user interfaces. Beginning the Linux Command Line is verified against all of the most important Linux distributions, and follows a task–oriented approach which is distribution agnostic. Now this Second Edition of Beginning the Linux Command Line updates to the very latest versions of the Linux Operating System, including the new Btrfs file system and its management, and systemd boot procedure and firewall management with firewalld!

Updated to the latest versions of LinuxWork with files and directories, including Btrfs!Administer users and security, and deploy firewalldUnderstand how Linux is organized, to think Linux!

Inhaltsverzeichnis

Frontmatter

Chapter 1. Starting Linux Command-Line Administration

Abstract
To unleash the full power of Linux, as a Linux administrator you will spend most of your time typing commands on the Linux command line, the so-called shell prompt. For someone who is new to the command line, the things that advanced users do there may look like magic. In this chapter, you’ll learn about the following topics:
Sander van Vugt

Chapter 2. Performing Essential Command‑Line tasks

Abstract
At this point, you know the basics to get around. One very important topic that you’ve learned in Chapter 1 is how to get help. Now it’s time to expand your command-line skills by exploring some essential Linux commands. In this chapter, you’ll learn about the following topics:
Sander van Vugt

Chapter 3. Administering the Linux File System

Abstract
In Chapter 2, you’ve read about some of the basic tasks that you may want to accomplish when working with a Linux system. In this chapter, you’ll read about some of the more advanced tasks. Typically, these are tasks that you would use to administer and tune your Linux computer. First, you’ll learn how to mount devices on your computer and how to make sure that devices are mounted automatically when booting. Next, you’ll read how to create backups of files and directories with the tar utility, and of complete devices using dd. At the end of this chapter, you’ll discover the benefits of working with links.
Sander van Vugt

Chapter 4. Working with Text Files

Abstract
An important part of working on the Linux command line consists of working with text files. If you need to configure services, they’ll store their configuration in text files. If you need to write program code, you’ll do that in a text file as well. Linux text files are all over your computer, and to be good at the Linux command line, you’ll have to know how to handle them. In this chapter, you’ll learn how to work with text files. Different methods are discussed for manipulating the contents of them. First, you’ll learn about the only editor that matters on Linux, Vi. Next, I’ll explain different ways of displaying the contents of text files. After that, we’ll talk about some useful utilities that help you in sorting and comparing the contents of different text files—and more. You’ll then learn how regular expressions can help you in finding text patterns in a file in a clever way. You’ll also read how the programmable filters sed and awk can help you batch-manipulate text files. At the end of this chapter, you’ll also get familiar with some of the most useful commands in command-line printing.
Sander van Vugt

Chapter 5. Managing Partitions and Logical Volumes

Abstract
To work with files, you need to store them. In most situations, you’ll need to create a logical storage unit before you do so. Creating such a storage unit makes it easier to configure your hard drive in a flexible way. In Linux, you can choose between two of those logical storage units: partitions and logical volumes. Choose partitions if you want to work easily and you don’t have very specific needs for what you do with your hard drive. If, however, you need maximal flexibility and easy resizing, working with logical volumes is a better solution. In this chapter, you’ll read how to create partitions as well as logical volumes, how to make a file system on them, and how to manage that file system.
Sander van Vugt

Chapter 6. Managing Users and Groups

Abstract
This chapter is about the user environment. You will learn how to set up a user account, which is an important task, even if you are not a computer administrator. You will also learn about the way authentication is handled using the PAM (pluggable authentication module) and nsswitch systems, as well as explore the configuration files that contain the definition of the working environment for your users. For instance, you will see how to provide a user with default settings by using the /etc/profile file and all related files. Also, you will get a look at the sudo mechanism, which allows you to perform administration tasks without needing to log in as root.
Sander van Vugt

Chapter 7. Managing Permissions

Abstract
On a Linux system, permissions are used to secure access. In this chapter, you’ll learn how to modify ownership to accommodate permissions. To begin with, the basic read, write, and execute permissions are covered. Next, you’ll learn how to apply advanced Linux permissions for some extra security. Finally, at the end of this chapter you’ll learn how to create Access Control Lists to give permissions to more than one user or group and how to work with attributes to add an extra layer of protection to files.
Sander van Vugt

Chapter 8. Managing Software

Abstract
By default, your Linux distribution will come with lots of software packages. Even if lots of packages are available by default, you will encounter soon enough a situation where you need to install new packages. In this chapter, you’ll learn how to do this. First, I’ll tell you about the different ways that software management is handled on Linux. Next, you’ll read about how to work with RPM-based packages. Then you’ll learn how to install packages that are delivered in the .deb format. You’ll also learn about software and package management tools such as yum, apt-get, and zypper; tracking and finding software packages; and managing updates and patches.
Sander van Vugt

Chapter 9. Process and System Management

Abstract
When working with Linux, from an administrative perspective, working with processes is important. Every application or task you start on a Linux computer is started as a process. You will find that in some instances, a task may hang, or something else may happen that urges you to do some process management. In this chapter, you will learn how to monitor and manage processes. You will also learn how to schedule processes for automatic startup.
Sander van Vugt

Chapter 10. System Logging

Abstract
Most of the time, your Linux computer will work just fine. From time to time, however, your program won’t start, or system components will break. When this is the case, you’ll need all the help that you can get. Assuming that you’ve already used the available command documentation that is on your computer, such as man and -help, you’ll need to find out now what exactly is happening when you try to accomplish your task. That brings us to system logging.
Sander van Vugt

Chapter 11. Configuring the Network

Abstract
Most Linux computers operate in a connected world. Therefore, configuring the network board is of highest importance. In this chapter, you’ll first learn how to give your computer an IP address and related information. You’ll also learn about some useful tools that will help you in analyzing and troubleshooting a failing network connection. The last part of this chapter is about Secure Shell (SSH), which helps you make secured connections to other computers.
Sander van Vugt

Chapter 12. Configuring a File Server

Abstract
Avery common task that people use Linux for is to configure it as a file server. With regard to this task, Linux is very versatile; it offers support for all common protocols. In this chapter, you’ll learn how to configure Linux as a file server using either Samba or NFS.
Sander van Vugt

Chapter 13. Working with the Kernel

Abstract
The heart of your computer is the kernel. This kernel works with specific parameters and modules, and as a Linux user you need to have at least a minimal knowledge about them. In this chapter, you’ll learn how to perform basic kernel management tasks and how to change parameters for your kernel. You’ll also learn how to configure GRUB to load your kernel.
Sander van Vugt

Chapter 14. Introduction to Bash Shell Scripting

Abstract
Once you really get to be at ease working on the command line, you’ll want to do more than what the previous chapters have taught you. You’ve already learned how to combine commands using piping, but if you really want to get the best out of your commands, there is much more you can do. In this chapter, you’ll get an introduction to the possibilities of Bash shell scripting, which really is the command line on steroids; piping and redirection just is not enough if you need to do really complex tasks. As soon as you really understand shell scripting, you’ll be able to automate many tasks, and thus do your work at least twice as fast as you used to do it.
Sander van Vugt

Appendix A. Installing Linux

Abstract
In this appendix you’ll learn how to install Linux. We’re covering two popular distributions. You’ll first learn how to install CentOS; next you’ll read how to install the Ubuntu Server 14.04 LTS release on your computer.
Sander van Vugt

Backmatter

Weitere Informationen

Premium Partner

    Bildnachweise