Linux Cheat Sheet Custom
Linux Cheat Sheet Custom
Basic Commands
sudo [command] Run command as superuser
man [command] Display manual for command
pwd Print current directory path
ls List directory contents
cd [dir] Change directory to [dir]
mkdir [dir] Create a new directory
rm [file/dir] Remove file or directory
cp [src] [dest] Copy files or directories
mv [src] [dest] Move or rename files
File Utilities
cat [file] View file content
touch [file] Create an empty file
head -n [n] [file] View first n lines of a file
tail -f [file] View last lines of a file in real-time
find [dir] -name [name] Search for files by name
grep [pattern] [file] Search for a pattern in files
chmod [permissions] [file] Change file permissions
chown [user:group] [file] Change file ownership
Disk Utilities
df -h Display disk space usage
du -sh [dir/file] Show disk usage of a directory or file
fdisk -l List disk partitions
mkfs -t [type] [device] Create a new file system
mount [device] [dir] Mount a device to a directory
umount [dir/device] Unmount a device
Process Management
ps aux List all processes
top Monitor processes in real-time
kill [PID] Terminate a process by PID
killall [name] Kill all processes by name
jobs List background jobs
fg %N Bring job N to the foreground
bg %N Resume job N in the background
Networking Commands
ifconfig Display network interfaces
ping [host] Ping a host to check connectivity
netstat -tuln Show open ports and connections
scp [src] [user@host:dest] Secure copy files to/from remote system
ssh [user@host] Connect to a remote host via SSH
wget [url] Download a file from the web