Using and Administering Linux – Zero to SysAdmin: 2nd Edition

4

Last Updated on January 3, 2024 by David Both

This Linux training course, “Using and Administering Linux – Zero to SysAdmin,” is significantly different from other courses. It consists of three volumes. Each of these three volumes is closely connected and they build upon each other. 

This Linux training course differs from others because it is a complete self-study course. You should start at the beginning of Volume 1 and read the text, perform all of the experiments, and do all of the chapter exercises through to the end of Volume 3. If you do this, even if you are starting from zero knowledge about Linux, you can learn the tasks necessary to becoming a Linux system administrator, a SysAdmin.

Another difference this course has over others is that all of the experiments are performed on one or more virtual machines (VMs) in a virtual network. Using the free software, VirtualBox, you will create this virtual environment on any reasonably sized host, whether Linux or Windows. In this virtual environment you are free to experiment on your own, make mistakes that could damage the Linux installation of a hardware host, and still be able to recover completely by restoring the Linux VM host from any one of multiple snapshots. This flexibility to take risks and yet recover easily makes it possible to learn more than would otherwise be possible.

In this course we will dive deep into Linux system administration almost from the very beginning. You will learn many of the Linux tools required to use and administer Linux workstations and servers – usually multiple tools that can be applied to each of these tasks. This course contains many experiments to provide you with the kind of hands-on experiences that SysAdmins appreciate. All of these experiments guide you one step at a time into the elegant and beautiful depths of the Linux experience. You will learn that Linux is simple and that simplicity is what makes it both elegant and knowable.

Based on my own years working with Unix and Linux, the course materials contained in these three volumes are designed to introduce you to the practical, daily tasks you will perform as a Linux user and, at the same time, as a Linux system administrator – SysAdmin. 

What this course is not

This course is not a certification study guide. It is not designed to help you pass a certification test of any type. This course is intended purely to help you become a good or perhaps even great SysAdmin, not to pass a test.

There are a few good certification tests. Red Hat and Cisco certifications are among the best because they are based on the test-taker’s ability to perform specific tasks. I am not familiar with any of the other certification tests because I have not taken them. But the courses you can take and books you can purchase to help you pass those tests are designed to help you pass the tests and not to administer a Linux host or network. That does not make them bad – just different from this course.

Content overview

This quick overview of the contents of each volume should serve as a quick orientation guide if you need to locate specific information. If you are trying to decide whether to purchase this book and its companion volumes, it will give you a good overview of the entire course.

Using and Administering Linux: Volume 1 – Zero to SysAdmin: Getting Started

Volume 1 of this series is now available in electronic and softcopy versions. At Apress and Amazon.

Chapters 1 through 3 of Volume 1 introduces operating systems in general and Linux in particular. briefly explore the The Linux Philosophy for SysAdmins1 in preparation for the rest of the course.

Chapter 4 then guides you through the use of VirtualBox to create a virtual machine (VM) and  a virtual network to use as a test laboratory for performing the many experiments that are used throughout the course. In Chapter 5, you will install the Xfce version of Fedora – a popular and powerful Linux distribution – on the VM. Chapter 6 shows you how to use the Xfce desktop which will enable you to leverage your growing command-line interface (CLI) expertise as you proceed through the course.

Chapters 7 and 8 will get you started using the Linux command line and introduce you to some of the basic Linux commands and their capabilities. In Chapter 9 you will learn about data streams and the Linux tools used to manipulate them. And in Chapter 10 you will learn a bit about several text editors which are indispensable to advanced Linux users and system administrators. You will also learn to use the Vim text editor to create and modify the many ASCII plain text files that Linux uses for configuration and administrative programming.

Chapter 11 through 13 start your work as a SysAdmin and take you through some specific tasks such as working as root, and installing software updates and new software. Chapter 14 discusses more terminal emulators and some advanced shell skills. Chapter 15 covers some advanced topics for using Bash ranging from basic commands to command line programming and shell scripts.

Chapter 16 introduces you to using and managing files and directories while covering the intricacies of the two types of links. In Chapter 17 you will learn to configure the Bash shell to meet your personal needs and use patterns.

