Linux is a powerhouse for anyone who loves flexibility and control.
But let’s face it: the terminal can be intimidating at first.
The good news? You don’t need to memorize thousands of commands to be productive.
Mastering a core set will make daily tasks—like managing files, installing software, or troubleshooting—much easier.
Here’s a rundown of 30 essential Linux commands, with a focus on real-world usefulness and clear, friendly explanations.
Table of Contents
- ls
- cd
- pwd
- mkdir
- rm
- cp
- mv
- touch
- cat
- less
- head
- tail
- grep
- find
- locate
- man
- chmod
- chown
- sudo
- ps
- kill
- top
- df
- du
- uname
- wget
- ssh
- history
- echo
- apt, yum, or pacman
List files and directories in your current location
Add -l for more details
Change the current directory
Print the current working directory—handy when you get lost in the filesystem
Create a new directory
Example: mkdir new_folder
Remove files or directories
Use with caution!
Add -r to delete directories
Copy files or directories.
Example: cp file.txt
Move or rename files and directories
Example: mv old.txt new.txt
Create an empty file or update the timestamp of an existing file
Display the contents of a file
Great for quickly reading small files
View large files one page at a time
Use q to quit
Show the first few lines of a file
Show the last few lines of a file
Add -f to watch a file update in real time
Search for text inside files. Example: grep "error" example.txt
Locate files and directories by name or other criteria
find [path] [options] [expression]
Quickly find files by name using a pre-built database
Read the manual page for any command
Example: man ls
Change file permissions Example: chmod +x script.sh
Change file or directory owner
Example: chown [options] new_owner[:new_group] file
Run commands as the superuser (admin) Example: sudo su
List running processes Add aux for a full list
Terminate a process by its ID. Example: kill 1234
Real-time view of running processes and system resource usage
Show disk space usage for all mounted filesystems
Show disk usage for files and directories
Example: du -sh
Display system information
Add -a for all details
Download files from the internet
Example: wget https://example.com/file.zip
Connect to remote machines securely
Example: ssh [email protected]
See a list of commands you’ve recently used
Print text to the terminal or write to files
Example: echo "Hello" hello.txt
Install, update, or remove software packages, depending on your Linux distribution.
Why These Commands Matter
Learning these commands will help you:
- Navigate and organize your files quickly
- Manage system resources and troubleshoot issues
- Automate repetitive tasks
- Install and update software
- Work confidently on remote servers
You don’t need to know every option right away—just start using these commands in your daily workflow, and you’ll pick up the details naturally.
And remember, if you ever get stuck, the man command is your best friend for looking up usage and options.
Happy exploring!