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.
chris@mochajava:~$ cd 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.
part 1: the first commands · more coming
cat start-here.md
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
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.
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.
/home/chris is your home directory — your personal corner of the tree. The shorthand for it is ~
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 -l gives the long view — permissions, owner, size, date. ls -a shows hidden files too (anything starting with a dot).
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 .. goes up. cd - goes back to wherever you just were. Plain cd always takes you home.
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.
for long files, use less instead — it lets you scroll (q to quit). cat dumps everything at once.
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.
make yourself a sandbox directory exactly like this, and do all your experimenting inside it.
man man
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 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.
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.