Linux Commands

Frequently Used Commands

Command                Description
ls Lists files and directories
cd Changes the directory
mkdir Creates a new directory
rm Deletes files
rm -r Removes directories and their contents
cp Copies files
mv Moves or renames files
chmod Changes file attributes/permissions
clear Clears the screen
echo Displays messages or toggles echoing

File & Text Manipulation

Command                Description
cat Displays the contents of a file
grep Searches for a text string in a file
diff Compares files
more Views file contents one screen at a time
less Views file contents one screen at a time
tree Displays directory structure in tree format

Disk & File System Management

Command                Description
fsck Checks and repairs the file system
fdisk Manages disk partitions
parted Manages disk partitions

Task Scheduling & Automation

Command                Description
cron Schedules tasks
at Schedules tasks

System & Process Management

Command                Description
ps Lists running processes
kill Kills a running process
shutdown Shuts down or reboots the system
uname -a Displays system information
lsb_release -a Displays detailed OS version info
exit Exits the command shell

Networking Commands

Command                Description
ping Tests network connectivity
netstat Displays network connections
traceroute Traces the route to a network host
ifconfig Displays network configuration
(Deprecated, use ip addr)
ip addr Displays network configuration

Environment & System Settings

Command                Description
alias Sets or displays file associations
export Sets environment variables
hostname Displays the hostname of the computer
date Displays or sets the system date
timedatectl Manages time and date settings