Windows: open Start, type PowerShell, and select Windows PowerShell. macOS: press Command + Space, type Terminal, and press Return. Linux: search the application menu for Terminal; many desktops also use Ctrl + Alt + T.
Ask the terminal which folder you are currently inside:
pwdLine-by-line explanation
pwdmeans “print working directory”.- A directory is another word for a folder.
- The output is the full location of your current folder.
Windows PowerShell also understands pwd. Now list the current folder:
lsLine-by-line explanation
lsmeans “list”.- The output shows files and folders inside your current location.
Move into the Documents folder:
cd DocumentsLine-by-line explanation
cdmeans “change directory”.Documentsis the folder to enter.- A successful move normally produces no output.
Move back to the folder that contains it:
cd ..Line-by-line explanation
cdmeans change directory...is a special name meaning “the parent folder”.