Table of Contents >> Show >> Hide
- Why the Linux terminal still matters
- How to read Linux command examples
- 25 basic Linux commands you’ll actually use
- 1. pwd – where am I?
- 2. ls – list files and folders
- 3. cd – change directory
- 4. mkdir – create a directory
- 5. rmdir – remove empty directories
- 6. touch – create empty files
- 7. cp – copy files and folders
- 8. mv – move or rename
- 9. rm – delete files (carefully!)
- 10. clear – clean up your screen
- 11. cat – view file contents quickly
- 12. less – scroll through long files
- 13. head – first lines of a file
- 14. tail – last lines of a file
- 15. grep – search inside text
- 16. find – search the filesystem
- 17. locate – fast file lookup
- 18. echo – print text or variables
- 19. man – read the manual
- 20. chmod – change permissions
- 21. chown – change file owner
- 22. ps – see running processes
- 23. top – live system monitor
- 24. kill – stop a process
- 25. sudo – do it with admin powers
- Putting these Linux commands together in real life
- Real-world experiences with basic Linux terminal commands
- Conclusion: start small, practice often
- SEO metadata
The Linux terminal looks scary until you realize it’s basically a very fast, very literal personal assistant.
You tell it what to do in tiny words called commands, and it does exactly thatno questions, no pop-ups, no “Are you sure?” (which is both wonderful and dangerous).
Whether you’re managing a server, tinkering with a Raspberry Pi, or just trying to feel like a movie hacker, learning a small set of
basic Linux terminal commands will make everything smoother. In this guide, we’ll walk through
25 essential Linux commands you’ll actually use, with practical examples and tips to help them stick in your memory.
Why the Linux terminal still matters
Modern Linux desktops are friendly, with app stores, file managers, and pretty icons. But under the hood, the
Linux command line is still the most powerful way to:
- Navigate and manage files faster than with a mouse
- Administer remote servers over SSH
- Automate repetitive tasks with scripts
- Troubleshoot when the GUI misbehaves (because it will, eventually)
The good news: you don’t need hundreds of commands. A couple dozen well-chosen ones cover 80–90% of everyday tasks.
How to read Linux command examples
In the examples below:
$means “run this as a regular user”#sometimes indicates a root (admin) command- Text in angle brackets like
<file>means “you replace this with your own value”
Ready? Open a terminal and follow alongyou’ll remember these commands better if you actually type them.
25 basic Linux commands you’ll actually use
1. pwd – where am I?
pwd stands for print working directory. It shows the full path of the directory you’re currently in.
This is especially helpful when you’ve been cd-ing around for a while and can’t remember where you landed.
2. ls – list files and folders
ls (“list”) shows what’s inside the current directory.
Useful variations:
ls -l– long format with permissions, sizes, datesls -a– includes hidden files (those starting with.)ls -lh– human-readable sizes like “2K”, “4M”
3. cd – change directory
cd moves you around the filesystem.
Combine pwd and cd and suddenly the file system stops feeling like a maze.
4. mkdir – create a directory
Need a new folder? Use mkdir (“make directory”).
The -p option creates parent directories as needed, so you don’t have to make them one by one.
5. rmdir – remove empty directories
rmdir removes a directory, but only if it’s empty.
If the directory has files in it, you’ll need rm -r (we’ll get to that) or clean it out first.
6. touch – create empty files
touch is the quickest way to create a new, empty file.
It can also update a file’s timestamp, which is handy in certain automation or build workflows.
7. cp – copy files and folders
cp copies files or directories.
The -r flag tells cp to copy directories recursively.
8. mv – move or rename
mv moves files, but it’s also how you rename them.
It’s simple and fast, but remember: if the destination exists, mv overwrites it without asking unless you use options like -i (interactive).
9. rm – delete files (carefully!)
rm permanently deletes files. There’s no recycle bin. No “undo.” Just deletion.
A safer habit is to use rm -i so it asks before each delete, at least while you’re still new to the Linux terminal.
10. clear – clean up your screen
When your terminal gets cluttered, clear wipes the visible text and gives you a fresh view.
It doesn’t delete history or files; it just scrolls the content out of view.
11. cat – view file contents quickly
cat (“concatenate”) is the fastest way to dump the contents of a small text file to your screen.
It’s perfect for short configs, logs, or quickly checking what’s inside a script.
12. less – scroll through long files
For bigger files, less is your friend. It lets you scroll, search, and move around.
Inside less:
Space– next pageb– previous page/word– search for “word”q– quit
13. head – first lines of a file
head shows the beginning of a file (10 lines by default).
Great for peeking at CSV headers, config files, or log formats.
14. tail – last lines of a file
tail shows the end of a file, which is usually where the newest log entries live.
The -f option “follows” the file live, updating as new lines are written. This is priceless for debugging services.
15. grep – search inside text
grep searches for patterns in text. Think of it as an ultra-fast “find in file.”
The -i flag makes searches case-insensitive. Combining grep with pipes is a core Linux skill.
16. find – search the filesystem
find looks for files and directories based on name, size, type, modification time, and more.
It’s more flexible than locate, but also slower because it searches the live filesystem.
17. locate – fast file lookup
locate uses a prebuilt database to quickly find files by name.
If you just installed something and locate can’t find it, try updating the database.
18. echo – print text or variables
echo simply prints whatever you give it. It’s more useful than it sounds.
You’ll see echo a lot in shell scripts to show progress or debug values.
19. man – read the manual
Stuck on what a command does? man (“manual”) is your built-in documentation.
Inside man, you can search with /word, scroll with arrow keys or space, and quit with q.
20. chmod – change permissions
chmod controls who can read, write, or execute a file.
The numeric form (like 755 or 644) is common on servers and in deployment instructions.
21. chown – change file owner
chown changes a file’s owner (and optionally group). You’ll usually need sudo for this.
This is crucial when dealing with web servers, shared folders, or files created by root that you want to manage as a normal user.
22. ps – see running processes
ps (“process status”) shows which programs are currently running.
The aux options show processes from all users, even those without a terminal attached.
23. top – live system monitor
top gives you a live, updating view of CPU, memory, and running processes.
Inside top, you can sort by CPU or memory, kill processes, and watch system load in real time. Many people install htop for a prettier version, but top is almost always available.
24. kill – stop a process
When a program stops responding, kill steps in to end it.
It’s better to try a gentle signal first (like the default or -15) before reaching for the nuclear -9.
25. sudo – do it with admin powers
sudo (“superuser do”) runs a command with elevated privileges. It’s how you install software, change system configs, or manage services on most modern distros.
You’ll usually be prompted for your password, and the command will be loggedso use sudo intentionally, not casually.
Putting these Linux commands together in real life
The magic of these Linux terminal commands isn’t in using them one by one, but in combining them into quick workflows.
Imagine you’re debugging a web app:
- You
cdinto the project directory and uselsto get your bearings. - You open logs with
tail -fand filter messages usinggrep "error". - You copy a config file with
cpbefore editing, just in case. - You use
ps aux | grep nginxandsudo systemctl restart(orkill) to restart services.
That entire workflow can take under a minute once these commands are muscle memory.
Real-world experiences with basic Linux terminal commands
If you talk to people who live in the Linux world every dayadmins, developers, DevOps engineersyou’ll hear the same story over and over:
these simple commands are the foundation everything else is built on. The “fancy” tools and frameworks eventually show up, but it’s the foundational
Linux command line skills that save the day when things break.
One common experience is jumping onto a production server over SSH and realizing there is no graphical interface, no file manager, and sometimes not even a text editor you recognize.
In those moments, comfort with commands like pwd, cd, ls, cat, less, and grep turns a stressful situation into something manageable.
You can quickly locate logs with find or locate, scan them for patterns with grep, and monitor live activity with tail -f and top.
Another very real experience: accidentally deleting something. Anyone who’s used rm long enough has a story about removing the wrong fileor worse, the wrong directory.
That’s why many power users train themselves to use safer patterns: for example, typing rm -i instead of plain rm, or using mv to move files into a “trash” directory first.
Over time, you learn to pause before hitting Enter, especially when executing a sudo command or anything involving rm -r.
People also discover how much faster routine tasks become with a little command-line confidence. Instead of opening a file manager, dragging and dropping folders, and waiting on animations,
you can use mkdir, cp, and mv in seconds. Need to create a whole project structure? A quick chain of mkdir -p and touch commands sets it all up.
Need to review several logs at once? tail, head, and less make it easy to jump in and out of files.
For many users, grep, find, and locate are the turning point where the Linux terminal stops feeling like a chore and starts feeling like a superpower.
Searching through thousands of lines of log output for a single keyword or timestamp becomes trivial. Instead of scrolling endlessly, you let the tools do the work.
That’s when you start to appreciate the Unix philosophy: small tools that do one thing well, combined to form powerful workflows.
Permissions commands like chmod and chown tend to show up in stories involving web servers, shared directories, or strange “Permission denied” errors.
At first they feel mysterious, but after a few real-world incidentslike a web app that can’t write to its own log directoryyou learn to inspect permissions with ls -l and adjust them thoughtfully.
Many users recall the “aha” moment when they finally understood that execute permission on a script (chmod +x script.sh) is what makes it run like a real command.
Newcomers also quickly learn that man pages are not optional. They’re built-in documentation that often explains not just what a command does, but how it behaves in edge cases and which options matter most.
Looking up man grep or man find a few times turns these tools from “mysterious incantations copied from Stack Overflow” into commands you actually understand.
Over time, these basic Linux commands become second nature. You stop thinking of them as separate tools and start thinking in workflows:
chain ps to grep to kill; combine find with exec or xargs; pair tail -f with grep while watching logs.
That’s when you realize you’re no longer just “using” Linuxyou’re really driving it.
Conclusion: start small, practice often
You don’t need to memorize every possible option for every command. Start with this core list of
25 basic Linux terminal commands, practice them as you work, and let repetition do the rest.
Before long, navigation, file management, process monitoring, and troubleshooting will feel natural at the command line.
Keep experimenting, stay curious, and remember: if you’re ever unsure what a command does, man is only a few keystrokes away.
