LESSON 2 of 5//Core Navigation
Understanding the prompt
The prompt is the text that appears before your cursor, waiting for you to type a command. It typically shows useful information about your current state — who you are, where you are, and what machine you're on.
Anatomy of a promptzsh // interactive
# A typical zsh prompt looks like:
username@MacBook-Pro ~ %
# username → your login name
# @MacBook → your computer's hostname
# ~ → current directory (~ means home)
# % → prompt character ($ in bash)
The tilde (~) is a shortcut that represents your home directory — typically /Users/yourname on macOS. When you see ~ in the prompt, you know you're in your home folder.
Finding out who and where you arezsh // interactive
➜~whoami
developer
➜~hostname
MacBook-Pro.local
➜~pwd
/Users/developer
Customize your prompt
You can customize your prompt by editing ~/.zshrc. Many developers use tools like Oh My Zsh or Starship to create informative, colorful prompts that show git branch, Node version, and more.
PRACTICE//Try the commands from this lesson
INTERACTIVE_TERMINAL//sandbox
Practice terminal — try the commands from this lesson!
Type 'help' for available commands. Tab completion not available in simulator.
Try: