0% found this document useful (0 votes)
4 views2 pages

Linux Commands CheatSheet

Uploaded by

rekhasapkota55
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views2 pages

Linux Commands CheatSheet

Uploaded by

rekhasapkota55
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Linux Commands Cheat Sheet (Cybersecurity

Focus)

Basic Commands
pwd → Show current directory path
ls, ls -l, ls -a → List files and directories
cd → Change directory
touch file.txt → Create empty file
mkdir folder → Create directory
cp file1 file2 → Copy files
mv file1 file2 → Move or rename
rm file.txt → Remove file
cat file.txt → Display file content
nano file.txt / vim file.txt → Edit file

User & Permissions


whoami → Show current user
id → Show user ID and group info
adduser username → Add new user
passwd username → Change password
chmod 755 file.sh → Change permissions
chown user:group file.txt → Change ownership
sudo → Run as root/admin

System & Process Monitoring


uname -a → System info
top → Show running processes
ps aux → List processes
kill → Kill process by ID
df -h → Show disk usage
du -sh folder/ → Show folder size
free -m → Show memory usage
uptime → Show system running time

Networking
ifconfig / ip a → Show network interfaces
ping → Test connectivity
netstat -tulnp / ss -tuln → Show open ports & processes
curl http://site.com → Fetch webpage
wget URL → Download file
scp file user@host:/path → Secure copy to remote
ssh user@host → Remote login
traceroute host → Show packet path
nslookup domain.com → DNS lookup
File Search & Management
find / -name file.txt → Find file by name
locate file.txt → Quickly search (needs updatedb)
grep 'text' file.txt → Search inside file
grep -r 'keyword' /etc/ → Recursive search

Package Management
apt update && apt upgrade → Update system (Debian/Ubuntu)
apt install package → Install package (Debian/Ubuntu)
yum install package / dnf install package → Install package (RHEL/CentOS)

Security & Logs


sudo ufw enable → Enable firewall (Ubuntu)
sudo ufw status → Check firewall rules
iptables -L → Show firewall rules
history → Show command history
last → Show login history
who → Show who is logged in

You might also like