$ /home/home/samnoteshello.txtplan.txthello.txttodo.txt/home/samhello.txthello.txt..
Folders: / and /home at the back, the trays /home/sam and notes in frontTiles on a tray: the files in that folderMovers: answers, a copy, the you-are-here marker and a path walkerThe terminal at the back left; the folder tree on the right and in front: / (the root), /home, your home folder /home/sam with its files, and the folder notes once mkdir has made it. The marker shows the working directory. Each command's effect moves on the table: answers fly to the terminal, a folder rises, a copy flies, the marker hops, a label changes, an empty file appears and is deleted, and a walker follows a full path from /. The figure's computer belongs to a user named sam, so the home folder is /home/sam. On your machine pwd prints your own home folder, and the prompt usually shows more (your name, the computer and the folder) before the $.

Looking around

  1. Folders (Linux calls them directories) hold files and other folders, in one tree that starts at /, the root. Your shell always stands in one folder, the working directory. pwd prints its full path: /home/sam, your home folder.

Changing things

Paths

What happens

;; step 1/10 · pwd
$ pwd   →  /home/sam
pwd   print working directory
/                the root: the top of the tree
└─ home          every user's home folder lives here
   └─ sam       your home folder  ← you are here
      └─ hello.txt

The figure's computer belongs to a user named sam, so the home folder is /home/sam. On your machine pwd prints your own home folder, and the prompt usually shows more (your name, the computer and the folder) before the $. Some desktops have a Trash or Bin, but that belongs to the file manager. rm in the terminal skips it: the file is gone. rm -r deletes a folder and everything inside it, so read the command twice before you press Enter.