Here’s a list of commonly used Linux commands, organized by category for easier
understanding:
🔧 Basic File and Directory Commands
Command Description
ls List directory contents
cd Change directory
pwd Show current directory
mkdir Create a new directory
rmdir Remove an empty directory
touch Create an empty file
rm Remove files or directories
cp Copy files or directories
mv Move or rename files/directories
find Search for files/directories
tree Display directories as a tree (may require
installation)
📄 File Viewing & Editing
Command Description
cat View contents of a file
less, more View file page by page
head Show first lines of a file
tail Show last lines of a file
nano, vim, Text editors
vi
echo Print text or variables
🛠️ File Permissions & Ownership
Command Description
chmod Change file permissions
chown Change file ownership
chgrp Change group ownership
umask Set default permission for new files
🧠 Process Management
Command Description
ps List processes
top Dynamic view of running processes
htop Improved top (may require install)
kill Kill a process by PID
killall Kill processes by name
nice, Set process priority
renice
🌐 Networking
Command Description
ping Test network connection
ifconfig / ip Show IP and network info
a
netstat / ss Show open network
connections
curl Transfer data from or to a
server
wget Download files from the web
scp Secure copy between hosts
ssh Secure shell to another system
💾 Disk & Storage
Command Description
df Show disk usage
du Show file/folder sizes
mount / Mount or unmount storage
umount devices
lsblk List block devices
fdisk Partition a disk
mkfs Create a filesystem
📦 Package Management
Ubuntu/Debian
Command Description
apt update Update package
index
apt upgrade Upgrade all packages
apt install Install a package
<package>
apt remove Remove a package
<package>
dpkg -i <file.deb> Install a .deb file
Red Hat/CentOS
Command Description
yum install Install a package
<package>
dnf install Modern alternative to yum
<package>
👤 User Management
Command Description
whoami Show current user
id Show user and group
IDs
adduser / Add a new user
useradd
passwd Change user password
usermod Modify a user
deluser / Delete a user
userdel
⚙️ System & Info
Command Description
uname -a System info
uptime Show system uptime
hostname Show or set system
hostname
date Show current date/time
cal Calendar
free -h Show memory usage
dmesg Boot and system logs
journalc View logs (systemd-based)
tl
🧪 Useful Miscellaneous
Command Description
alias Create a shortcut command
history Show command history
man Manual page for a
<command> command
clear Clear terminal screen
exit Exit terminal/session