Linux Commands Cheat Sheet for Viva
File and Directory Commands
ls - List files and directories
ls -l - Long listing with details
ls -a - Show hidden files
pwd - Show current working directory
cd - Change directory
cd .. - Go to parent directory
mkdir - Create a directory
rmdir - Remove empty directory
rm -r - Remove directory and contents
touch - Create empty file
cp - Copy files
mv - Move or rename files
rm - Delete a file
cat - View file contents
more / less - View large files page-wise
head / tail - Show beginning or end of file
File Permissions
chmod - Change file permissions
chown - Change file ownership
ls -l - View file permissions
Process Management
ps - Show running processes
top - Real-time process monitor
kill PID - Kill a process by PID
kill -9 PID - Forcefully kill a process
nice / renice - Set process priority
User Management
whoami - Display current user
who - Show logged-in users
su - Switch user
adduser / useradd - Add new user
passwd - Change user password
logout / exit - Log out of terminal
Networking Commands
ifconfig / ip a - Display IP addresses
ping - Test network connectivity
netstat - Display network connections
wget - Download files from web
curl - Transfer data from/to a server
Disk Management
df -h - Display disk usage
du -h - Display file/directory sizes
mount / umount - Mount/unmount filesystems
Searching and Filtering
find - Search for files
grep - Search inside files
locate - Quickly locate files
Archive and Compression
tar -cvf - Create archive
tar -xvf - Extract archive
gzip / gunzip - Compress/decompress files
zip / unzip - Zip and unzip files
Miscellaneous
history - Show command history
clear - Clear terminal screen
man - Command manual/help
echo - Display text
date - Display current date and time
cal - Show calendar
sleep - Pause command execution
time - Measure execution time