Go · Stage 0 – Before You Code · Lesson 4 of 64

Terminal and Basic Navigation

Open a terminal and learn the minimum navigation needed to create a Go project.

Windows: open Start, type PowerShell, and select it. macOS: press Command + Space, type Terminal, and press Return. Linux: search the app menu for Terminal.

Command

pwd
Line-by-line explanation
  1. pwd means “print working directory”.
  2. It displays the current folder’s full address.
Expected output
/home/maya

Windows PowerShell may display a path such as C:\Users\Maya.

Command

ls
Line-by-line explanation
  1. ls means list.
  2. It shows names inside the current directory.
Expected output
Desktop  Documents  Downloads

PowerShell, macOS, and Linux all understand ls. Your names will differ.

Command

cd Documents
Line-by-line explanation
  1. cd means change directory.
  2. The space separates the command from its destination.
  3. Documents is the folder to enter.
Expected output
(no output)

A successful directory change is normally silent. Run pwd separately to confirm.