Book Image

Linux Service Management Made Easy with systemd

4 (1)
Book Image

Linux Service Management Made Easy with systemd

4 (1)

Overview of this book

Linux Service Management Made Easy with systemd will provide you with an in-depth understanding of systemd, so that you can set up your servers securely and efficiently.This is a comprehensive guide for Linux administrators that will help you get the best of systemd, starting with an explanation of the fundamentals of systemd management.You’ll also learn how to edit and create your own systemd units, which will be particularly helpful if you need to create custom services or timers and add features or security to an existing service. Next, you'll find out how to analyze and fix boot-up challenges and set system parameters. An overview of cgroups that'll help you control system resource usage for both processes and users will also be covered, alongside a practical demonstration on how cgroups are structured, spotting the differences between cgroups Version 1 and 2, and how to set resource limits on both. Finally, you'll learn about the systemd way of performing time-keeping, networking, logging, and login management. You'll discover how to configure servers accurately and gather system information to analyze system security and performance. By the end of this Linux book, you’ll be able to efficiently manage all aspects of a server running the systemd init system.
Table of Contents (23 chapters)
1
Section 1: Using systemd
12
Section 2: Understanding cgroups
16
Section 3: Logging, Timekeeping, Networking, and Booting

Understanding loginctl

Another bit of good news is that loginctl works identically on both Ubuntu and Alma. You can use it to keep an eye on what other users are doing, change certain settings for a user's login environment, or even as a security tool to get rid of malicious users.

Note

For this section, we'll continue with the Ubuntu Server machine. Create user accounts for Pogo, Vicky, and Frank, if you haven't already done so. Log yourself in from the local terminal, and again from a remote terminal. Do Ctrl-Alt-F2 on the virtual machine to get to the second virtual terminal, and have Vicky log in there. Then, have Pogo and Frank log in from their own remote terminals.

Before we get into the real meat of the matter, we need to define a couple of terms:

  • session: A session gets created whenever a user logs into the system. Each session is assigned a decimal number as its ID.
  • seat: A seat consists of all of the hardware that is assigned to a specific...