The Linux terminal is powerful. Whether you’re a beginner or aspiring sysadmin, knowing the right commands will save you time and frustration. These terminal commands for Linux help you navigate, manage files, install software, and control your system like a pro.
Here are 10 essential commands every Linux user should learn.
1. ls – List Directory Contents
This command lists files and folders in your current directory.
Common usage:
ls– Basic listls -l– Long format with detailsls -a– Includes hidden filesls -lh– Human-readable file sizes
It’s the most used command for exploring directories.
2. cd – Change Directory
Use cd to navigate between folders.
Examples:
cd /home/user/Documents– Go to Documentscd ..– Move one level upcd ~– Return to your home directory
Pro tip: Use Tab to auto-complete folder names.
3. pwd – Print Working Directory
Lost in the file system? pwd shows your current path.
Usage:
- Just type
pwdand press Enter - It will return something like
/home/username/Desktop
Great for scripting or debugging file paths.
4. mkdir – Make a Directory
Create new folders quickly.
Examples:
mkdir newfolder– Creates a single foldermkdir -p dir1/dir2– Creates nested folders
Perfect for organizing your workspace or project files.
5. rm – Remove Files or Directories
Delete files or folders with caution.
Examples:
rm file.txt– Deletes a filerm -r foldername– Deletes a folder and its contentsrm -rf /path/to/dir– Force delete (be careful!)
Tip: Always double-check before using rm -rf.
6. cp – Copy Files and Directories
Copying is essential for backups or moving files around.
Examples:
cp file.txt /home/user/Desktop/– Copy to Desktopcp -r folder1 folder2– Copy folders recursively
Use the -v flag to show detailed output.
7. mv – Move or Rename Files
Use mv to relocate files or rename them.
Examples:
mv old.txt new.txt– Renames a filemv file.txt /new/path/– Moves a file
Efficient for managing downloads, documents, or logs.
8. sudo – Run as Superuser
Many system-level commands require admin rights. Use sudo to run commands with elevated privileges.
Examples:
sudo apt update– Update package list (Debian-based distros)sudo reboot– Restart the system
Tip: You’ll need to enter your password the first time.
9. top – Monitor System Resources
This shows real-time CPU, RAM, and process usage.
Usage:
- Just type
topand press Enter - Use
qto quit
For a cleaner display, try htop if it’s installed.
10. man – Manual Pages for Commands
Every command in Linux has a manual. Use man to read it.
Examples:
man ls– View the manual forlsman mkdir– Learn options for creating folders
Press q to exit the manual view.
Bonus Tip: Combine Commands with Pipes and Redirection
Once you master basic commands, level up with pipes (|) and redirection (>).
Examples:
ls -l | grep "file"– Filter results usinggrepecho "Hello" > test.txt– Create or overwrite a file
These combos make your Linux skills truly powerful.
Learning these terminal commands for Linux gives you control over your system. You’ll troubleshoot faster, work more efficiently, and automate tasks. Whether you’re a developer, sysadmin, or just curious, the command line is where Linux truly shines.
Practice these daily, and soon they’ll feel like second nature.






