π Linux Commands Cheat Sheet β From Beginner to Pro
This cheat sheet covers the essential Linux commands every IT professional should know. Whether you're preparing for a sysadmin job, studying for a certification, or managing your own VPS, these commands are your daily toolkit. Bookmark this page and practice on a real server β we've included free VPS credits below.
1. File & Directory Basics
| Command | Description |
pwd | Print current working directory |
ls -la | List all files (including hidden) with details |
cd /path | Change directory to /path |
mkdir newdir | Create a new directory |
touch file.txt | Create an empty file |
cp source dest | Copy file or directory (use -r for recursive) |
mv oldname newname | Move or rename a file |
rm file | Delete a file (use -rf for directories with caution) |
cat file | Display file contents |
less file | View file page by page (q to quit) |
2. Permissions & Ownership
| Command | Description |
chmod 755 file | Set permissions (rwx for owner, rx for group/others) |
chmod +x script.sh | Make a script executable |
chown user:group file | Change file owner and group |
ls -l | View permissions in list format |
3. System Information & Management
| Command | Description |
uname -a | Show system and kernel info |
df -h | Disk usage of file systems (humanβreadable) |
free -m | Memory usage (MB) |
top | Task manager (CPU/RAM usage, running processes) |
ps aux | List all running processes |
kill PID | Kill process by ID |
systemctl status service | Check status of a systemd service (e.g., nginx) |
journalctl -xe | View recent system logs |
4. Networking
| Command | Description |
ip addr | Show IP addresses |
ping host | Check connectivity to host |
curl url | Transfer data from/to a server (HTTP requests) |
wget url | Download files from the internet |
ss -tulpn | List listening ports |
ufw allow 22 | Allow SSH through firewall (Ubuntu) |
5. Package Management (Ubuntu/Debian)
| Command | Description |
sudo apt update | Refresh package lists |
sudo apt upgrade | Upgrade all installed packages |
sudo apt install pkg | Install a package |
sudo apt remove pkg | Uninstall a package |
dpkg -l | List all installed packages |
6. Text Processing & Searching
| Command | Description |
grep "text" file | Search for text inside a file |
find / -name "file.txt" | Find a file by name |
wc -l file | Count lines in a file |
sort file | Sort lines alphabetically |
uniq | Remove duplicate lines (often used with sort) |
sed 's/old/new/g' file | Replace text in a file |
π§ Practice These Commands on a Real Server
Get $200 free credit on DigitalOcean, or free trials on Vultr/Linode. Deploy a Linux VPS in minutes and master the command line.
Claim $200 Credit β
Try Vultr β
Next Steps for Your IT Career
Memorising commands is just the start. To turn Linux into a career:
- Practice daily: Set up a VPS (use our free credits) and break things β that's how you learn.
- Learn scripting: Automate tasks with Bash. Our Ubuntu Beginner Guide can help.
- Offer your skills: Once comfortable, freelance as a Linux sysadmin on Fiverr or Upwork.
- Certify: Consider Linux+ or LPIC certifications for a resume boost.
Questions? Reach out β I'm happy to help.