Finally, chapters 18 and 19 dive into the details of files, directories and links as well as the three meanings of the term “filesystem” and how to work with and manage each.

  1. Introduction
  2. Introduction to Operating Systems
  3. The Linux Philosophy for SysAdmins
  4. Preparation
  5. Installing Linux
  6. Using the Xfce Desktop
  7. Using the Linux Command Line
  8. Linux core utilities
  9. Data Streams
  10. Text Editors
  11. Working as Root
  12. Installing and Updating New Software
  13. Tools For Problem Solving
  14. Terminal Emulator Mania
  15. Advanced Shell Topics
  16. Linux Boot and Startup
  17. Shell Configuration
  18. Files, Directories, and Links
  19. Filesystems

Using and Administering Linux: Volume 2 –  Zero to SysAdmin: Advanced Topics

Volume 2 of this series is now available in electronic and softcopy versions. At Apress and Amazon.

Volume 2 of Using and Administering Linux introduces you to some incredibly powerful and useful advanced topics that every SysAdmin must know.

In Chapters 20 and 21 you will experience an in-depth exploration of logical volume management – and what that even means – as well as the use of file managers to manipulate files and directories. Chapter 22 introduces the concept that, in Linux, everything is a file. You will also learn some fun and interesting uses of the fact that everything is a file.

In Chapter 23 you will learn to use several tools that enable the SysAdmin to manage and monitor running processes. Chapter 24 enables you to experience the power of the special filesystems, such as /proc, which enable us as SysAdmins to monitor and tune the kernel while it is running – without a reboot.

Chapter 25 will introduce you to regular expressions and the power that using them for pattern matching can bring to the command line, while Chapter 26 discusses managing printers and printing from the command line. In Chapter 27 you will use several tools to unlock the secrets of the hardware in which your Linux operating system is running.

Chapters 28 and 29 show you how to do some simple – and not so simple – command line programming and how to automate various administrative tasks. In Chapter 30 you will learn to use Ansible, a powerful tool that makes automating tasks for thousands of computers just as easy as for one. Chapter 31 discusses the tools you will use to perform repetitive and automated tasks at specific times.

You will begin to learn the details of networking in Chapter 32, and Chapter 33 covers use of the powerful NetworkManager tool.

Chapter 34 introduces the BTRFS file system and covers its very interesting features. This chapter also informs you why BTRFS is not an appropriate choice for a filesystem in most use cases.

Chapters 35 through 37 allow you to explore systemd, the modern tool for starting Linux at boot time and which is also used to manage system services and tools.Chapter 38  discusses Dbus and UDEV and how Linux uses them to treat all devices as plug and play.

Chapter 40 covers the tasks required to manage users while Chapter 41 introduces you to some basic tasks needed to manage the firewall. You will use the firewalld command line tool to create and manage zones to which the network interfaces will be assigned based on various security needs such as internal and external networks.

  1. Logical Volume Management
  2. File Managers
  3. Everything is a File
  4. Managing Processes
  5. Special Filesystems
  6. Regular Expressions
  7. Printing
  8. Hardware Detection
  9. Command Line Programming
  10. Automation with Bash Scripts
  11. Automation with Ansible
  12. Time and Automation
  13. Networking
  14. NetworkManager
  15. The BTRFS filesystem
  16. systemd – getting started
  17. Advanced systemd functions
  18. systemd Finale
  19. Dbus and Udev
  20. Traditional Logs
  21. Managing Users
  22. Managing the Firewall

Using and Administering Linux: Volume 3 –  Zero to SysAdmin: Network Services

Volume 3 of this series is now available in electronic and softcopy versions. At Apress and Amazon.

In Volume 3 of Using and Administering Linux you will start by creating a new VM on the existing virtual network. This new VM will be used as a server for the rest of this course and it will replace some of the functions performed by the virtual router that is part of our virtual network.

Chapter 42 begins this transformation from simple workstation to server by adding a second network interface card (NIC) to the new VM so that it can act as a firewall and router, then changing its network configuration from DHCP to static IP addressing. This includes configuring both NICs so that one is connected to the existing virtual router so as to allow connections to the outside world, and so that the other NIC connects to the new “inside” network that will contain the existing VM.

Chapter 43 Discusses Name Services (DNS) in detail both from client and server standpoints. You’ll learn to use the /etc/hosts file for simple name resolution, then create a simple caching name server. You will then convert the caching name server into a primary name server for your internal network. 

