Categories: Cheat Sheet

10 Essential Linux Commands Every SysAdmin Should Know

As a Linux System Administrator, mastering the command line is key to efficiently managing servers, troubleshooting issues, and automating tasks. Whether you’re working with bare metal, cloud VMs, or containerized environments, these 10 Linux commands are the backbone of daily sysadmin operations.


1. ls – List Directory Contents

The ls command lists files, directories, and their attributes.

ls -lah
  • -l → detailed (long) listing
  • -a → include hidden files
  • -h → human-readable file sizes

Tip: Combine it with sort or grep to find files quickly.


2. cd – Change Directory

Switch directories easily with cd.

cd /var/log

Shortcut: cd - → go back to the previous directory.


3. grep – Search Inside Files

grep searches for text patterns within files.

grep -Ri "error" /var/log/
  • -R → recursive search
  • -i → case-insensitive

Use case: Perfect for scanning logs or config files for keywords.


4. top / htop – Monitor System Processes

Monitor performance and resource usage in real-time.

top

Or install the enhanced version:

htop

View CPU, memory, and process usage, and interactively manage processes.


5. df – Disk Space Usage

Quickly check disk space usage.

df -h
  • -h → human-readable output
  • df -Th → show filesystem types

6. du – Disk Usage per Directory

Find which directories consume the most space.

du -sh /var/*

Combine with sort for better insight:

du -sh * | sort -h

7. tar – Archive and Extract Files

Create or extract compressed files.

# Create archive
tar -czvf backup.tar.gz /etc

# Extract archive
tar -xzvf backup.tar.gz
  • c → create
  • x → extract
  • z → gzip compression
  • v → verbose
  • f → file

8. chmod & chown – Manage Permissions

Set or change file permissions and ownership.

chmod 644 file.txt
chown root:root file.txt

Tip: Always double-check permissions before changing system files.


9. systemctl – Manage Services

Control services and daemons on systemd-based distributions.

systemctl status nginx
systemctl restart sshd
systemctl enable mariadb

Actions: start, stop, restart, status, enable, disable


10. journalctl – View System Logs

Access and filter logs stored by systemd.

journalctl -u nginx --since "1 hour ago"
  • -u → specific service
  • --since / --until → filter by time range

Bonus Tip: Combine Commands with Pipes (|)

Chain commands together to process data efficiently:

ps aux | grep nginx | awk '{print $2}'

This example finds all Nginx process IDs — showcasing the power of Linux pipelines.


Conclusion

These 10 Linux commands form the foundation of system administration. Once you’re comfortable with them, you’ll troubleshoot faster, automate routine tasks, and manage complex systems with confidence.

If you’re new to Linux or preparing for certifications like LFCS or RHCSA, mastering these commands is your first step toward becoming a professional sysadmin.

Tags: Linux, SysAdmin, Command Line, Tutorial, Tips

Category: Linux Basics

ferisetyawanmyid

Recent Posts

🚀 How to Install WireGuard with Docker on Ubuntu 24.04 (wg-easy Dashboard)

Introduction WireGuard is a fast, lightweight, and modern VPN protocol designed for simplicity and performance.If…

3 weeks ago

How To Install Certbot on Ubuntu 24.04: Set Up Let’s Encrypt for Apache and Nginx

Securing your website with HTTPS is essential for privacy, SEO ranking, and user trust. Let’s…

4 weeks ago

Best SSH Clients for Linux: Top Tools for Secure Remote Connections

If you manage Linux servers regularly, you know how important SSH (Secure Shell) is. Whether…

1 month ago

🐧 Best Linux Distributions for Beginners and Daily Use (2025 Edition)

If you’re new to Linux or thinking about switching from Windows or macOS, this guide…

1 month ago

Essential SRE Tools That Run on Linux

Introduction Site Reliability Engineering (SRE) has become a critical discipline in modern IT operations. The…

2 months ago

Best Free CRM Websites for Businesses in 2025

Updated: August 17, 2025 A practical guide to the best free CRM (Customer Relationship Management)…

2 months ago

This website uses cookies.