Book Image

Mastering Linux Administration

By : Alexandru Calcatinge, Julian Balog
Book Image

Mastering Linux Administration

By: Alexandru Calcatinge, Julian Balog

Overview of this book

Linux plays a significant role in modern data center management and provides great versatility in deploying and managing your workloads on-premises and in the cloud. This book covers the important topics you need to know about for your everyday Linux administration tasks. The book starts by helping you understand the Linux command line and how to work with files, packages, and filesystems. You'll then begin administering network services and hardening security, and learn about cloud computing, containers, and orchestration. Once you've learned how to work with the command line, you'll explore the essential Linux commands for managing users, processes, and daemons and discover how to secure your Linux environment using application security frameworks and firewall managers. As you advance through the chapters, you'll work with containers, hypervisors, virtual machines, Ansible, and Kubernetes. You'll also learn how to deploy Linux to the cloud using AWS and Azure. By the end of this Linux book, you'll be well-versed with Linux and have mastered everyday administrative tasks using workflows spanning from on-premises to the cloud. If you also find yourself adopting DevOps practices in the process, we'll consider our mission accomplished.
Table of Contents (20 chapters)
1
Section 1: Linux Basic Administration
7
Section 2: Advanced Linux Server Administration
13
Section 3: Cloud Administration

Working with processes

This section serves as a practical guide to managing processes via resourceful command-line utilities that are used in everyday Linux administration tasks. Some of these tools have already been mentioned in previous sections (for example, ps and top), when we covered specific process internals. Here, we will summon most of the knowledge we've gathered so far and take it for a real-world spin by covering some hands-on examples.

Let's start with the ps command – the Linux process explorer.

The ps command

We described the ps command and its syntax in the Anatomy of a process section. The following command displays a selection of the current processes running in the system:

ps -e | head

The -e option (or -A) selects all the processes in the system. The head pipe invocation displays only the first few lines (10 by default):

Figure 5.10 – Displaying the first few processes

Figure 5.10 – Displaying the first few processes

The preceding information...