pwd
Prints the full path of the folder you're currently in, the fastest way to answer "where am I?"
Every standalone command from the Filesystem & Commands module, in one searchable page, what it does, how to type it, and a real example.
Moving around and managing folders in the filesystem.
pwd
Prints the full path of the folder you're currently in, the fastest way to answer "where am I?"
cd
Moves you into another folder. cd .. goes up one level, cd ~ or cd alone jumps home, cd - returns to where you just were.
ls
Lists what's inside a folder. Add -l for a detailed view (permissions, size, date) and -a to reveal hidden files too.
mkdir
Creates a new folder. The -p flag also creates any missing parent folders along the way, in one go.
rmdir
Deletes a folder, but only if it's completely empty. For a folder with files inside, use rm -r instead.
tree
Draws the folder structure as a visual branching tree instead of a flat list, the fastest way to see how everything connects.
Creating, copying, moving, deleting, and reading individual files.
touch
Creates a new, empty file instantly, or just refreshes its "last modified" timestamp if it already exists.
cp
Copies a file to a new location. Add -r to copy an entire folder, including everything inside it.
mv
Moves a file or folder to a new location, and it's also how you rename something, by "moving" it to a new name in the same place.
rm
Deletes a file permanently, there's no recycle bin. Add -r for folders, and -i to be asked "are you sure?" first.
ln
Creates a symbolic link: a shortcut that points to another file or folder, without duplicating it.
cat
Prints an entire file straight to the screen in one shot. Best for short files you want to see all at once.
less
Opens a long file for comfortable scrolling, one screen at a time. Use the arrow keys to move and q to quit.
head
Shows just the first lines of a file, 10 lines by default if you don't ask for a specific number.
tail
Shows the last lines of a file. The -f flag "follows" it live, printing new lines the instant they're written, great for watching a log in real time.
The everyday, absolute-basics commands you'll reach for constantly.
clear
Wipes everything off the screen so you're looking at a fresh, empty prompt. Nothing is actually deleted.
echo
Prints text back to the screen. Useful for quick checks, confirming a value, or leaving a message before a command runs.
date
Shows the current date and time according to the system clock.
exit
Closes the current terminal window, or logs you out of a remote machine you connected to with SSH.
history
Lists the commands you've run recently, so you can reuse a long one or double-check what you did earlier.
man
Opens the full manual page for a command, including every option it supports. Press q to close it.
whoami
Prints the username you're currently logged in as.
id
Shows your user ID, your group ID, and every group you belong to.
Finding files by name, or finding text inside them.
find
Searches for files and folders by name, type, or size, starting from wherever you point it.
locate
An almost instant file search that checks a prebuilt index rather than scanning the disk. Faster than find, but results can be slightly out of date.
grep
Searches inside file contents for matching text. -r checks every file in a folder, -i ignores upper/lowercase, -n shows line numbers.
which
Shows exactly which program will actually run when you type a given command name.
* matches any characters, ? matches exactly one, and [abc] matches one character from that set, e.g. *.log matches every file ending in .log.
Shaping raw text and logs into something useful.
cut
Pulls out one column from delimited text, like a single field from a CSV file.
sort
Puts lines of text in order. -n sorts numerically instead of alphabetically, and -r reverses the result.
uniq
Collapses repeated, side-by-side lines into one. Almost always paired after sort, since it only catches duplicates that are next to each other.
wc
Counts things in a file: -l for lines, -w for words, -c for characters.
sed
Finds and replaces text across a file, line by line, without ever opening an editor.
awk
Pulls out specific columns ("fields") from structured text, like grabbing just the IP address from every line of a log.
Who can read, write, or run a file, and who's allowed to act as who.
chmod
Changes who can read, write, or run a file. Use numbers (755) or letters (u+x adds execute for the owner).
chown
Changes which user and group own a file, useful after copying a file between accounts.
sudo
Runs just that one command with administrator (root) privileges. It asks for your own password, not root's.
su
Switches you to another user account, root by default, for the rest of the session, until you type exit.
passwd
Changes the password for your own account, or another account if you're running it as root.
adduser
Creates a brand-new user account, walking you through setting a password and basic details.
-rwxr-x---Seeing what's running, and stopping or backgrounding it.
ps
Takes a snapshot of every process currently running on the machine, with its process ID (PID), owner, and resource usage.
top
Opens a live, constantly refreshing view of CPU and memory usage per process. htop is a friendlier, color alternative if it's installed. Press q to quit.
kill
Stops a running process using its ID number. Plain kill asks it nicely to stop; -9 forces it to stop immediately.
jobs / fg / bg
Manage commands running in the background (started by adding & after them). jobs lists them, fg brings one back to the foreground, bg resumes a paused one.
Checking what you're working with: hardware, disk, and memory.
uname
Prints kernel version and system architecture details, useful for confirming exactly what you're running.
df
Shows how much disk space is used and free on each mounted filesystem, in easy-to-read sizes like GB and MB.
du
Shows how much disk space one specific file or folder is taking up.
free
Shows how much RAM and swap memory is currently used versus available.
hostname
Prints the name of the machine you're currently logged into.
uptime
Shows how long the system has been running since it was last rebooted.
Installing, updating, and removing software on Debian-based systems.
apt update
Refreshes the local list of available packages and their latest versions. Always run this first, before installing anything.
apt upgrade
Installs newer versions of any packages that already have an update waiting.
apt install
Installs a new tool or program by name, downloading everything it needs.
apt remove
Uninstalls a package. On other distros, the equivalents are dnf/yum (Fedora, RHEL) and pacman (Arch).
Checking connectivity and moving data to and from other machines.
ip a
Lists every network interface on the machine and the IP address assigned to each one.
ping
Checks whether another machine is reachable by sending it small test packets and timing the replies. Stop it with Ctrl+C.
curl / wget
Downloads or fetches a web resource straight from the terminal, no browser needed.
ssh
Opens a secure remote login session on another machine over the network.
scp
Copies files to or from a remote machine, using the same secure connection as SSH.
ss
Lists which network ports are currently open and listening on your machine.
Bundling files together, and verifying they weren't tampered with.
tar
Bundles a folder into a single archive (-c create, -x extract, -z gzip compression, -v show progress, -f filename).
zip / unzip
Extracts (or, with zip -r, creates) a .zip archive, the same format most operating systems use natively.
sha256sum
Generates a unique fingerprint for a file, so you can confirm a download hasn't been altered or corrupted in transit.
You'll type these constantly, but they aren't programs, you can't man them or find them on disk. They're symbols the shell itself understands, so they're kept separate from the searchable command list above.
&
command &, runs a command in the background, freeing up your prompt.
>
command > file, sends output into a file, overwriting anything already there.
>>
command >> file, appends output to the end of a file instead of overwriting it.
<
command < file, feeds a file in as input, instead of typing it by hand.
|
cmd1 | cmd2, sends one command's output straight into the next as its input.
No commands match your search. Try a different word, like copy, permissions, or network.