Fundamentals 9 min read

Essential Linux Command Cheat Sheet: 50 Must‑Know Commands for System Operations

This article provides a concise reference of 50 essential Linux commands covering file management, user administration, system monitoring, networking, permission handling, and editor shortcuts, offering clear examples and explanations for each command to help both beginners and seasoned administrators work efficiently.

Open Source Linux
Open Source Linux
Open Source Linux
Essential Linux Command Cheat Sheet: 50 Must‑Know Commands for System Operations

Essential Linux Command Cheat Sheet

1. Where is the file that stores user accounts? /etc/passwd 2. How to delete a non‑empty directory? rm -rf directory_name 3. Command to display the current working directory? pwd 4. Command to create a directory? mkdir 5. Command that shows one page at a time and keys for navigation?

more
Space: next page
B: previous page

6. Command to display the last 10 lines of a file? tail -n 10 filename 7. Command to return to the current user's home directory? cd ~ 8. Command to count the number of lines in a file? wc -l filename 9. Command to test network connectivity? ping 10. Directory where configuration files are stored? /etc 11. Directory for network‑interface configuration files? /etc/sysconfig/network-scripts 12. Command to force recursive deletion of a folder? rm -rf folder_name 13. Command to copy a file? cp -R source_file destination_file 14. Command to create a directory? mkdir directory_name 15. Create a new file, write "Tsinghua University" to it, then append "Computer Science and Technology".

touch file

echo "清华大学" > hello

echo "计算机科学与技术" >> hello

16. Command to view a file's content?

cat filename
more filename

17. Command to display the current system time? date 18. Command to reboot the system? reboot 19. Command to shut down the system?

halt -p
shutdown now

20. Difference between /sbin and /bin directories?

/bin contains essential system commands usable by all users, including root.

/sbin holds system‑admin commands ("s" for super) that normally require root privileges.

21. Home directory of the root user? /root 22. Meaning of cd .. in Linux?

It moves up one directory level.

23. Meaning of 2> 1> 2>&1 ?

1 is standard output
2 is error output
> redirects output
2>&1 merges error output into standard output

24. Purpose of the pipe symbol | ?

The pipe passes the output of the command on its left as input to the command on its right.

25. Command to create 100 files at once? touch file{1..100} 26. Find directories containing "bin" under the root directory? ls -l | grep bin 27. How many modes does the vi editor have?

vi has three basic modes: command mode, insert mode, and visual mode.

28. How to enter insert mode in vi? Press i 29. How to enter visual mode in vi? Press v 30. How to copy a line in vi? Press y 31. How to paste in vi? Press p 32. Delete lines 3 through 15 in vi? :3,15d 33. Command to create user zhangsan ? useradd zhangsan 34. Set password for zhangsan to 123456 ? passwd zhangsan123456 35. Command to delete a user? userdel username 36. Command to switch user? su username 37. Home directory of user zhangsan ? /home/zhangsan 38. Meaning of -rwxrwxrwx permissions?

Read, write, and execute permissions for owner, group, and others.

39. Meaning of drwx------ permissions?

Directory with read, write, and execute permissions only for the owner.

40. Change a directory's permissions to allow only the owner full access? chmod 700 directory_name 41. Create group super and add zhangsan to it?

groupadd super
usermod -g super zhangsan

42. As zhangsan , create /test and test1.txt , then change its owner to root:root ? chown root:root test1.txt 43. Command to view help for another command? man command_name 44. How to install software? yum install package_name 45. How to uninstall software? yum remove package_name 46. Purpose of the wget command?

Download files from the network.

47. Command to locate where an executable is installed? whereis command_name 48. Save and exit vi? :wq 49. Exit vi without saving? :q! 50. Command to view the current IP address?

ifconfig -a
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

System AdministrationBashcommands
Open Source Linux
Written by

Open Source Linux

Focused on sharing Linux/Unix content, covering fundamentals, system development, network programming, automation/operations, cloud computing, and related professional knowledge.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.