In Chapter 44 you will convert the new server into a router using kernel parameters and a simple firewall configuration change.

Chapter 45 shows how to use SSHD to provide secure remote access between Linux hosts. It also provides some interesting insights into using commands remotely and creating a simple command line program to back up specific directories of a remote host to the local host. 

Although we have incorporated security in all aspects of what has already been covered, Chapter 46 covers some additional security topics. This includes physical hardening as well as further hardening of the host to provide enhanced protection from network intrusions.

In chapter 47 you will techniques and strategies for creating backups that use easily available open source tools and which are easy to use for both creating backups and restoring complete filesystems or individual files.

You will learn to install and configure an enterprise class email server that can detect and block most spam and malware in Chapters 47 through 50. Chapter 51 takes you through setting up a web server and in Chapter 52 you will set up WordPress, a flexible and powerful content management system.

In Chapter 53 you return to email by setting up a mailing list using MailMan. 

Sometimes accessing a desktop remotely is the only way to do some things so in Chapter 54 you will do just that.

Chapter 55 discusses package management from the other direction by guiding you through the process of creating an RPM package for the distribution of your own scripts and configuration files. Then Chapter 56 guides you through sharing files to both Linux and Windows hosts. 

Finally, Chapter 57 will get you started in the right direction because I know you are going to ask, “Where do I go from here?”

  1. ServerPreparation
  2. Name Services
  3. Routing and Firewalls
  4. Remote Access with SSH
  5. Security
  6. Backup everything –Frequently
  7. Introducing Email
  8. Advanced Email Topics
  9. Combating Spam
  10. Apache Web Server
  11. WordPress
  12. Mailing Lists
  13. Remote Desktop Access
  14. Advanced Package Management
  15. File Sharing
  16. Where Do I Go From Here?

Taking this course

Although designed primarily as a self-study guide, this course can be used effectively in a classroom environment. This course can also be used very effectively as a reference. Many of the original course materials I wrote for Linux training classes I used to teach as an independent trainer and consultant were valuable to me as references. The experiments became models for performing many tasks and later became the basis for automating many of those same tasks. I have used many of those original experiments in parts of this course, because they are still relevant and provide an excellent reference for many of the tasks I still need to do.

You will see as you proceed through the course that it uses many software programs considered to be older and perhaps obsolete like Sendmail, Procmail, BIND, the Apache web server, and much more. Despite their age, or perhaps because of it, the software I have chosen to run my own systems and servers and to use in this course has been well-proven and is all still in widespread use. I believe that the software we will use in these experiments has properties that make it especially valuable in learning the in-depth details of how Linux and those services work. Once you have learned those details, moving to any other software that performs the same tasks will be relatively easy. In any event, none of that “older” software is anywhere near as difficult or obscure as some people seem to think that it is.

Who should take this course

If you want to learn to be an advanced Linux user and even a SysAdmin, this course is for you. Most SysAdmins have an extremely high level of curiosity and a deep seated need to learn Linux system administration. We like to take things apart and put them back together again to learn how they work. We enjoy fixing things and are not hesitant about diving in to fix the computer problems that our friends and co-workers bring us.

We want to know what happens when some computer hardware fails so we might save defective components such as motherboards, RAM memory, and storage devices. This gives us defective components with which we can run tests. As I write this, I have a known defective hard drive inserted in a hard drive docking station connected to my primary workstation, and have been using it to test failure scenarios that will appear in this course.

Most importantly, we do all of this for fun and would continue to do so even if we had no compelling vocational reason for doing so. Our intense curiosity about computer hardware and Linux leads us to collect computers and software like others collect stamps or antiques. Computers are our avocation – our hobby. Some people like boats, sports, travel, coins, stamps, trains, or any of thousands of other things, and they pursue them relentlessly as a hobby. For us – the true SysAdmins – that is what our computers are. That does not mean we are not well-rounded and don’t do other things. I like to travel, read, go to museums and concerts, ride historical trains, and my stamp collection is still there, waiting for me when I decide to take it up again.

