Designed for seasoned Red Hat professionals, this page serves as a quick reference for commands that aren’t used daily but remain critical for effective system administration. Each command listed here has been carefully selected for its relevance in real-world scenarios, from troubleshooting and security management to system performance tuning. We recommend reviewing the entire list regularly and practicing each command in a test environment to reinforce your knowledge and ensure you can confidently apply it when needed. Consistent review and hands-on practice will help maintain your command-line proficiency and readiness for any task.
File System Navigation
| Command | Functionality |
| ls -lhZ | Long List (l) of directory contents to include human-readable (h) file sizes and SELinux (Z) contexts. |
| cd ../../new-path/ | Change Directory going back two directories and forward into new-path |
| pwd | Lists Present Working Directory |
| du -h | Displays estimate file space usage |
File Manipulation
| Command | Functionality |
| echo “Test” > file.txt | Echoes the word “Test” into file.txt. If file existed prior, it is completely remade. |
| echo “Test” >> file.txt | Appends file.txt with the word “Test”. |
| vi test.txt vim test.txt | Opens test.txt in a text editor. |
| zip -r directory.zip directory/ | Creates a zip file of a directory. |
| unzip directory.zip | Unzips a compressed zip file. |
| tar -cvzf directory.tar.giz /path/to/directory | Creates a compressed tar gunzip file from directory contents. |
| tar -xvzf directory.tar.gz | Extracts contents of compressed tar gunzip file. |
| rm file.txt | Removes file.txt file. |
| rmdir directory/ | Removes empty directory. |
| touch example.txt | Creates an empty file named example.txt. |
Reviewing Physical System Components
| Command | Functionality |
| lsblk | Lists block devices (hard drives) |
| lspci | Lists PCI devices |
| lsmod | Lists Kernel Modules |
| df -h | Displays file systems and their disk space usage |
| cat /proc/meminfo | Holds information about system memory |
| cat /proc/cpuinfo | Holds information about system processor(s) |
| dmidecode | DMI Table decoder dumps computer’s DMI/SMBIOS information. |
| mount IP:/mount/point /mnt | Mounts a remotely-defined path to /mnt |
| mount /home | Mounts /home by referencing contents of the /etc/fstab |
| umount -l /home | Lazily (forced) unmount of the /home directory. |
Processes and Log Review
| Command | Functionality |
| tail -f /var/log/messages | Tails messages log and follows all new output. |
| journalctl | Systemd Journal |
| systemctl status/start/stop/restart/enable/disable daemon | Commonly used systemctl commands to manage service daemons. |
| dmesg | Lists the kernel ring buffer |
| /var/log /var/log/messages /var/log/secure /var/log/audit/audit.log | Commonly used system logs |
| top | Displays top processes actively running. |
| ps -ef | Lists every process on the system |
| vmstat | Virtual memory utilization |
| kill -9 <pid> | Kills a process, referencing its process identifier, from running |
File System Permissions
| ll /path/to/folder | Long list of folder contents with permissions. |
| chown <username> file.txt | Changes owner of file.txt to specified username. |
| chgrp <group> file.txt | Changes group of file.txt to specified group. |
| chmod 750 file.txt | Changes mode bits of file.txt to provide full access to owner, read-execute to group, and none to other. Bits: 1 – Execute 2 – Read 4 – Write |
| chmod g+s /path/to/folder | All new files and folders inherit the current group instead of the user’s default group. SetGid is shown in a long list as an s. |
| getfacl /path/to/folder | Gets file access control lists |
| setfacl -d -m g:<group>:rx /path/folder | Sets file access control list default on folder to allow defined group read-execute privileges for all new content. No recursion. |
| setfacl -Rm u:<user>:rwx /path/folder | Sets file access control list recursively on folder to allow defined user read/write/execute privileges for current content. |
| setfacl -b /path/folder | Removes all file access control lists on folder |
Networking
| Command | Functionality |
| nmtui | Network Manager Text User Interface for controlling NetworkManager |
| nmcli | Network Manager Command-line Interface for controlling NetworkManager |
| ip address | Displays IP, routing, network devices, interfaces, and tunnels. |
| systemctl restart NetworkManager | Restarts NetworkManager system daemon. |