RHCSA + Linux Basics Complete Command Guide
1. Basic Linux Commands
Command Explanation Example
pwd Print current working directory. pwd
whoami Show current logged-in username. whoami
date Display or set system date/time. date "+%d-%m-%Y %H:%M:%S"
cal Show calendar. cal 2025
echo Print text to screen. echo "Hello World"
clear Clear terminal screen. clear
history Show command history. history | grep dnf
uptime Show system uptime/load. uptime
uname Show system/kernel info. uname -a
man Show manual page. man ls
whatis Short description of command. whatis grep
whereis Locate binary/config/docs. whereis bash
which Show path to executable. which python3
2. File & Directory Navigation
Command Explanation Example
ls List contents of directory. ls -lAh
cd Change directory. cd /etc
mkdir Make new directory. mkdir projects
rmdir Remove empty directory. rmdir olddir
tree Show directory tree structure. tree /etc
touch Create empty file/update timestamp. touch [Link]
cat Show file contents. cat /etc/hosts
less View file one page at a time. less /var/log/messages
head Show first 10 lines (default). head -n 20 [Link]
tail Show last 10 lines (default). tail -f /var/log/secure
stat Show detailed file info. stat [Link]