codingstairs
NotesEDULifeContact
⌕Search⌘K
koen

Navigation

  • Intro
  • Blog
  • Life

Get in touch

Send without signing in. Add your email if you'd like a reply.

  • Leave a message anonymously →
  • ✉ warragon112@gmail.com
  • KakaoTalk Open Chat ↗

© 2026 codingstairs

  • Notes
  • EDU
  • Search
  • Life
  • Contact
  • Legal
  • RSS
  • GitHub
Notes›environment

First day with the terminal

Published 2026-04-28· Updated 2026-05-18·0 views

First day with the terminal

This is a short orientation for someone opening a terminal for the first time. Each OS uses a different shell, so the same task uses slightly different commands. There is no need to memorize them — keep the table nearby and they settle into muscle memory through use.

1. Distinguishing terminal, shell, and console

  • Console — the device or its abstraction that displays input and output.
  • Terminal emulator — a graphical program that mimics a console as a window. macOS Terminal.app, iTerm2, Windows Terminal, GNOME Terminal.
  • Shell — the interpreter that takes typed commands and hands them to the OS. bash, zsh, PowerShell, cmd.

A shell runs inside a terminal emulator. Most people just call the whole thing "the terminal."

2. Where to open it

OS Terminal
macOS Cmd+Space → "Terminal" or "iTerm"
Windows Start menu → "Windows Terminal" or "PowerShell" or "cmd"
Linux (GNOME) Ctrl+Alt+T or Activities → Terminal

Windows Terminal is a host app that displays PowerShell, cmd, and WSL together as tabs. Bundled by default with Windows 11.

3. Checking position and moving

Shell Command Sample result
bash/zsh pwd /Users/alice/projects
PowerShell pwd (or Get-Location) C:\Users\alice\projects
cmd cd (no arg) C:\Users\alice\projects
Action bash/zsh PowerShell cmd
Into a sub-folder cd src cd src cd src
Up a folder cd .. cd .. cd ..
Home directory cd ~ or cd cd ~ or cd $HOME cd %USERPROFILE%
Absolute path cd /etc cd C:\Windows cd C:\Windows
Switch drive (n/a) cd D:\ D: then cd \work

In bash, cd - returns to the previous directory. PowerShell 7+ behaves the same.

4. Listing, clearing, viewing files

Shell Default Include hidden Detailed
bash/zsh ls ls -a ls -la
PowerShell ls ls -Force ls | Format-List
cmd dir dir /a dir /a /q

PowerShell's ls is an alias; the real cmdlet is Get-ChildItem. cmd has no ls.

Clearing the screen — clear (bash/zsh), cls (PowerShell, cmd), Ctrl+L (most).

Viewing file contents — cat file.txt (bash), Get-Content file.txt (PowerShell), type file.txt (cmd). For larger files use less (Unix) or more (Windows) to page.

5. Exiting and common keys

To exit — exit. Or:

  • bash, zsh, PowerShell — Ctrl+D (with empty input).
  • cmd — Ctrl+Z then Enter (rarely works).

Useful keys:

Action Key
Autocomplete Tab (single press: one candidate / double press: list candidates)
Previous command ↑
Next command ↓
Interrupt command Ctrl+C
End of input (EOF) Ctrl+D (Unix · PowerShell) / Ctrl+Z then Enter (cmd)
Beginning of line Ctrl+A
End of line Ctrl+E
Reverse search Ctrl+R (bash, zsh, PowerShell PSReadLine)

Ctrl+C sends SIGINT (interrupt) to the running process. When an interactive program (Python REPL, node, top) refuses to budge, this is the first key to try.

6. Side-by-side comparison

# bash · zsh
pwd
cd ~/projects
ls -la
cat README.md
# PowerShell
pwd
cd ~\projects
ls -Force
Get-Content README.md
:: cmd
cd
cd %USERPROFILE%\projects
dir /a
type README.md

7. A small practice flow

  1. Move to home directory — cd ~ (cmd: cd %USERPROFILE%).
  2. Make an empty folder — mkdir hello && cd hello.
  3. Make an empty file:
    • bash · zsh — touch a.txt.
    • PowerShell — New-Item a.txt -ItemType File.
    • cmd — type nul > a.txt.
  4. Check the listing — ls or dir.
  5. Step back up — cd ...
  6. Remove the folder:
    • bash · zsh — rm -rf hello.
    • PowerShell — Remove-Item hello -Recurse -Force.
    • cmd — rmdir /s /q hello.

rm -rf and Remove-Item -Recurse -Force delete permanently and immediately. They do not pass through the recycle bin. The first few days, double-checking the path is a safe habit.

8. Common pitfalls

A path with spaces — cd My Documents parses as two arguments and fails. Wrap in quotes: cd "My Documents".

Hidden files invisible — Finder on macOS hides them by default. ls -a (Unix) or ls -Force (PowerShell) is needed.

cd not crossing drives — in cmd and PowerShell 5.1, typing only a drive letter like D: jumps to that drive's last visited location.

Autocomplete misbehaving — a Korean IME can swallow some keys. Try in English mode.

Looking up a command — Unix man <cmd>, PowerShell Get-Help <cmdlet> or <cmdlet> -?, cmd <cmd> /?.

Closing thoughts

The terminal feels foreign at first, but once five commands (pwd, cd, ls, cat, mkdir) settle into your hands it becomes routine. Three keys give the largest efficiency boost: Tab autocomplete, ↑ previous command, Ctrl+C to interrupt. For irreversible commands like rm -rf, double-check the path during the first few days.

Next

  • data-formats
  • wsl2

The Missing Semester Shell Tools · Microsoft Windows Terminal · GNU Coreutils · PowerShell about_Command_Syntax · SS64 shell reference for reference.

More in environment

All in this category →
  • WSL2 — Linux on top of Windows
  • Data formats — JSON · YAML · TOML · XML
  • Text encoding and line endings
  • Markdown
  • Cross-platform scripts
  • cmd.exe and batch files