Skip to content

Linux Administration

Core shell commands and concepts for administering Linux hosts.

Why It Matters

Linux administration runs on the command line, so fluency with the shell, job control, and the common information commands is what makes the work efficient. These are the building blocks everything else sits on.

Reference

Shell Operators

Operator Meaning
& Run a command in the background
&& Run the next command only if the previous succeeded
> Redirect output to a file (overwrite)
>> Redirect output to a file (append)
\| Pipe output of one command into another

Common Commands

ls -lh                    # long listing with human-readable sizes
ps aux                    # running processes
top                       # live process view
ip a                      # interfaces and addresses
systemctl start <unit>    # start a service
python3 -m http.server    # quick local web server

Job Control

Action Command
Suspend foreground process Ctrl + Z
Start in background append &
Bring job to foreground fg
Kill a job / process kill %1 / kill <pid>

System Information

cat /etc/os-release          # distribution and version
grep "^$USER" /etc/passwd     # your login shell
curl ifconfig.me             # public IP

SSH keys live in ~/.ssh/ by default (for example ~/.ssh/id_rsa).

Cron

Scheduling reference: crontab.guru explains any cron expression, and crontab-generator.org builds one.

How I Use It

I live in the shell for Linux work and lean on systemctl, ps, and ip for day-to-day state. crontab.guru is my go-to for getting a cron schedule right the first time, and vim.rtorr.com is a handy Vim cheatsheet when editing configs on a remote host.

Resources