Mamun Labs Learn
JourneyGlossary
esc
  • Try “map”, “flexbox” or “state”.
Log in
Start learning
Phase 0 · 3 / 6The terminal, step by step
Phase 0Getting started
6 topics · 1–2 wks
  1. 1What a computer actually does
  2. 2Files, folders and paths
  3. 3The terminal, step by step
  4. 4Set up VS Code and Node
  5. 5Git and GitHub basics
  6. 6Using AI as a study partner
JourneyPhase 0The terminal, step by step
01 / 08Overview

The terminal, step by step

You'll learn to move around folders and make new ones by typing commands in the terminal.

Why it mattersEvery tool you will use to build apps, like Node, Git and Expo, is started from the terminal.
about 2 h·needs: Files, folders and paths
02 / 08

Watch & read

Start with the required ones. The others are there when you need them.

Article
Command line basicsThe Odin Project · 20 min · English
MMamun's noteRead the lesson for the why and the tips on copy, paste and tab completion. It assumes macOS, Linux or WSL. On Windows, Git Bash works for everything in this phase.
Article
Navigating files and directoriesSoftware Carpentry · 30 min · English
MMamun's noteType every command yourself as you read. You can skip the long list of ls options and the man pages part.
Article
Working with files and directoriesSoftware Carpentry · 30 min · English
MMamun's noteRead creating folders and files, and moving and copying. Be careful with rm. The terminal has no recycle bin, so a deleted file is gone.
ArticleOptional
Course overview and the shell, lecture notesMIT Missing Semester · English
MMamun's noteRead only "Navigating in the shell". The rest, like pipes and sudo, is for later.
03 / 08

Explanation

You already move between folders by clicking. The terminal lets you do the same by typing short commands. It feels slow at first. Soon it is faster than clicking, and many developer tools only work here.

Think of it as talking to the computer through SMS instead of tapping buttons. You type one line, press Enter, and it replies. At every moment you are standing inside one folder, called the working directory. Every command works from there.

Five commands do most of the work:

pwd where am I?
ls what is in this folder?
cd projects go into the projects folder
cd .. go up one folder
mkdir notes make a new folder called notes
touch todo.txt make a new empty file

cd with no folder name takes you home. ~ is a short name for your home folder, so cd ~/projects works from anywhere.

On Windows, install Git for Windows and use Git Bash. Then every command on this page works the same. In PowerShell, pwd, ls, cd and mkdir also work, but touch does not: use New-Item todo.txt instead. The old Command Prompt uses dir instead of ls.

People often type cd notes while standing in the wrong folder. The terminal replies cd: no such file or directory: notes. It is not broken. It is telling you there is no folder called notes here. Run pwd and ls to see where you are and what is really there. Also check the spelling. On Linux and on most servers, capital letters matter too: Notes and notes are different.

When you read terminal commands in a tutorial, read them as "command, then what it acts on": mkdir notes is "make folder, called notes". Run pwd whenever you feel lost. It never changes anything.

Words to recognise
terminalcommandpwdlscdmkdirtouch..~working directory
04 / 08

Code tour

Click a line number with a ring to read the note for that line.

terminal7 notes
$ pwd
Mentor note · line 1
The $ is the prompt. You do not type it. pwd prints where you are: the home folder.
2/Users/rafi
$ ls
4Desktop Documents Downloads projects
5$ cd projects
$ mkdir notes
7$ cd notes
$ touch todo.txt
$ cd notes
cd: no such file or directory: notes
$ cd ..
12$ pwd
13/Users/rafi/projects
05 / 08

Quick check

3 questions. Each one explains itself after you answer.

  1. 1 / 3You are not sure which folder you are in. Which command tells you?
  2. 2 / 3You run cd projects and see no such file or directory: projects. What should you do first?
  3. 3 / 3You are in /Users/rafi/projects/notes. After cd .., where are you?
06 / 08

Explain it back

