If you’re new to Linux, the terminal might feel a little intimidating at first—but once you learn a few key commands, you’ll wonder how you ever lived without it.
The terminal gives you speed, power, and control over your system that no graphical interface can match. Whether you’re managing files, monitoring processes, or installing software, the command line is where Linux really shines.
Let’s dive into 20 essential Linux commands every user—especially beginners—should know.
File and Directory Management
1. ls – List files and directories
ls
ls -l # Long format (details)
ls -a # Show hidden files
2. cd – Change directory
cd /home/username
cd .. # Go up one level
cd ~ # Go to your home directory
3. pwd – Print working directory
Shows the full path of your current location.
pwd
4. mkdir – Make a new directory
mkdir my_folder
5. rm – Remove files or directories
rm file.txt # Remove a file
rm -r my_folder # Remove a folder and its contents
Be careful! There’s no “undo” in the terminal.
6. cp – Copy files and directories
cp file.txt backup.txt
cp -r folder1/ folder2/
7. mv – Move or rename files
mv file.txt /new/location/
mv oldname.txt newname.txt
File Viewing and Editing
8. cat – View file contents
cat file.txt
9. less – Scroll through large files
less logfile.txt
Use q to quit, arrow keys to navigate.
10. nano – Simple text editor
nano file.txt
User-friendly, built-in, and perfect for quick edits.
Search and Navigation
11. find – Locate files
find /home -name “*.txt”
12. grep – Search inside files
grep “error” logfile.txt
grep -r “TODO” .
Searches for strings or patterns. Combine with find for even more power.
System Info and Monitoring
13. top – Real-time system monitor
top
Shows CPU, memory usage, and running processes. Press q to quit.
14. htop – Enhanced version of top (if installed)
sudo apt install htop
htop
More user-friendly and interactive.
15. df – Disk usage of file systems
df -h
Shows how much disk space is used/free in human-readable format.
16. free – Memory usage
free -h
Displays available and used RAM.
User and Permissions
17. whoami – Show current user
whoami
18. chmod – Change file permissions
chmod +x script.sh
chmod 755 myfile
Useful for making scripts executable or securing files.
19. chown – Change file ownership
sudo chown user:group file.txt
Often used when managing shared files or services.
Package Management (Ubuntu/Debian-based)
20. apt – Install, update, and remove software
sudo apt update
sudo apt install vlc
sudo apt remove firefox
Other distros use:
dnffor Fedorapacmanfor Arch
Bonus: Combine Commands with Pipes (|) and Redirection
You can chain commands for more power:
ps aux | grep firefox # Find running Firefox processes
du -sh * | sort -h # Show folder sizes, sorted
Redirect output to a file:
ls -l > filelist.txt
Mastering the terminal unlocks the full potential of Linux. Start small, experiment often, and don’t be afraid to make mistakes (just maybe avoid running rm -rf / 😅).
Whether you’re a developer, sysadmin, or casual user, these 20 commands will take you from beginner to confident Linux user in no time.
