System administration encompasses the management of users, permissions, services, logs, and other critical aspects of a computer system, primarily in Linux and Unix-like environments. It's the backbone of maintaining secure, reliable, and efficient infrastructure, spanning from simple user account management to complex automated workflows and monitoring strategies. Understanding the distinction between routine operational tasks and strategic security hardening is essential β both are required for production environments, but one focuses on day-to-day functionality while the other prevents catastrophic failure. Whether you're managing a single server or a cluster of thousands, mastering these foundational commands and concepts ensures systems remain available, secure, and performant.
What This Cheat Sheet Covers
This topic spans 36 focused tables and 310 indexed concepts. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.
Table 1: User Account Management
Users and their attributes are the foundation of Linux access control. Knowing how to create, modify, and audit accounts β and enforce password policies β is the most frequently performed sysadmin task and the first line of defense against unauthorized access.
| Command | Example | Description |
|---|---|---|
sudo useradd -m -s /bin/bash jdoe | β’ Creates a new user account β’ -m creates home directory, -s sets the shell. | |
sudo usermod -aG sudo jdoe | β’ Modifies an existing user β’ -aG appends user to additional groups without removing from others. | |
sudo userdel -r jdoe | β’ Deletes a user account β’ -r removes home directory and mail spool. | |
sudo passwd jdoe | β’ Changes or sets a user's password β’ prompts interactively for new password. | |
sudo chage -M 90 jdoe | β’ Manages password aging and expiration policies β’ -M sets maximum days before password must be changed. | |
echo "jdoe:newpass" | sudo chpasswd | β’ Bulk password changes from stdin β’ useful in scripts to set many passwords at once. |