chris@mochajava:~$ cd linux/

linux/

I learned this stuff from library books, thirty-some years ago, starting on an Amiga. You have it easier: the best manual ever written is already installed on your machine. This page gets you from "black box with a blinking cursor" to moving around like you live there — and then hands you the key to everything else.

cat start-here.md

The terminal isn't scary. It's honest.

Everything on a Linux system is reachable from a text prompt, and the prompt does exactly what you tell it — no more, no less. That honesty is the whole appeal. Learn six commands and you can navigate any Linux machine on Earth, from a Raspberry Pi to a server in a datacenter. Learn one more — the last one on this page — and you can teach yourself the rest forever.

Open a terminal and type along. You can't break anything with what's on this page — these commands look and move, they don't change or delete.

ls ~/first-commands

Six commands to start living here

whoami

who am I logged in as?

The simplest command on the system, and a fine first word to say to a computer. It prints your username — which matters more than you'd think, because who you are determines what you're allowed to touch.

whoami chris

pwd

print working directory — where am I?

The filesystem is a big tree of folders, and you are always standing somewhere in it. pwd tells you where. When you're lost — and everyone gets lost — this is how you get found.

pwd /home/chris

/home/chris is your home directory — your personal corner of the tree. The shorthand for it is ~

ls

list — what's here?

Shows what's in the directory you're standing in. This is the command you'll type more than any other for the rest of your life.

ls Documents Downloads Music Pictures projects ls -l drwxr-xr-x 2 chris chris 4096 Jul 3 09:15 Documents drwxr-xr-x 5 chris chris 4096 Jul 2 18:40 Music drwxr-xr-x 3 chris chris 4096 Jun 28 07:12 projects

ls -l gives the long view — permissions, owner, size, date. ls -a shows hidden files too (anything starting with a dot).

cd

change directory — go somewhere

Moves you around the tree. cd into a folder, look around with ls, repeat. That loop — cd, ls, cd, ls — is how you explore every Linux system you'll ever touch.

cd projects pwd /home/chris/projects cd ..  # up one level cd  # no argument = take me home pwd /home/chris

cd .. goes up. cd - goes back to wherever you just were. Plain cd always takes you home.

cat

show me what's inside a file

Prints a file's contents straight to the screen. Short for "concatenate," but nobody thinks of it that way — it's the let me see that command. Configs, logs, notes: cat it and read.

cat notes.txt remember: water the transplants buy more drip line fix the udev rule on the backup key

for long files, use less instead — it lets you scroll (q to quit). cat dumps everything at once.

mkdir

make a directory

Creates a new folder. Your first act of building instead of just looking — and completely safe, because an empty directory never hurt anyone.

mkdir sandbox cd sandbox pwd /home/chris/sandbox

make yourself a sandbox directory exactly like this, and do all your experimenting inside it.

man man

And now the one that matters most

Here's the thing nobody tells beginners, and the most underrated feature in all of Linux: the manual is built into the system. Every command on this page — every command on the machine — ships with its own documentation, installed right there next to it, readable offline, no browser, no search engine, no ads, no SEO sludge. One command opens it.

man

man ls gives you the complete manual for ls — every option, explained by the people who wrote it. man cat, man cd, man anything. Scroll with the arrow keys, search inside it by typing / followed by a word, quit with q.

man ls LS(1) User Commands LS(1) NAME ls - list directory contents SYNOPSIS ls [OPTION]... [FILE]... DESCRIPTION List information about the FILEs (the current directory by default)...

When in doubt — man to the rescue. I learned this system out of library books because that's what existed. You have the library inside the machine. Forty years of Unix wisdom, a keystroke away, and most people never open it. Don't be most people: before you search the web, before you ask an AI, type man and the name of the thing. Half the time the answer is in the first screen.

And when you don't know what command you even need: man -k searches the manuals by keyword. man -k rename — "what do I use to rename things?" — and the system tells you.

That's the real lesson of this page. The six commands get you moving. man makes you self-sufficient — and self-sufficient is the entire spirit of this operating system.