Essential Linux System Administration Commands and How They Work

The Linux commands system administrators use most cover a handful of tasks: checking the system ( uname, hostnamectl, uptime), managing processes ( ps, top, kill), controlling services ( systemctl), reading logs ( journalctl), managing disks ( df, du, lsblk), handling users and permissions ( useradd, chmod, chown), installing packages ( dnf or apt), checking networking ( ip, ss) and scheduling jobs ( cron, systemd…

Jul 19, 2025 - 12:11
Updated: 
102.2k

Linux Administration in IT Infrastructure · Commands & reference

Essential Linux System Administration Commands and How They Work

Quick answer: The Linux commands system administrators use most cover a handful of tasks: checking the system (uname, hostnamectl, uptime), managing processes (ps, top, kill), controlling services (systemctl), reading logs (journalctl), managing disks (df, du, lsblk), handling users and permissions (useradd, chmod, chown), installing packages (dnf or apt), checking networking (ip, ss) and scheduling jobs (cron, systemd timers). Learning them by task is faster than memorising lists.

Key takeaways

  • systemctl and journalctl are central on systemd distributions.
  • Use man and --help to check options before running commands.
  • Prefer least privilege: use sudo for specific commands, not a root shell.
  • Check disk and memory early when troubleshooting performance.
  • Test destructive commands with dry runs where available.

Table of Contents

Which Commands Show System Information?

hostnamectl          # hostname, OS, kernel
uname -r             # kernel version
uptime               # uptime and load average
free -h              # memory usage
lscpu                # CPU details
cat /etc/os-release  # distribution and version

How Do You Manage Processes and Services?

ps aux --sort=-%mem | head       # top memory users
top                              # live view (q to quit)
kill PID                         # ask a process to stop; kill -9 only as last resort

sudo systemctl status nginx      # service state and recent logs
sudo systemctl restart nginx
sudo systemctl enable --now nginx    # start now and at boot
systemctl list-units --failed    # failed services

See the systemctl manual.

How Do You Read Logs?

journalctl -u nginx --since "1 hour ago"   # one service
journalctl -p err -b                        # errors since boot
journalctl -f                               # follow new entries
sudo tail -f /var/log/auth.log              # Debian/Ubuntu authentication log
sudo tail -f /var/log/secure                # RHEL authentication log

How Do You Manage Disks and Files?

df -h                            # free space per filesystem
du -sh /var/* | sort -h          # what is using space
lsblk                            # disks and partitions
findmnt                          # mounted filesystems
find /var/log -name "*.gz" -mtime +30    # old compressed logs

How Do You Manage Users and Permissions?

sudo useradd -m -s /bin/bash priya && sudo passwd priya
sudo usermod -aG wheel priya     # RHEL admin group (sudo group on Ubuntu)
id priya
chmod 640 config.yml             # owner rw, group r
sudo chown app:app /srv/app -R
sudo visudo                      # edit sudo rules safely

See Linux users and permissions.

How Do You Install and Update Software?

TaskRHEL/FedoraDebian/Ubuntu
Update allsudo dnf upgradesudo apt update && sudo apt upgrade
Installsudo dnf install htopsudo apt install htop
Searchdnf search nginxapt search nginx
Which package owns a filerpm -qf /usr/bin/ssdpkg -S /usr/bin/ss

How Do You Schedule Tasks?

crontab -e
# run a backup script at 02:30 every day
30 2 * * * /usr/local/bin/backup.sh >> /var/log/backup.log 2>&1

systemctl list-timers            # systemd timers

What Safety Habits Matter?

  • Read the man page before unfamiliar commands.
  • Double-check paths in rm, chmod -R and chown -R.
  • Use rsync --dry-run before large copies or deletions.
  • Back up configuration files before editing.
  • Avoid running scripts piped from the internet without reading them.

Related: Linux server hardening and finding which process uses a port. WebAsha offers RHCSA and Linux courses.

References

Frequently Asked Questions

systemctl, journalctl, ps, top, df, du, ip, ss, useradd, chmod, chown and the package manager.

Run systemctl status followed by the service name.

Use journalctl, for example journalctl -u nginx --since "1 hour ago".

Use df -h for filesystems and du -sh on directories to find large ones.

Create the user with useradd -m, then add them to wheel (RHEL) or sudo (Ubuntu).

dnf is the package manager for RHEL and Fedora; apt is used on Debian and Ubuntu.

Use crontab -e or create a systemd timer.

Only as a last resort; try a normal kill first so the process can clean up.

What's Your Reaction?

Like Like 0
Dislike Dislike 0
Love Love 0
Funny Funny 0
Wow Wow 0
Sad Sad 0
Angry Angry 0
Vaishnavi

Vaishnavi is a skilled tech professional at the Ethical Hacking Training Institute in Pune, responsible for managing and optimizing the technical infrastructure that supports advanced cybersecurity education. With deep expertise in network security, backend operations, and system performance, she ensures that practical labs, online modules, and assessments run smoothly and securely. Her behind-the-scenes contributions play a vital role in delivering a seamless and secure learning experience for aspiring ethical hackers.