Linux commands are used to interact with the operating system through the terminal and perform tasks like file management, navigation, and system monitoring. Learning basic Linux commands helps beginners understand how Linux works and use it efficiently for daily tasks.
- Helps beginners understand and use the Linux terminal effectively
- Covers commonly used commands for files, directories, and system tasks
- Useful for students, developers, and system administrators
- Builds a strong foundation for advanced Linux and server management

If you're looking to set up your own Linux server to practice these commands or host projects, Hostingercan be a great option. Hostinger provides affordable VPS hosting plans with full Linux support, including popular distributions like Ubuntu, CentOS, and Debian. Its VPS hosting offers full root access, scalable resources, and high-performance servers, making it an excellent choice for both beginners and experienced developers looking for reliable and cost-effective hosting solutions.
25 essential and commonly used Linux commands to help beginners start working with Linux confidently.
1. ls
The ls command in Linux is used to list files and directories present in the current working directory.
- Displays files and folders in a directory.
- Helps users quickly understand directory contents.
Syntax:
ls [options] [directory]Example:
lsOutput:

- The ls command lists all the directories and files available in the current working directory.
2. pwd
The pwd command in Linux is used to display the present working directory.
- Shows the full path of the current directory.
- Helps users know their current location.
Syntax:
pwdExample:
pwdOutput:

- The pwd command prints the absolute path of the current working directory.
3. mkdir
The mkdir command in Linux is used to create new directories.
- Creates new folders in the file system.
- Helps organize files and directories.
Syntax:
mkdir directory_nameExample:
mkdir GeeksforGeeksOutput:

- The mkdir command creates a new directory named GeeksforGeeks.
4. cd
The cd command in Linux is used to change the current working directory.
- Allows navigation between directories.
- Moves the user to the home directory when used without arguments.
Syntax:
cd directory_nameExample:
cd GeeksforGeeksOutput:

- The cd command changes the current working directory to GeeksforGeeks.
5. rmdir
The rmdir command in Linux is used to delete empty directories.
- Removes directories that do not contain files.
- Helps clean up unused folders.
Syntax:
rmdir directory_nameExample:
rmdir TestFolderOutput:

- The rmdir command deletes the empty directory TestFolder.
6. cp
The cp command in Linux is used to copy files or directories.
- Copies files from one location to another.
- Useful for creating backups.
Syntax:
cp source destinationExample:
cp file1.txt file2.txtOutput:

- The cp command copies the contents of file1.txt into file2.txt.
7. mv
The mv command in Linux is used to move or rename files and directories.
- Renames files easily.
- Moves files between directories.
Syntax:
mv old_name new_nameExample:
mv old.txt new.txtOutput:

- The mv command renames the file old.txt to new.txt.
8. rm
The rm command in Linux is used to delete files permanently.
- Removes unwanted files.
- Frees disk space.
Syntax:
rm file_nameExample:
rm demo.txtOutput:

- The rm command deletes the file demo.txt.
9. uname
The uname command in Linux is used to display system information.
- Shows operating system details.
- Helps identify the system.
Syntax:
unameExample:
unameOutput:

- The uname command displays the operating system name.
10. locate
The locate command in Linux is used to find files using a database.
- Searches files quickly.
- Faster than manual searching.
Syntax:
locate file_nameExample:
locate demo.txtOutput:

- The locate command shows the path of the searched file.
11. touch
The touch command in Linux is used to create empty files.
- Creates new files instantly.
- Updates file timestamps.
Syntax:
touch file_nameExample:
touch test.txtOutput:

- The touch command creates an empty file named test.txt.
12. ln
The ln command in Linux is used to create links between files.
- Creates shortcuts to files.
- Supports hard and soft links.
Syntax:
ln -s source link_nameExample:
ln -s file1.txt link1.txtOutput:

- The ln command creates a symbolic link.
13. cat
The cat command in Linux is used to display file contents.
- Reads file content.
- Combines multiple files.
Syntax:
cat file_nameExample:
cat test.txtOutput:

- The cat command displays the content of the file.
14. clear
The clear command in Linux is used to clear the terminal screen.
- Removes previous outputs.
- Keeps the terminal clean.
Syntax:
clearExample:
clearOutput:

- The terminal screen is cleared.
15. ps
The ps command in Linux is used to display running processes.
- Shows active processes.
- Helps monitor system activity.
Syntax:
psExample:
psOutput:

- The ps command displays currently running processes.
16. man
The man command in Linux is used to display command manuals.
- Provides command documentation.
- Explains options and usage.
Syntax:
man command_nameExample:
man lsOutput:


- The manual page of the command is displayed.
17. grep
The grep command in Linux is used to search text patterns.
- Finds specific strings.
- Filters output.
Syntax:
grep "text" file_nameExample:
grep "Python" notes.txtOutput:

- The grep command displays matching lines.
18. echo
The echo command in Linux is used to display text in the terminal.
- Prints messages.
- Writes text into files.
Syntax:
echo "text"Example:
echo "Hello Linux"Output:

- The text is printed on the terminal.
19. wget
The wget command in Linux is used to download files from the internet.
- Downloads files via URL.
- Works in the background.
Syntax:
wget urlExample:
wget http://example.com/file.zip%3C/span>
Output:

- The file is downloaded successfully.
20. whoami
The whoami command in Linux is used to display the current user.
- Shows logged-in username.
- Useful in multi-user systems.
Syntax:
whoamiExample:
whoamiOutput:

- The current username is displayed.
21. sort
The sort command in Linux is used to sort file contents.
- Sorts data alphabetically.
- Supports numeric sorting.
Syntax:
sort file_nameExample:
sort test.txtOutput:

- The file content is displayed in sorted order.
22. cal
The cal command in Linux is used to display the calendar.
- Shows month calendar.
- Useful for date reference.
Syntax:
calExample:
calOutput:

The current month calendar is displayed.
23. whereis
The whereis command in Linux is used to locate command files.
- Shows binary location.
- Finds command paths.
Syntax:
whereis command_nameExample:
whereis lsOutput:

- The location of the command is displayed.
24. df
The df command in Linux is used to display disk space usage.
- Shows file system usage.
- Helps monitor storage.
Syntax:
df [options]Example:
df -hOutput:

- Disk usage details are displayed.
25. wc
The wc command in Linux is used to count words, lines, and characters.
- Counts file statistics.
- Useful for text analysis.
Syntax:
wc option file_nameExample:
wc -w test.txtOutput:

- The number of words in the file is displayed.