Linux Terminal Basics: The Commands You Actually Need
The terminal looks intimidating at first, but a handful of concepts is enough to get around comfortably.
The terminal looks intimidating at first, but a handful of concepts is enough to get around comfortably.
Navigation
| Command | What it does |
|---|---|
pwd | Shows where you currently are |
ls | Lists the contents of the current folder |
cd folder | Enters that folder |
cd .. | Goes up one folder |
Files and folders
| Command | What it does |
|---|---|
mkdir name | Creates a new folder |
cp source destination | Copies a file |
mv source destination | Moves or renames |
rm file | Deletes (no recycle bin, be careful) |
Warning: rm deletes permanently, without going through any recycle bin — there's no "undo." Double-check the path and name before confirming.
The concept that helps most early on: relative vs. absolute paths
An absolute path starts from the root (/home/user/documents) and works no matter where you are. A relative path (documents) depends on which folder you're currently in — the same name can mean different things depending on where you type it from.
Tip: the Tab key autocompletes file and folder names as you type — it saves time and prevents typos, one of the most useful habits you can pick up from the start.
Frequently asked questions
Does rm have a recycle bin like Windows?
No, it deletes permanently and immediately — there's no way to undo it. Always double-check the path and name before confirming a deletion.
What's the difference between an absolute and a relative path?
The absolute path starts from the system root and works the same no matter where you are. The relative path depends on your current folder, so the same name can refer to different locations depending on where you type it from.