Sponsored
Ad slot is loading...

Linux Command Cheat Sheet

Complete Linux command reference. File operations, search, process management, system info, networking, permissions, and archiving. Essential commands for Linux administration.

Linux Commands (41)

Files
ls
List directory contents
Files
ls -la
List with details and hidden
Files
cd <dir>
Change directory
Files
pwd
Print working directory
Files
mkdir <dir>
Create directory
Files
rm <file>
Remove file
Files
rm -r <dir>
Remove directory recursively
Files
cp <src> <dest>
Copy file
Files
mv <src> <dest>
Move or rename file
Files
touch <file>
Create empty file
Files
cat <file>
Display file contents
Files
head -n 10 <file>
Show first 10 lines
Files
tail -n 10 <file>
Show last 10 lines
Files
find . -name "*.txt"
Find files by name
Search
grep "pattern" <file>
Search in file
Search
grep -r "pattern" <dir>
Search recursively
Search
grep -i "pattern"
Case insensitive search
Search
sed "s/old/new/g" <file>
Replace text
Process
ps
List processes
Process
ps aux
List all processes
Process
kill <pid>
Kill process by PID
Process
kill -9 <pid>
Force kill process
Process
top
Show running processes
Process
htop
Interactive process viewer
System
df -h
Disk space usage
System
du -sh <dir>
Directory size
System
free -h
Memory usage
System
uptime
System uptime
System
uname -a
System information
Network
ping <host>
Test connectivity
Network
curl <url>
HTTP request
Network
wget <url>
Download file
Network
netstat -tuln
Show network ports
Network
ssh <user>@<host>
Remote login
Network
scp <file> <user>@<host>:<path>
Copy file remotely
Permission
chmod 755 <file>
Change permissions
Permission
chown <user>:<group> <file>
Change ownership
Archive
tar -czf <archive> <files>
Create tar.gz archive
Archive
tar -xzf <archive>
Extract tar.gz archive
Archive
zip <archive> <files>
Create zip archive
Archive
unzip <archive>
Extract zip archive

Permission Reference

7: rwx (read, write, execute)
6: rw (read, write)
5: rx (read, execute)
4: r (read only)
755: Owner rwx, others rx
644: Owner rw, others r
700: Owner only
777: Everyone full
Sponsored
Ad slot is loading...