Everyday Guidebooks
Cover of Linux Administration

Cybersecurity & IT

Linux Administration: Accounts, Updates, and Recovery

A Practical Routine for Users, Services, Backups, and System Health

by Todd Michael

Available now

Linux administration is more than memorizing commands. It means knowing what to check, what to change, and how to recover when a change goes wrong.

This hands-on guide helps you build a repeatable routine for managing a Linux system with confidence. Follow worked examples for creating and maintaining user accounts, checking services, reviewing system health, planning updates, and protecting important files. Then take the essential next step: restore a backup in a safe test environment and verify the results.

You’ll learn how to document maintenance, recognize warning signs, troubleshoot common service and access problems, and prepare a practical recovery plan. Exercises use a disposable lab system so you can practice before touching a production machine. Distribution differences are explained where they matter.

Whether you’re preparing for an IT certification or developing on-the-job skills, this book gives you a useful framework for everyday Linux administration.

Contents
  1. 1. Build a Safe Administration Lab
  2. Lab baseline
  3. 2. Read the System Before You Change It
  4. 3. Create and Maintain User Accounts
  5. 4. Control Access with Groups and Permissions
  6. Read the Permission Display
  7. Use Groups to Express Shared Work
  8. Build a Shared Directory
  9. Change Permissions Without Guessing
  10. Diagnose an Access Failure
  11. Delegate One Privileged Task
  12. Close the Loop
  13. 5. Understand Services and System Startup
  14. 6. Investigate Logs and Service Problems
  15. 7. Plan and Apply Software Updates
  16. 8. Monitor Storage, Memory, and Processes
  17. 9. Design a Backup You Can Use
  18. 10. Create and Inspect Backups
  19. 11. Restore, Compare, and Verify
  20. 12. Recover from Common Administration Mistakes
  21. 13. Build a Repeatable Maintenance Schedule
  22. 14. Capstone: Maintain and Recover a Lab System
  23. Other Books by Todd Michael

Read a sample: 1. Build a Safe Administration Lab

A good Linux administrator learns to make changes deliberately, verify their effects, and recover when a change does not work. The best place to begin practicing that routine is not a production server or your everyday workstation. It is a small virtual machine that you can inspect, alter, and, when necessary, return to a known state.

In this chapter, you will build a disposable Linux lab, identify the operating system inside it, establish a baseline snapshot, and practice using administrative privileges for a narrowly defined task. You will also start a lab journal. The journal and the baseline will give the exercises throughout this book a starting point: before changing accounts, services, packages, or backups, you will have somewhere to record what you expected and what actually happened.

A virtual machine reduces the consequences of many mistakes, but it is not a license to ignore the surrounding environment. The VM shares a physical computer and may have network access, shared folders, or attached storage. Keep the lab separated from important files, use test credentials, and check which machine is receiving each command.

You need a computer with enough available memory and storage to run a Linux guest alongside its existing operating system, plus virtualization software that supports snapshots. Common choices include VirtualBox, VMware products, and a Linux host using a suitable virtual machine manager. The exact setup screens vary, so use the instructions for your chosen product when a menu name differs from the description here.

For the examples in this book, a current, supported release of a mainstream Linux distribution is a sensible choice. Debian or Ubuntu makes a convenient first lab, as does a Red Hat–family distribution such as Fedora. Commands and package names can differ between families, and later chapters will call out important differences. What matters now is that you know which system you installed and can sign in to a terminal.

A minimal server installation is sufficient, although a desktop installation is also fine if you prefer a graphical interface. A practical starting configuration is:

- Two virtual CPUs, if your host can spare them. - A few gigabytes of memory, adjusted to the distribution’s requirements and your host’s capacity. - A virtual disk large enough for the operating system, updates, and practice files; 25 GB is a reasonable starting point. - One network adapter using the virtualization software’s NAT mode, if available.

These are starting choices, not universal requirements. Leave enough resources for the host to remain responsive. A dynamically allocated virtual disk may initially use less host storage than its configured maximum, but it can grow as the guest writes data. Confirm that the host has room for the disk and for snapshots.

NAT usually lets the guest reach external networks without making it directly accessible like another machine on the local network. It is not a complete security boundary, and behavior depends on the virtualization software and any forwarding rules you configure. For this initial lab, avoid bridged networking, port forwarding, shared folders, and removable-device passthrough unless you understand why you need them. You can add capabilities later as an explicit exercise.

Download an installation image from the distribution’s official source. Follow that source’s verification instructions when available; checking an image before installation helps you catch an incomplete or unexpected download. Create a new VM in your virtualization application and attach the downloaded image as its installation media.

Give the VM an unmistakable name such as linux-admin-lab. A distinctive name helps prevent an administrative command or snapshot operation from being applied to the wrong machine. Select the guest type that most closely matches your distribution, allocate the resources you chose, and create a new virtual disk. Do not attach a disk containing files you need.

Start the VM and work through the installer. Create an ordinary user for routine work; the examples in this chapter use labuser. Choose a password you can remember for the lab, but do not reuse a password that protects a real account. If the installer offers to enable remote access, you can leave it disabled for now and work through the VM console.

Some distributions ask you to set a root password; others guide you toward an ordinary account that can use sudo. Installer choices vary, so note what you selected. You need a documented way to perform administrative tasks inside the guest. If your account is not granted administrative access during installation, consult your distribution’s installation guidance rather than guessing at permissions.

When installation finishes, detach the installation image if necessary and reboot into the installed system. Sign in as your ordinary user. Open a terminal and verify that commands are running inside the guest, not in a terminal on the host:

bash whoami hostname pwd

The first command should show your guest username, and the other two give you useful context about the machine and current directory. Their exact output will depend on your installation. If the results are unfamiliar, pause and confirm which window has keyboard focus.

It is worth making the terminal visually distinct from any host terminal. A different window title, color scheme, or desktop background can provide a useful reminder. It is not a substitute for checking the system identity before a consequential command, but it can help prevent an ordinary moment of distraction from becoming a host-side mistake.

Linux distributions share many tools, but they do not all arrange software,…

More Cybersecurity & IT

Cover of The White Hat Bible, Volume 1The White Hat Bible, Volume 1Available nowCover of The White Hat Bible, Volume 2The White Hat Bible, Volume 2Available nowCover of The White Hat Bible, Volume 3The White Hat Bible, Volume 3Available nowCover of The White Hat Bible, Volume 4The White Hat Bible, Volume 4Available nowThe White Hat Bible, Volume 5Available nowCover of The White Hat Pocket GuideThe White Hat Pocket GuideAvailable now

About Todd Michael

Todd Michael is an American author and the founder of ToddMichael.tv. He writes practical, plain-English books on money, health, preparedness, technology, games, humor and more.

About the author Todd Michael · Todd Michael’s author site

Part of the ToddMichael.tv network.