Linux, terminal and Git

Stage 2 · Lesson 1 of 9

Paths and moving around

Shell basics

Every file on a system sits in one big tree of folders that starts at /, called the root. A path is the address of a file in that tree. An starts from the root, such as /home/sara/code.

A relative path starts from the folder you are in now, such as code/app. A few shortcuts help: ~ means your , . means the current folder and .. means the folder above. Use pwd to print where you are, ls -la to list everything including , and cd to move.

cd - jumps back to where you were. Press Tab to finish file names for you, which prevents typos. Every later command, including the in the next topic, depends on knowing where you are.

Common traprunning a command in the wrong folder because you never checked.

A question to check yourself, an AI practice session and 2 cheat sheet entries come when you add the roadmap to your account. Add it

Resources for this stage

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

Mark this stage as not done?