Only you can see this. Log in to keep it.0 words
07 / 08

How confident are you with The terminal, step by step?

08 / 08

Done

You can now
Open a terminal, find out where you are, move to any folder, make folders and files, and read a "No such file or directory" error.
Next: Set up VS Code and Node Back to Phase 0
On this page
  1. 01The terminal, step by step
  2. 02Watch & read
  3. 03Explanation
  4. 04Code tour
  5. 05Quick check
  6. 06Explain it back
  7. 07Confidence
  8. 08Done
Up next · 02 / 08Watch & read
Mamun Labs LearnFound a mistake on this page? Tell Mamun.
Mamun Labs Learn
JourneyGlossary
esc
  • Try “map”, “flexbox” or “state”.
Log in
Start learning
Log in to save your progress. Everything here works without an account.Log in to save progressLog in
Phase 0Getting started
6 topics · 1–2 wks
  1. 1What a computer actually does
  2. 2Files, folders and paths
  3. 3The terminal, step by step
  4. 4Set up VS Code and Node
  5. 5Git and GitHub basics
  6. 6Using AI as a study partner
JourneyPhase 0The terminal, step by step
01 / 08Overview

The terminal, step by step

You'll learn to move around folders and make new ones by typing commands in the terminal.

Why it mattersEvery tool you will use to build apps, like Node, Git and Expo, is started from the terminal.
about 2 h·needs: Files, folders and paths
02 / 08

Watch & read

Start with the required ones. The others are there when you need them.

Article
Command line basicsThe Odin Project · 20 min · English
MMamun's noteRead the lesson for the why and the tips on copy, paste and tab completion. It assumes macOS, Linux or WSL. On Windows, Git Bash works for everything in this phase.
Article
Navigating files and directoriesSoftware Carpentry · 30 min · English
MMamun's noteType every command yourself as you read. You can skip the long list of ls options and the man pages part.
Article
Working with files and directoriesSoftware Carpentry · 30 min · English
MMamun's noteRead creating folders and files, and moving and copying. Be careful with rm. The terminal has no recycle bin, so a deleted file is gone.
ArticleOptional
Course overview and the shell, lecture notesMIT Missing Semester · English
MMamun's noteRead only "Navigating in the shell". The rest, like pipes and sudo, is for later.
03 / 08

Explanation

You already move between folders by clicking. The terminal lets you do the same by typing short commands. It feels slow at first. Soon it is faster than clicking, and many developer tools only work here.

Think of it as talking to the computer through SMS instead of tapping buttons. You type one line, press Enter, and it replies. At every moment you are standing inside one folder, called the working directory. Every command works from there.

Five commands do most of the work:

pwd where am I?
ls what is in this folder?
cd projects go into the projects folder
cd .. go up one folder
mkdir notes make a new folder called notes
touch todo.txt make a new empty file

cd with no folder name takes you home. ~ is a short name for your home folder, so cd ~/projects works from anywhere.

On Windows, install Git for Windows and use Git Bash. Then every command on this page works the same. In PowerShell, pwd, ls, cd and mkdir also work, but touch does not: use New-Item todo.txt instead. The old Command Prompt uses dir instead of ls.

People often type cd notes while standing in the wrong folder. The terminal replies cd: no such file or directory: notes. It is not broken. It is telling you there is no folder called notes here. Run pwd and ls to see where you are and what is really there. Also check the spelling. On Linux and on most servers, capital letters matter too: Notes and notes are different.

When you read terminal commands in a tutorial, read them as "command, then what it acts on": mkdir notes is "make folder, called notes". Run pwd whenever you feel lost. It never changes anything.

Words to recognise
terminalcommandpwdlscdmkdirtouch..~working directory
04 / 08

Code tour

Click a line number with a ring to read the note for that line.

