0% found this document useful (0 votes)
17 views7 pages

Linux 100 Commands

This guide outlines 100 essential Linux commands for beginners, categorized for easy reference. Each command includes a brief description and usage examples, covering topics such as file management, system information, networking, and process management. It also provides practice suggestions, tips, and challenge tasks to help users build proficiency in using Linux commands.

Uploaded by

sopheaktun.tsp
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)
17 views7 pages

Linux 100 Commands

This guide outlines 100 essential Linux commands for beginners, categorized for easy reference. Each command includes a brief description and usage examples, covering topics such as file management, system information, networking, and process management. It also provides practice suggestions, tips, and challenge tasks to help users build proficiency in using Linux commands.

Uploaded by

sopheaktun.tsp
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

Practicing 100 Basic Linux Commands

July 14, 2025

Contents
1 Introduction 1

2 File and Directory Management 1

3 System Information 3

4 File Content Manipulation 4

5 Networking 4

6 Process Management 5

7 System Administration 5

8 Compression and Archiving 6

9 Miscellaneous 7

10 Practice Suggestions 7

11 Tips 7

12 Challenge Tasks 7

1 Introduction
This guide provides a comprehensive list of 100 essential Linux commands for beginners. Or-
ganized by category, each command includes a brief description and common usage examples.
Practice these commands in a Linux terminal (e.g., Ubuntu or CentOS) to build proficiency. Use
a virtual machine for safety, and refer to man pages (e.g., man ls) for detailed documentation.

2 File and Directory Management


1. pwd – Prints the current working directory.
Example: pwd
2. ls – Lists directory contents.
Example: ls -l (long format), ls -a (hidden files).

1
Basic Linux Commands Guide 2 of 7

3. cd – Changes directory.
Example: cd /etc, cd .., cd ˜.
4. mkdir – Creates a new directory.
Example: mkdir my_folder.
5. touch – Creates an empty file or updates timestamp.
Example: touch [Link].
6. cp – Copies files or directories.
Example: cp [Link] file_copy.txt, cp -r dir1 dir2.
7. mv – Moves or renames files/directories.
Example: mv [Link] new_file.txt.
8. rm – Removes files or directories.
Example: rm [Link], rm -r dir.
9. cat – Displays or concatenates file contents.
Example: cat [Link].
10. less – Views file contents page by page.
Example: less [Link].
11. more – Paginates file output.
Example: more [Link].
12. head – Shows the first 10 lines of a file.
Example: head -n 5 [Link].
13. tail – Shows the last 10 lines of a file.
Example: tail -f [Link].
14. nano – Simple terminal text editor.
Example: nano [Link].
15. vim – Advanced terminal text editor.
Example: vim [Link].
16. ln – Creates hard or symbolic links.
Example: ln -s [Link] [Link].
17. find – Searches for files/directories.
Example: find / -name "[Link]".
18. locate – Quickly finds files using a database.
Example: locate [Link].
19. du – Displays disk usage.
Example: du -h folder.
20. df – Shows disk space usage.
Example: df -h.
21. chmod – Changes file permissions.
Example: chmod 755 [Link].
22. chown – Changes file ownership.
Example: chown user:group [Link].
Basic Linux Commands Guide 3 of 7

23. wc – Counts lines, words, or characters.


Example: wc -l [Link].
24. tee – Writes to stdout and files.
Example: echo "test" | tee [Link].
25. stat – Shows detailed file status.
Example: stat [Link].

3 System Information
26. uname – Displays system information.
Example: uname -a.
27. whoami – Shows the current user.
Example: whoami.
28. id – Displays user and group IDs.
Example: id.
29. hostname – Shows or sets hostname.
Example: hostname.
30. uptime – Shows system uptime and load.
Example: uptime.
31. free – Displays memory usage.
Example: free -h.
32. top – Shows running processes (interactive).
Example: top.
33. htop – Enhanced process viewer.
Example: htop.
34. ps – Shows running processes.
Example: ps aux.
35. lscpu – Displays CPU information.
Example: lscpu.
36. lsblk – Lists block devices.
Example: lsblk.
37. dmidecode – Shows hardware info from BIOS.
Example: sudo dmidecode -t memory.
38. date – Displays or sets date/time.
Example: date.
39. cal – Displays a calendar.
Example: cal.
40. env – Displays environment variables.
Example: env.
Basic Linux Commands Guide 4 of 7

4 File Content Manipulation


41. echo – Prints text or writes to a file.
Example: echo "Hello" > [Link].
42. grep – Searches text patterns.
Example: grep "error" [Link].
43. sed – Stream editor for text transformation.
Example: sed ’s/old/new/g’ [Link].
44. awk – Processes text patterns.
Example: awk ’{print $1}’ [Link].
45. cut – Extracts sections from lines.
Example: cut -d’,’ -f1 [Link].
46. sort – Sorts lines in a file.
Example: sort [Link].
47. uniq – Removes duplicate lines.
Example: sort [Link] | uniq.
48. tr – Translates or deletes characters.
Example: echo "hello" | tr ’a-z’ ’A-Z’.
49. diff – Compares files line by line.
Example: diff [Link] [Link].
50. paste – Merges lines of files.
Example: paste [Link] [Link].

