Bookmark
💻 System Info
uname -a # Kernel info
hostname # Hostname
whoami # Current user
uptime # System uptime
date # Current date/time
df -h # Disk usage
free -h # Memory usage
top # Process monitor
htop # Enhanced process monitor
📂 File & Directory
ls -l # List files
ls -a # Show hidden files
cd /path/to/dir # Change directory
pwd # Print working directory
mkdir newdir # Create directory
rm file.txt # Remove file
rm -r folder # Remove directory recursively
cp file1 file2 # Copy file
mv old new # Move/rename file
touch file.txt # Create empty file
find . -name "*.sh" # Find files by name
📝 File Content
cat file.txt # Show file content
less file.txt # View file with paging
head -n 10 file.txt # First 10 lines
tail -n 10 file.txt # Last 10 lines
grep "text" file.txt # Search in file
wc -l file.txt # Line count
sort file.txt # Sort lines
uniq file.txt # Unique lines
🔒 Permissions
chmod +x script.sh # Make executable
chmod 644 file.txt # Set permissions
chown user:group file # Change owner
ls -l # Show permissions
🗂️ Archive & Compression
tar -czvf archive.tar.gz folder/ # Compress
tar -xzvf archive.tar.gz # Extract
zip file.zip file.txt # Zip file
unzip file.zip # Unzip file
gzip file.txt # Compress to .gz
gunzip file.txt.gz # Decompress .gz
🌐 Network
ping google.com # Test connectivity
curl https://example.com # Fetch URL
wget https://example.com/file # Download file
ifconfig # Network interfaces (deprecated)
ip addr # Network interfaces (modern)
netstat -tuln # List open ports
ss -tuln # List open ports (modern)
🏃 Process & Job Control
ps aux # List processes
kill -9 PID # Kill process
jobs # List background jobs
bg %1 # Resume job in background
fg %1 # Bring job to foreground
& # Run in background
🛡️ User & Group
adduser newuser # Add user
passwd newuser # Set password
deluser olduser # Delete user
usermod -aG group user # Add user to group
groups # Show user groups
id # Show user info
⏰ Scheduling
crontab -e # Edit cron jobs
crontab -l # List cron jobs
at 18:00 # Run command at specific time
🛠️ Misc
history # Command history
alias ll='ls -l' # Create alias
man ls # Manual page
which python # Show command path
echo $PATH # Show
Latex
Markdown
Want to update?
Subscribe to my blog to receive the latest updates from us.
Monthly articles
New articles will be created every month. No spam
All notifications are notified to you, not spam or advertising.