terminal7 notes
$ pwd
Mentor note · line 1
The $ is the prompt. You do not type it. pwd prints where you are: the home folder.
2/Users/rafi
$ ls
4Desktop Documents Downloads projects
5$ cd projects
$ mkdir notes
7$ cd notes
$ touch todo.txt
$ cd notes
cd: no such file or directory: notes
$ cd ..
12$ pwd
13/Users/rafi/projects
05 / 08

Quick check

3 questions. Each one explains itself after you answer.

  1. 1 / 3You are not sure which folder you are in. Which command tells you?
  2. 2 / 3You run cd projects and see no such file or directory: projects. What should you do first?
  3. 3 / 3You are in /Users/rafi/projects/notes. After cd .., where are you?
06 / 08

Explain it back

Only you can see this. Log in to keep it.0 words
07 / 08

How confident are you with The terminal, step by step?

08 / 08

Done

You can now
Open a terminal, find out where you are, move to any folder, make folders and files, and read a "No such file or directory" error.
Next: Set up VS Code and Node Back to Phase 0
On this page
  1. 01The terminal, step by step
  2. 02Watch & read
  3. 03Explanation
  4. 04Code tour
  5. 05Quick check
  6. 06Explain it back
  7. 07Confidence
  8. 08Done
Up next · 02 / 08Watch & read

You already move between folders by clicking. The terminal lets you do the same by typing short commands. It feels slow at first. Soon it is faster than clicking, and many developer tools only work here.

Think of it as talking to the computer through SMS instead of tapping buttons. You type one line, press Enter, and it replies. At every moment you are standing inside one folder, called the working directory. Every command works from there.

Five commands do most of the work:

pwd where am I?
ls what is in this folder?
cd projects go into the projects folder
cd .. go up one folder
mkdir notes make a new folder called notes
touch todo.txt make a new empty file

cd with no folder name takes you home. ~ is a short name for your home folder, so cd ~/projects works from anywhere.

On Windows, install Git for Windows and use Git Bash. Then every command on this page works the same. In PowerShell, pwd, ls, cd and mkdir also work, but touch does not: use New-Item todo.txt instead. The old Command Prompt uses dir instead of ls.

People often type cd notes while standing in the wrong folder. The terminal replies cd: no such file or directory: notes. It is not broken. It is telling you there is no folder called notes here. Run pwd and ls to see where you are and what is really there. Also check the spelling. On Linux and on most servers, capital letters matter too: Notes and notes are different.

When you read terminal commands in a tutorial, read them as "command, then what it acts on": mkdir notes is "make folder, called notes". Run pwd whenever you feel lost. It never changes anything.

Words to recognise
terminalcommandpwdlscdmkdirtouch..~working directory

You already move between folders by clicking. The terminal lets you do the same by typing short commands. It feels slow at first. Soon it is faster than clicking, and many developer tools only work here.

Think of it as talking to the computer through SMS instead of tapping buttons. You type one line, press Enter, and it replies. At every moment you are standing inside one folder, called the working directory. Every command works from there.

Five commands do most of the work:

pwd where am I?
ls what is in this folder?
cd projects go into the projects folder
cd .. go up one folder
mkdir notes make a new folder called notes
touch todo.txt make a new empty file

cd with no folder name takes you home. ~ is a short name for your home folder, so cd ~/projects works from anywhere.

On Windows, install Git for Windows and use Git Bash. Then every command on this page works the same. In PowerShell, pwd, ls, cd and mkdir also work, but touch does not: use New-Item todo.txt instead. The old Command Prompt uses dir instead of ls.

People often type cd notes while standing in the wrong folder. The terminal replies cd: no such file or directory: notes. It is not broken. It is telling you there is no folder called notes here. Run pwd and ls to see where you are and what is really there. Also check the spelling. On Linux and on most servers, capital letters matter too: Notes and notes are different.

When you read terminal commands in a tutorial, read them as "command, then what it acts on": mkdir notes is "make folder, called notes". Run pwd whenever you feel lost. It never changes anything.

Words to recognise
terminalcommandpwdlscdmkdirtouch..~working directory