5 Networking
51. ping – Checks connectivity to a host.
Example: ping [Link].
52. curl – Transfers data from/to a server.
Example: curl [Link]
53. wget – Downloads files from the web.
Example: wget [Link]
54. netstat – Displays network connections.
Example: netstat -tuln.
55. ifconfig – Shows network interfaces (older systems).
Example: ifconfig.
56. ip – Manages network configuration.
Example: ip addr.
57. ss – Displays socket statistics.
Example: ss -tuln.
58. nslookup – Queries DNS information.
Example: nslookup [Link].
59. dig – Advanced DNS lookup tool.
Example: dig [Link].
Basic Linux Commands Guide 5 of 7

60. traceroute – Traces packet routes.


Example: traceroute [Link].
61. telnet – Tests connectivity to a host/port.
Example: telnet localhost 22.
62. scp – Securely copies files over SSH.
Example: scp [Link] user@remote:/path.
63. rsync – Syncs files/directories efficiently.
Example: rsync -av source/ destination/.
64. who – Shows logged-in users.
Example: who.
65. arp – Displays or modifies ARP cache.
Example: arp -a.

6 Process Management
66. kill – Terminates a process by PID.
Example: kill 1234.
67. killall – Terminates processes by name.
Example: killall firefox.
68. pkill – Kills processes by name or criteria.
Example: pkill -u user.
69. nice – Sets process priority.
Example: nice -n 10 command.
70. renice – Changes priority of running processes.
Example: renice 10 -p 1234.
71. jobs – Lists background jobs.
Example: jobs.
72. fg – Brings a background job to foreground.
Example: fg %1.
73. bg – Runs a stopped job in the background.
Example: bg %1.
74. nohup – Runs a command immune to hangups.
Example: nohup [Link] &.
75. watch – Runs a command repeatedly.
Example: watch -n 2 date.

7 System Administration
76. sudo – Executes a command as another user.
Example: sudo apt update.
77. su – Switches to another user or root.
Example: su -.
Basic Linux Commands Guide 6 of 7

78. passwd – Changes user password.


Example: passwd.
79. adduser – Adds a new user.
Example: sudo adduser newuser.
80. userdel – Deletes a user.
Example: sudo userdel user.
81. groupadd – Creates a new group.
Example: sudo groupadd mygroup.
82. usermod – Modifies user account.
Example: sudo usermod -aG group user.
83. reboot – Reboots the system.
Example: sudo reboot.
84. shutdown – Powers off or reboots the system.
Example: sudo shutdown -h now.
85. journalctl – Views system logs.
Example: journalctl -u ssh.

8 Compression and Archiving


86. tar – Archives files.
Example: tar -cvf [Link] folder.
87. gzip – Compresses files.
Example: gzip [Link].
88. gunzip – Decompresses .gz files.
Example: gunzip [Link].
89. zip – Creates a zip archive.
Example: zip [Link] [Link].
90. unzip – Extracts a zip archive.
Example: unzip [Link].
91. bzip2 – Compresses files (smaller than gzip).
Example: bzip2 [Link].
92. bunzip2 – Decompresses .bz2 files.
Example: bunzip2 [Link].bz2.
93. xz – Compresses files with high ratio.
Example: xz [Link].
94. unxz – Decompresses .xz files.
Example: unxz [Link].
95. zcat – Displays compressed file contents.
Example: zcat [Link].
Basic Linux Commands Guide 7 of 7

9 Miscellaneous
96. clear – Clears the terminal screen.
Example: clear.
97. history – Shows command history.
Example: history.
98. man – Displays manual pages.
Example: man ls.
99. which – Locates a command’s executable.
Example: which python3.
100. alias – Creates command shortcuts.
Example: alias ll=’ls -l’.

10 Practice Suggestions
• Beginner: Practice the first 25 commands. Create a directory, add files, copy/move
them, and delete them. Use man for details.
• Intermediate: Combine commands with pipes (|). Example: ls -l | grep txt or cat
[Link] | sort | uniq.
• Advanced: Write a script using nano or vim with grep, awk, or sed. Use chmod to make
it executable.

11 Tips
• Be cautious with rm, sudo, and chmod. Test in a virtual machine.
• Use tab completion to auto-complete commands or filenames.
• Refer to man or –help for command details.

12 Challenge Tasks
1. Create a directory test_lab, add three files, and compress them into a .[Link] archive.
2. Use grep to find "error" in a log file (e.g., /var/log/syslog).
3. Create an alias for ls -la and add it to /̃.bashrc.

You might also like