TechWithAdi

Top 25 Linux Commands Every SysAdmin Should Know

Linux administration me command line sabse powerful tool hai. Is guide me 25 important commands ko explanation aur examples ke saath cover kiya gaya hai.

1. pwd

Current working directory dikhata hai.

pwd

2. ls

Files aur folders list karta hai.

ls -la

3. cd

Directory change karne ke liye.

cd /var/log

4. mkdir

Naya folder create karta hai.

mkdir backup

5. rm

Files ya folders delete karta hai.

rm -rf testdir

6. cp

Files copy karne ke liye.

cp file1 file2

7. mv

File rename ya move karne ke liye.

mv old.txt new.txt

8. cat

File content dekhne ke liye.

cat /etc/os-release

9. grep

Text search karne ke liye.

grep root /etc/passwd

10. find

Files search karne ke liye.

find / -name "*.log"

11. chmod

Permissions change karta hai.

chmod 755 script.sh

12. chown

Owner change karta hai.

chown user:user file.txt

13. df

Disk space usage check karne ke liye.

df -h

14. du

Directory size dekhne ke liye.

du -sh *

15. free

RAM usage check karta hai.

free -m

16. top

Live process monitoring.

top

17. ps

Running processes list karta hai.

ps aux

18. kill

Process terminate karta hai.

kill -9 PID

19. systemctl

Services manage karne ke liye.

systemctl status apache2

20. journalctl

System logs dekhne ke liye.

journalctl -xe

21. ss

Open ports aur sockets check karne ke liye.

ss -tulnp

22. ping

Network connectivity test.

ping google.com

23. curl

HTTP requests aur APIs test karne ke liye.

curl ifconfig.me

24. tar

Archive create karne ke liye.

tar -czvf backup.tar.gz folder

25. rsync

Backup aur synchronization ke liye.

rsync -av source/ destination/

FAQ

Kaunsi command sabse important hai? systemctl, grep, find, df aur journalctl.

SysAdmin ko kitni commands yaad honi chahiye? Daily use wali 20-30 commands kaafi hoti hain.

Conclusion

Ye 25 commands Linux administration ki foundation hain. In commands ko regular use karne se troubleshooting aur server management bahut aasaan ho jata hai.