In fact, the best SysAdmins, at least the ones I know, are all multifaceted. We are involved in many different things and I think that is due to our inexhaustible curiosity about pretty much everything. So if you have an insatiable curiosity about Linux and want to learn about it – regardless of your past experience or lack thereof – then this course is most definitely for you.

Who should not take this course

If you do not have a strong desire to learn about how to use or administer Linux systems, this course is not for you. If all you want – or need – to do is use a couple apps on a Linux computer that someone has put on your desk, this course is not for you. If you have no curiosity about what superpowers lie behind the GUI desktop, this course is not for you.

Why this course

Someone asked me why I wanted to write this course. My answer is simple – I want to give back to the Linux community. I have had several amazing mentors over the span of my career and they taught me many things – things I find worth sharing with you along with much that I have learned for myself.

This course – all three volumes of it – started its existence as the slide presentations and lab projects for three Linux courses I created and taught. For a number of reasons I do not teach those classes any more. However I would still like to pass on my knowledge and as many of the tips and tricks I have learned for the administration of Linux as possible.  I hope that with this course I can pass on at least some of the guidance and mentoring that I was fortunate enough to have in my own career.

Hardware and system requirements

In order to perform the experiments contained in this course you must have access to a single physical computer that can run a up to three virtual machines. These hardware specifications are intended to provide you with some guidance for selecting a computer for use with this course.

Because the VMs will not be running large complex programs the load on them in terms of CPU and RAM memory will usually be moderate. Disk usage may be somewhat high because virtual disks for the VMs may take up a significant amount of disk space after some of the experiments, and you will also make occasional snapshots of the virtual disk in order to make recovery from otherwise catastrophic failures relatively simple. These hardware specifications should be considered as a minimum for use during this course. More and faster is always better.

The motherboard, Processor, and memory should be 64-bit. Many of the 32-bit versions of Linux are no longer supported. The table below is a list of the minimum physical hardware requirements for this course. Note that these requirements have been upgraded since this course was first written. This table is more recent and accurate than the original that appears in Volume 1 of this course.

ComponentDescription
ProcessorThe Intel i5 or i7, 9th through 13th Generation processors; at least 8 cores plus hyperthreading with support for virtualization; 3.1GHz or higher CPU speed.
MotherboardCapable of supporting the Intel processor you selected above; USB support for a keyboard and mouse; video output that matches the video connector of the display (see below) such as HDMI or DVI.
MemoryAt least 16GB of RAM for your host system. This will allow sufficient memory for multiple VMs and still have enough available for the host itself.
StorageInternal or external storage device (HDD or SSD) with at least 800GB of free space for storage of virtual machine disk drives and snapshots.
NetworkOne Ethernet wired network interface card (NIC) that has support for 1Gb connections. An 802.11n Wireless connection is also acceptable but will slow downloads.
USB Keyboard and mouseSeems obvious but just being thorough.
Video displayAny decent flat screen monitor will do so long as it is at least HD (1080P) resolution.
Internet connectionThe physical host must have an Internet connection with at least 300Mb/s download speeds. A greater download speed of 1Gb/s is highly recommended and will make downloading faster and result in less waiting. Use of a physical CAT5 or CAT6 network cable between the ISP’s router and the physical host is also preferred.

Host Software Requirements

The preferred Linux operating system for the physical host on which all of the experiments will be performed is Fedora 36 or the most recent version of Fedora that is currently available. You will be using Fedora on the virtual machines anyway so this makes the most sense. VirtualBox will be used the virtualization platform for the experiments in this course because it is open source and free of charge.

No other software is required for the physical system that will host the virtual environment.

About Fedora releases

The 1st Edition of this self-study course was originally written for Fedora 29 and we are now up to Fedora 38. As I have worked through the 2nd Edition of this course I have added new materials I thought appropriate and incorporated as many errata corrections as possible.

Where it was necessary, I have also included revised graphics such as screen shots used for illustrative purposes. In many cases the graphics for earlier releases of Fedora are still applicable although the background images and some non-essential visual elements have changed. In those cases I have retained the original graphics.

I have only replaced older graphics with newer ones where necessary to ensure the accuracy and clarity of the illustrated points. Some of the illustrations in this course are from Fedora 29. If you are using later releases of Fedora, such as Fedora 37, 38, or later, the background and other cosmetic elements may be different from Fedora 29.