Terminal basics: files, folders, and commands

This course is for anyone who has used a computer only through windows, menus, and buttons. No programming background is needed. By the end, you'll open your terminal, move between folders, look at files, copy and move them, run a small program, and recover confidently when a command goes wrong — all without touching a mouse.

By the end you'll be able to (course objectives):

  • Open the terminal app on your computer and read the prompt.
  • Navigate folders with pwd, ls, and cd using both absolute and relative paths.
  • Inspect files and folders with cat, less, file, and ls -l.
  • Create, move, copy, and delete files and folders with mkdir, mv, cp, and rm.
  • Run a command with arguments and flags, and find help with --help or man.
  • Interrupt a stuck command and recover from a wrong command without fear.

Prerequisites: None beyond everyday computer use. You should know how to open apps, save files, and click folders. If you have never opened a terminal, Lesson 1 starts there.

Practice environment: Your own terminal. This course has no embedded sandbox.

Lessons

#TopicYou'll learn
01Open the terminal and read the promptTerminal, shell, prompt, command
02Find where you are and move aroundpwd, ls, cd, working directory
03Use paths to reach any folderAbsolute path, relative path, ~, ..
04Look inside files and folderscat, less, file, ls -l
05Move, copy, create, and deletemv, cp, mkdir, rm
06Run programs safely and recover from mistakesArguments/flags, --help/man, Ctrl+C, error messages

Sources listed in sources.md.