Voiced by Amazon Polly |
Linux is a powerful and versatile operating system that powers everything from servers to smartphones. If you’re a student new to Linux, understanding basic commands is the first step toward becoming proficient in using this OS. In this blog, we’ll explore 50 essential Linux commands with simple explanations and examples to help you get started.
1. pwd
Print Working Directory: Displays the current directory.
1 2 3 |
$ pwd /home/student |
2. ls
List Directory Contents: Shows files and folders in a directory.
1 |
$ ls |
Documents Downloads Pictures
3. cd
Change Directory: Navigate between directories.
1 |
$ cd Downloads |
4. mkdir
Make Directory: Creates a new folder.
1 |
$ mkdir projects |
5. rmdir
Remove Directory: Deletes an empty folder.
1 |
$ rmdir projects |
6. touch
Create File: Creates an empty file.
1 |
$ touch file.txt |
7. rm
Remove File/Folder: Deletes files or directories.
1 2 3 |
$ rm file.txt $ rm -r folder_name |
8. cp
Copy Files/Directories: Copies files or directories.
1 2 3 |
$ cp file1.txt file2.txt $ cp -r dir1 dir2 |
9. mv
Move/Rename: Moves or renames files and folders.
1 2 3 |
$ mv file.txt new_name.txt $ mv file.txt /home/student/Documents |
10. cat
Concatenate and View Files: Displays file content.
1 |
$ cat file.txt Hello, Linux! |
11. nano
Edit Files: Opens a text file in the nano editor.
1 |
$ nano file.txt |
12. vi
Edit Files: Opens a text file in the vi editor.
1 |
$ vi file.txt |
13. echo
Display Text: Prints text or writes to a file.
1 2 3 |
$ echo "Hello, World!" $ echo "This is a test" > test.txt |
14. clear
Clear Terminal: Clears the terminal screen.
1 |
$ clear |
15. history
Command History: Shows a list of recently executed commands.
1 |
$ history |
16. find
Search for Files: Locates files in the system.
1 |
$ find /home -name file.txt |
17. grep
Search in Files: Searches for patterns in files.
1 |
$ grep "Linux" file.txt |
18. chmod
Change Permissions: Modifies file permissions.
1 |
$ chmod 755 file.txt |
19. chown
Change Ownership: Changes file ownership.
1 |
$ chown user:group file.txt |
20. man
Manual Pages: Displays command documentation.
1 |
$ man ls |
21. uname
System Information: Displays system details.
1 |
$ uname -a |
22. df
Disk Usage: Shows available and used disk space.
1 |
$ df -h |
23. du
Directory Usage: Displays the size of a directory.
1 |
$ du -sh folder_name |
24. top
Process Monitoring: Displays running processes.
1 |
$ top |
25. ps
Process Status: Lists active processes.
1 |
$ ps |
26. kill
Terminate Process: Stops a running process.
1 |
$ kill 1234 |
27. ping
Network Test: Checks connectivity to a host.
1 |
$ ping google.com |
28. curl
HTTP Requests: Fetches data from URLs.
1 |
$ curl https://example.com |
29. wget
Download Files: Downloads files from the internet.
1 |
$ wget https://example.com/file.zip |
30. zip
Compress Files: Creates a ZIP archive.
1 |
$ zip archive.zip file1.txt file2.txt |
31. unzip
Extract Files: Extracts a ZIP archive.
1 |
$ unzip archive.zip |
32. tar
Archive Files: Archives and extracts files.
1 2 3 |
$ tar -cvf archive.tar folder $ tar -xvf archive.tar |
33. df
Check Disk Space: Displays disk usage information.
1 |
$ df -h |
34. free
Check Memory: Shows RAM and swap usage.
1 |
$ free -h |
35. hostname
Display Hostname: Shows the system’s hostname.
1 |
$ hostname |
36. ifconfig
Network Configuration: Displays network settings.
1 |
$ ifconfig |
37. ssh
Secure Shell: Connects to a remote machine.
1 |
$ ssh <a href="mailto:user@192.168.1.1">user@192.168.1.1</a> |
38. scp
Secure Copy: Transfers files between machines.
1 |
$ scp file.txt user@192.168.1.1:/home/user |
39. passwd
Change Password: Updates the user password.
1 |
$ passwd |
40. whoami
Current User: Displays the current username.
1 |
$ whoami |
41. uptime
System Uptime: Shows how long the system has been running.
1 |
$ uptime |
42. shutdown
Power Off: Schedules a system shutdown.
1 |
$ shutdown -h now |
43. reboot
Restart System: Reboots the system.
1 |
$ reboot |
44. alias
Shortcut Commands: Creates a custom command alias.
1 |
$ alias ll='ls -la' |
45. unalias
Remove Alias: Deletes a custom alias.
1 |
$ unalias ll |
46. wc
Word Count: Counts words, lines, and characters in a file.
1 |
$ wc file.txt |
47. head
View File Start: Displays the first lines of a file.
1 |
$ head file.txt |
48. tail
View File End: Displays the last lines of a file.
1 |
$ tail file.txt |
49. sort
Sort Lines: Arranges lines in a file.
1 |
$ sort file.txt |
50. uniq
Remove Duplicates: Filters unique lines in a file.
1 |
$ uniq file.txt |
Freedom Month Sale — Upgrade Your Skills, Save Big!
- Up to 80% OFF AWS Courses
- Up to 30% OFF Microsoft Certs
Conclusion
By mastering these 50 Linux commands, can gain a strong foundation in Linux administration and usage. Practice regularly, Linux is a vast and powerful tool, and this list is just the beginning of your journey!
Freedom Month Sale — Discounts That Set You Free!
- Up to 80% OFF AWS Courses
- Up to 30% OFF Microsoft Certs
About CloudThat
CloudThat is an award-winning company and the first in India to offer cloud training and consulting services worldwide. As a Microsoft Solutions Partner, AWS Advanced Tier Training Partner, and Google Cloud Platform Partner, CloudThat has empowered over 850,000 professionals through 600+ cloud certifications winning global recognition for its training excellence including 20 MCT Trainers in Microsoft’s Global Top 100 and an impressive 12 awards in the last 8 years. CloudThat specializes in Cloud Migration, Data Platforms, DevOps, IoT, and cutting-edge technologies like Gen AI & AI/ML. It has delivered over 500 consulting projects for 250+ organizations in 30+ countries as it continues to empower professionals and enterprises to thrive in the digital-first world.

WRITTEN BY Martuj Nadaf
Comments