Linux, terminal and Git

Stage 2 of 8 · 9 lessons · ~3 weeks

Shell basics

Move around, create and change files, and connect commands with pipes and redirection. Learn how the shell expands patterns, quotes text and finds programs through PATH.

Start: Paths and moving around

Lessons· one lesson for each topic, in this order

  1. 1Paths and moving around
  2. 2Creating, copying, moving and deleting
  3. 3Wildcards and quoting
  4. 4Pipes: joining small tools
  5. 5Redirection and the three streams
  6. 6Environment variables
  7. 7PATH and "command not found"
  8. 8Startup files and aliases
  9. 9Editing files in the terminal: nano and Vim

Do this

  • Navigate only with `cd`, `ls` and tab completion for a week of normal work.
  • Create a project skeleton with one `mkdir -p` and brace expansion.
  • Build a three-step pipeline and check the output after each step.
  • Save a command's output and its errors to separate files, then to one file.
  • Inspect your PATH, find where three tools live with `which`, and explain the order.
  • Add two aliases and one export to your startup file and reload it.
  • Complete `vimtutor` once, and edit a file with nano.
  • Solve the first five levels of OverTheWire Bandit.

Start with· follow one of these

Practise

  • A game played over SSH where each level needs a new command, from `ls` to finding hidden files

Keep handy

  • Paste any command and see what each part does before you run it

  • Short, example-first help pages for common commands when a man page is too long

Also worth your time

Before moving on: A short log of 20 tasks you solved only in the terminal (creating a project skeleton, renaming files by pattern, saving a command's errors to a file, fixing a "command not found"), each with the command you used and what it did.

Tauseef's advice
Stay in the terminal for a week, even when clicking would be faster. Speed comes from repetition, not from memorising lists of commands. When a command surprises you, stop and find out why; that is where the real learning is.

Mark this stage as not done?