Category Command Example Description
1. File and Directory
Management ls ls -lh List files with human-readable sizes
1. File and Directory
Management cd cd /var/log Change directory to /var/log
1. File and Directory
Management pwd pwd Print current working directory
1. File and Directory
Management mkdir mkdir newfolder Create a new directory
1. File and Directory
Management rmdir rmdir oldfolder Remove an empty directory
1. File and Directory
Management rm rm file.txt Delete a file
1. File and Directory
Management cp cp source.txt dest.txt Copy a file
1. File and Directory
Management mv mv file.txt /tmp/ Move or rename a file
1. File and Directory
Management find find . -name '*.log' Search files in directory tree
1. File and Directory
Management stat stat file.txt Display detailed file information
2. User Management adduser adduser student Create a new user
2. User Management passwd passwd student Set password for user
2. User Management id id student Get user ID and group ID
2. User Management whoami whoami Display current user
usermod -aG wheel
2. User Management usermod student Add user to group
2. User Management deluser userdel student Delete a user
2. User Management groups groups student Show groups for a user
2. User Management w w See who is logged in and their activity
2. User Management who who List currently logged in users
2. User Management last last Show login history
3. Package
Management (YUM) yum install yum install httpd Install a package
3. Package
Management (YUM) yum remove yum remove httpd Remove a package
3. Package
Management (YUM) yum update yum update -y Update all packages
3. Package
Management (YUM) yum info yum info nano Show package info
3. Package
Management (YUM) yum list yum list installed List installed packages
3. Package
Management (YUM) yum history yum history View yum transaction history
3. Package
Management (YUM) yum search yum search nginx Search package
3. Package
Management (YUM) rpm rpm -qa List installed RPM packages
3. Package
Management (YUM) yum clean yum clean all Clean yum cache
3. Package yum-config- yum-config-manager --
Management (YUM) manager enable repo Enable a repo
4. Disk and Filesystem
Management df df -h Show disk usage
4. Disk and Filesystem
Management du du -sh * Show size of files/folders
4. Disk and Filesystem
Management mount mount /dev/sdb1 /mnt Mount a filesystem
4. Disk and Filesystem
Management umount umount /mnt Unmount a filesystem
4. Disk and Filesystem
Management lsblk lsblk List block devices
4. Disk and Filesystem
Management blkid blkid Show block device attributes
4. Disk and Filesystem
Management fdisk fdisk -l List partitions
4. Disk and Filesystem
Management mkfs mkfs.ext4 /dev/sdb1 Create ext4 filesystem
4. Disk and Filesystem
Management tune2fs tune2fs -l /dev/sda1 View filesystem info
4. Disk and Filesystem
Management fsck fsck /dev/sda1 Check filesystem integrity
5. Networking ping ping google.com Check network connectivity
5. Networking ip ip a Show IP addresses
5. Networking ifconfig ifconfig Show network interfaces
5. Networking netstat netstat -tuln List open ports
5. Networking ss ss -tuln Show socket connections
5. Networking nmcli nmcli device status NetworkManager interface status
5. Networking scp scp file.txt Secure copy to remote host
5. Networking rsync rsync -av file /backup/ Sync files to another location
5. Networking hostname hostname Display system hostname
5. Networking curl curl ifconfig.me Show public IP
6. Process and
Resource Management top top View real-time system processes
6. Process and
Resource Management htop htop Interactive process viewer
6. Process and
Resource Management ps ps aux Show all running processes
6. Process and
Resource Management kill kill -9 PID Force terminate a process
6. Process and
Resource Management killall killall firefox Kill all processes by name
6. Process and
Resource Management nice nice -n 10 script.sh Run process with priority
6. Process and
Resource Management renice renice -n 5 -p 1234 Change running process priority
6. Process and
Resource Management jobs jobs List background jobs
6. Process and
Resource Management bg bg %1 Resume a job in background
6. Process and
Resource Management fg fg %1 Bring background job to foreground
7. System Information
and Logging uname uname -a Display system information
7. System Information
and Logging uptime uptime Show how long the system is up
7. System Information
and Logging hostnamectl hostnamectl View and change hostname
7. System Information
and Logging dmesg dmesg | less View boot-time kernel messages
7. System Information
and Logging journalctl journalctl -xe Show systemd logs
7. System Information
and Logging vmstat vmstat 1 Show memory and CPU usage
7. System Information
and Logging iostat iostat Report CPU and I/O stats
7. System Information
and Logging sar sar -u 1 3 Collect, report system activity
7. System Information
and Logging free free -h Display memory usage
7. System Information
and Logging uptime uptime Show system uptime
8. Scheduling and
Automation crontab crontab -e Edit user’s cron jobs
8. Scheduling and echo 'reboot' | at now
Automation at + 1 minute Schedule task with `at`
8. Scheduling and
Automation systemctl systemctl list-timers List active systemd timers
8. Scheduling and
Automation sleep sleep 60 Pause script execution for 60 seconds
8. Scheduling and
Automation watch watch -n 5 date Run a command every 5 seconds
8. Scheduling and
Automation cron cat /etc/crontab View system-wide cron jobs
8. Scheduling and
Automation anacron anacron -T daily Test anacron job
8. Scheduling and
Automation nice nice -n 10 myjob Schedule with low CPU priority
8. Scheduling and
Automation atq atq List pending `at` jobs
8. Scheduling and
Automation atrm atrm 1 Remove a scheduled `at` job
9. SELinux and Firewall getenforce getenforce Check SELinux status
9. SELinux and Firewall setenforce setenforce 0 Set SELinux to permissive
9. SELinux and Firewall sestatus sestatus View SELinux detailed status
9. SELinux and Firewall semanage semanage port -l List SELinux ports
9. SELinux and Firewall firewall-cmd firewall-cmd --state Check firewall status
9. SELinux and Firewall firewall-cmd firewall-cmd --list-all List firewall zones and rules
firewall-cmd --add-
9. SELinux and Firewall firewall-cmd port=80/tcp -- Open port in firewall
9. SELinux and Firewall firewall-cmd firewall-cmd --reload Reload firewall
9. SELinux and Firewall iptables iptables -L View current firewall rules
iptables -A INPUT -p tcp
9. SELinux and Firewall iptables --dport 22 -j ACCEPT Allow SSH in firewall
10. Archiving and tar -cvf archive.tar
Compression tar file.txt Create tar archive
10. Archiving and
Compression tar tar -xvf archive.tar Extract tar archive
10. Archiving and
Compression gzip gzip file.txt Compress file using gzip
10. Archiving and
Compression gunzip gunzip file.txt.gz Decompress gzip file
10. Archiving and
Compression bzip2 bzip2 file.txt Compress file using bzip2
10. Archiving and
Compression bunzip2 bunzip2 file.txt.bz2 Decompress bzip2 file
10. Archiving and
Compression xz xz file.txt Compress file using xz
10. Archiving and
Compression unxz unxz file.txt.xz Decompress xz file
10. Archiving and zip files.zip file1.txt
Compression zip file2.txt Create a zip archive
10. Archiving and
Compression unzip unzip files.zip Extract files from zip archive