Linux Command
๐ Funny Linux Commands List ๐
| Command | Maza Wali Baat (Description) | Install Command |
|---|---|---|
| sl | ๐ Agar ls ki jagah galti se sl likho toh ek train guzar jayegi! | sudo apt install sl |
| cowsay “Linux is fun!” | ๐ Ek cartoon cow tumhara message bolegi. | sudo apt install cowsay |
| fortune | ๐ฎ Random future prediction ya quote dikhata hai. | sudo apt install fortune |
| toilet “Hacker” | ๐จ Stylish ASCII text generate karta hai. | sudo apt install toilet |
| figlet “Linux” | ๐ผ๏ธ Bada aur fancy ASCII text banata hai. | sudo apt install figlet |
| lolcat | ๐ Rainbow colors mein text dikhata hai! | sudo apt install lolcat |
| rev | ๐ Text ko ulta likh kar dikhata hai. | (Pre-installed) |
| cmatrix | ๐ป Terminal ko “The Matrix” style mein badal deta hai! | sudo apt install cmatrix |
| pv | โจ๏ธ Typewriter jaisa slow motion text print karega. | sudo apt install pv |
| espeak “Hello hacker!” | ๐ฃ๏ธ Terminal se computer ki awaaz sunni ho. | sudo apt install espeak |
| aafire | ๐ฅ Terminal par aag jala do! | sudo apt install libaa-bin |
| asciiquarium | ๐ Ek animated aquarium terminal par! | sudo apt install asciiquarium |
| bb | ๐ ASCII graphics aur animations dikhata hai! | sudo apt install bb |
| xeyes | ๐ Screen par do aankhein aayengi jo mouse ko follow karti hain! | sudo apt install x11-apps |
| oneko | ๐ฑ Tumhare mouse ke peeche ek billi bhagti rahegi! | sudo apt install oneko |
| nyancat | ๐ Terminal par ek Nyan Cat chalayega! | sudo apt install nyancat |
| wtf | ๐ค Yeh command kuch technical acronyms ka matlab batata hai. | sudo apt install wtf |
| moo | ๐ apt-get moo likhne par ek secret cow message milega! | (Pre-installed) |
| factor <number> | ๐ข Yeh kisi bhi number ke factors nikal dega. | (Pre-installed) |
| `echo “Hacking in progress…” | pv -qL 10` | ๐ฅ๏ธ Typewriter jaisa effect dega. |
| yes “Main Linux ka deewana hoon!” | ๐ Infinite loop mein text likhta rahega. Ctrl+C se rokna padega. | (Pre-installed) |
| uptime | โณ Bata dega system kitne time se chalu hai, jaise ki tum soye ho ya nahi. ๐ | (Pre-installed) |
| history | ๐ Bata dega tumne pehle kya commands run ki thi. Koi secret mat type karna! | (Pre-installed) |
| `:(){ : | :& };:` | โ ๏ธ Yeh command “fork bomb” hai, jo system hang kar sakta hai. Mat try karna! |
| cal 9 1752 | ๐ Yeh ek aisi calendar glitch dikhata hai jo historical bug hai! | (Pre-installed) |
| rm -rf / | โ ๏ธ Yeh pura system uda dega, joke mat samajhna! | (Dangerous, mat run karna!) |
๐ฅ Extra Fun Commands Combination ๐ฅ
๐ฎ ๐ ๐ โ Future prediction cow ke saath aur rainbow colors! ๐
๐ ๐ป Rainbow hacker cow!
๐ป๐ฑ โ Matrix ke upar billi bhagti rahegi!
๐๐ โ Pehle train chalegi, phir Nyan Cat ud jayegi!
1. File aur Directory Commands
ls โ Current directory ke files aur folders dikhata hai.
cd โ Directory change karne ke liye (cd /home/user).
pwd โ Current working directory dikhata hai.
mkdir โ Nai directory banane ke liye (mkdir test).
rmdir โ Empty directory delete karne ke liye (rmdir test).
rm -r โ Directory aur uske contents delete karne ke liye (rm -r test).
touch โ Naya file banane ke liye (touch file.txt).
cp โ Files ya directories copy karne ke liye (cp file1.txt file2.txt).
mv โ Files ya directories move ya rename karne ke liye (mv old.txt new.txt).
find โ Specific file ya directory dhoondhne ke liye (find /home -name file.txt).
2. File Content aur Editing Commands
cat โ File ke content dikhata hai (cat file.txt).
nano โ File edit karne ke liye (nano file.txt).
vim โ Advanced text editor (vim file.txt).
less โ Large file ko scroll karne ke liye (less file.txt).
head โ File ke starting lines dikhata hai (head -10 file.txt).
tail โ File ke last lines dikhata hai (tail -10 file.txt).
echo โ Terminal me text print karta hai (echo “Hello, Linux”).
grep โ Specific text ko dhoondhne ke liye (grep “word” file.txt).
diff โ Do files ka difference dikhata hai (diff file1.txt file2.txt).
wc โ File me words, lines aur characters count karta hai (wc file.txt).
3. File Permissions aur Ownership Commands
chmod โ File permissions change karne ke liye (chmod 755 file.txt).
chown โ File owner change karne ke liye (chown user:user file.txt).
chgrp โ File ka group change karne ke liye (chgrp groupname file.txt).
umask โ Default permissions dekhne ya set karne ke liye (umask 022).
ls -l โ Files ki permissions check karne ke liye.
4. Process Management Commands
ps โ Running processes dekhne ke liye.
top โ System performance aur running processes dikhata hai.
htop โ top ka interactive version (pehle htop install karna padega).
kill โ Process ko terminate karne ke liye (kill PID).
pkill โ Process name se terminate karne ke liye (pkill firefox).
jobs โ Background jobs dekhne ke liye.
bg โ Background job resume karne ke liye.
fg โ Background job ko foreground me laane ke liye.
5. User Management Commands
whoami โ Current user ka naam dikhata hai.
who โ Logged-in users ka list dikhata hai.
id โ User ID aur Group ID dikhata hai.
adduser โ Naya user create karne ke liye (sudo adduser username).
passwd โ Password change karne ke liye (passwd).
su โ Doosre user ke account me switch karne ke liye (su username).
sudo โ Superuser privileges use karne ke liye (sudo command).
6. Networking Commands
ifconfig โ IP address aur network interface details dikhata hai (deprecated, ab ip a use hota hai).
ip a โ Current IP address dikhata hai.
ping โ Kisi network host ko ping karne ke liye (ping google.com).
netstat โ Network connections dikhata hai.
curl โ URL se data fetch karne ke liye (curl example.com).
wget โ Web se files download karne ke liye (wget url).
7. System Information Commands
df -h โ Disk space usage dikhata hai.
du -sh โ Directory ka size check karne ke liye.
uptime โ System kab se chal raha hai ye dikhata hai.
uname -a โ System ke bare me full details dikhata hai.
1. File & Directory Management
ls -lah โ Detailed list with human-readable sizes.
tree โ Directory structure tree format me dikhata hai.
find / -type f -size +100M โ 100MB se bade files dhoondhne ke liye.
find /var/log -type f -mtime -7 โ Last 7 din me modify hue log files dhoondhne ke liye.
du -sh * | sort -rh | head -10 โ Top 10 sabse bade files/directories dikhata hai.
rsync -avz source/ destination/ โ Files aur directories sync karne ke liye.
stat file.txt โ File ki details jaise permissions, timestamps dekhne ke liye.
basename /path/to/file โ Sirf filename extract karne ke liye.
dirname /path/to/file โ Sirf directory path extract karne ke liye.
inotifywait -m /home/user โ Directory me real-time changes monitor karne ke liye.
2. File Permissions & Ownership
chmod 400 private-key.pem โ File ko sirf read-only banane ke liye.
chown -R user:group folder/ โ Folder ka ownership change karne ke liye.
umask 027 โ Default permissions set karne ke liye.
setfacl -m u:username:rwx file โ Extra user ko file access dene ke liye.
getfacl file โ ACL permissions dekhne ke liye.
3. Process Management
ps aux –sort=-%mem | head โ Memory-consuming top processes dikhane ke liye.
pgrep apache โ Process ID dhoondhne ke liye.
pkill -9 process_name โ Process forcefully terminate karne ke liye.
nohup command & โ Process ko background me run karne ke liye.
strace -p PID โ Process ka system calls trace karne ke liye.
lsof -p PID โ Process ka open files dekhne ke liye.
uptime โ System uptime aur load average dikhata hai.
time command โ Command execution ka time calculate karta hai.
watch -n 1 free -m โ Memory usage real-time monitor karne ke liye.
nice -n 10 process_name โ Process priority change karne ke liye.
4. User Management
whoami โ Current user dekhne ke liye.
id username โ User ka UID, GID, aur groups dekhne ke liye.
groups username โ User ke groups dikhata hai.
useradd -m username โ Naya user create karne ke liye.
passwd username โ User ka password set karne ke liye.
usermod -aG sudo username โ User ko sudo access dene ke liye.
deluser username โ User delete karne ke liye.
last โ System pe login history dekhne ke liye.
who โ Logged-in users dikhane ke liye.
w โ Users ki activity aur system load dikhata hai.
5. Networking
ip a โ Network interfaces aur IPs dikhata hai.
ifconfig โ IP address aur network details (deprecated).
netstat -tulnp โ Listening ports aur running services dikhata hai.
ss -tulnp โ netstat ka faster alternative.
tcpdump -i eth0 โ Live network traffic capture karne ke liye.
traceroute google.com โ Network path trace karne ke liye.
mtr google.com โ Advanced network diagnostics.
dig google.com โ DNS records dikhata hai.
nslookup google.com โ DNS lookup karne ke liye.
curl -I google.com โ HTTP headers dikhane ke liye.
6. System Monitoring & Performance
top โ Real-time process monitoring.
htop โ top ka interactive version.
free -m โ RAM usage dikhane ke liye.
vmstat 1 โ CPU, memory, disk activity dikhata hai.
iostat -x 1 โ Disk I/O performance monitor karta hai.
iotop โ Real-time disk usage dekhne ke liye.
df -h โ Disk usage check karne ke liye.
du -sh /home/user โ Specific directory ka size dekhne ke liye.
uptime โ System running time dikhata hai.
sar -u 1 5 โ CPU usage monitor karne ke liye.
7. Security & Logs
sudo dmesg | tail โ Kernel logs dekhne ke liye.
journalctl -xe โ System logs aur errors check karne ke liye.
auth.log โ Authentication logs (/var/log/auth.log).
iptables -L โ Firewall rules dekhne ke liye.
fail2ban-client status โ Brute-force attack protection status dekhne ke liye.
auditctl -l โ Audit logs configure karne ke liye.
chkrootkit โ Rootkit detection ke liye.
rkhunter –check โ Rootkit scanning karne ke liye.
history | grep sudo โ Sudo commands ki history check karne ke liye.
passwd -l username โ User account disable karne ke liye.
8. Disk & File System Management
fdisk -l โ Disk partitions dikhane ke liye.
mkfs.ext4 /dev/sdb1 โ Partition format karne ke liye.
mount /dev/sdb1 /mnt โ Partition mount karne ke liye.
umount /mnt โ Partition unmount karne ke liye.
fsck /dev/sdb1 โ Filesystem errors check karne ke liye.
9. Archiving & Compression
tar -cvf archive.tar directory/ โ Folder ko .tar file me compress karne ke liye.
tar -xvf archive.tar โ .tar file extract karne ke liye.
gzip file.txt โ File compress karne ke liye.
gunzip file.txt.gz โ .gz file decompress karne ke liye.
zip -r archive.zip folder/ โ Zip archive banane ke liye.
unzip archive.zip โ Zip file extract karne ke liye.
10. Scripting & Automation
echo ‘command’ | at now +5 minutes โ 5 min baad command execute karne ke liye.
crontab -e โ Cron jobs set karne ke liye.
awk ‘{print $1}’ file.txt โ Column extract karne ke liye.
sed ‘s/old/new/g’ file.txt โ Text replace karne ke liye.