25 Essential Linux Commands Every Sysadmin Must Know
As a Linux system administrator, the command line is your most powerful tool. Whether you’re managing users, monitoring performance, troubleshooting issues, or automating tasks, knowing the right commands can save you hours of work and headaches.
In this guide, we’ll cover 25 must-know Linux commands that every sysadmin should have in their toolkit — with examples and tips for practical usage.
1. top
View real-time system performance and processes.
top
Press q to quit. Use htop for a better interactive view (if installed).
2. ps
Display running processes.
ps aux | grep nginx
Useful for checking if a service is running.
3. df
Check disk usage.
df -h
The -h flag makes sizes human-readable.
4. du
Check file/folder size.
du -sh /var/log
Perfect for locating large directories.
5. free
Show system memory usage.
free -h
Helpful for troubleshooting memory issues.
6. uptime
Check how long the system has been running.
uptime
Also shows load averages.
7. who
See who is currently logged in.
who
Good for monitoring user sessions.
8. netstat
View network connections and ports.
netstat -tuln
Use ss on newer systems as a replacement.
9. ping
Test connectivity to another system.
ping google.com
Press Ctrl + C to stop.
10. traceroute
Trace the path packets take to a host.
traceroute linuxnugget.com
Useful for diagnosing network issues.
11. ifconfig / ip
View or configure network interfaces.
ip a
ifconfig is deprecated, use ip instead.
12. hostname
Display or set the system hostname.
hostnamectl set-hostname myserver
13. systemctl
Control system services.
systemctl restart sshd systemctl status nginx
14. journalctl
View logs managed by systemd.
journalctl -xe
Perfect for troubleshooting startup and service errors.
15. chmod
Change file or directory permissions.
chmod 755 script.sh
16. chown
Change file or directory ownership.
chown user:group file.txt
17. crontab
Schedule recurring tasks.
crontab -e
Example to run a backup every day at midnight:
0 0 * * * /usr/local/bin/backup.sh
18. rsync
Efficiently sync files/directories.
rsync -av /source /destination
Often used for backups or migrations.
19. scp
Securely copy files between systems.
scp file.txt user@server:/home/user/
20. tar
Archive and compress files.
tar -czvf archive.tar.gz /folder
Extract with:
tar -xzvf archive.tar.gz
21. grep
Search for patterns in files.
grep 'error' /var/log/syslog
22. find
Locate files based on name, size, date, etc.
find / -name "*.conf"
23. nano / vim
Edit files from the terminal.
nano /etc/hosts
Use vim if you’re comfortable with more powerful editing.
24. useradd, passwd, usermod, userdel
sudo useradd alice
sudo passwd alice
sudo usermod -aG
sudo userdel alice
25. reboot / shutdown
Reboot or shut down the system.
sudo reboot sudo shutdown now
Final Thoughts
These 25 Linux commands are essentials for every sysadmin’s toolbox. Mastering them will make your work faster, more efficient, and more powerful.
Want to become a command-line ninja? Practice these commands daily, explore their flags, and use man pages to go deeper: man rsync
Continue Reading
- 10 Basic Linux Commands Every Beginner Should Know
- How to Create and Manage Users in Linux
- Linux for DevOps: Why It’s Essential and What You Need to Learn
Train like a real Linux engineer at
Unix Training Academy