From "what's a terminal?" to daily superpowers
You already use Claude Code every day. But there's a whole world underneath it - the terminal - that you've been using without really understanding. This course fixes that, then shows you Claude Code features you didn't know existed.
/ is the root - the very top~ is shorthand for your home directory (/Users/halsarjant)/Users/halsarjant/hal-ea/manifest.md.claude/)$ pwd
/Users/halsarjant/hal-ea
pwd = "print working directory"~)pwd is your "you are here" marker$ cd hal-ea # go into a folder
$ cd .. # go up one level
$ cd ~ # go home
$ cd - # go back to where you just were
$ cd ~/Desktop # jump to an absolute path
cd = "change directory"cd domains/genh-opscd /Users/halsarjant/hal-ea.. means "parent directory" - go up one level~ means your home directory- means "the last directory I was in" - great for toggling between two places$ ls
domains/ inbox/ manifest.md learnings.md
$ ls -la
drwxr-xr-x 12 hal staff 384 Feb 27 09:30 .
drwxr-xr-x 93 hal staff 2976 Feb 27 09:30 ..
drwxr-xr-x 8 hal staff 256 Feb 27 09:30 .claude
drwxr-xr-x 4 hal staff 128 Feb 27 09:30 .git
-rw-r--r-- 1 hal staff 4521 Feb 27 09:30 manifest.md
ls = "list" - shows what's in the current directoryls -l = long format (permissions, size, dates)ls -a = show hidden files (starting with .)ls -la = both - the most useful combination- and can be combined- are short form: -l, -a-- are long form: --all, --longpwd$ mkdir my-project # create a directory
$ mkdir -p deep/nested/path # create nested dirs
$ touch notes.md # create an empty file
$ touch already-exists.md # updates timestamp if exists
mkdir = "make directory"-p flag creates parent directories too (very useful)touch creates a new empty file or updates the timestamp of an existing one$ cp file.md backup.md # copy a file
$ cp -r folder/ backup-folder/ # copy a directory (-r = recursive)
$ mv old-name.md new-name.md # rename a file
$ mv file.md ~/Desktop/ # move a file
$ rm unwanted.md # delete a file (no bin!)
$ rm -r old-folder/ # delete a directory
cp = copy, mv = move (also renames), rm = removerm is permanent - there is no recycle binrm commands, especially with -rrm with both -r and -f flags is the nuclear option - deletes everything, no questions asked. Be very careful.$ cat manifest.md # print entire file
$ head -20 manifest.md # first 20 lines
$ tail -10 manifest.md # last 10 lines
$ tail -f logfile.log # follow a file (live updates)
cat = concatenate (prints file contents to terminal)head = show the beginning of a filetail = show the end of a filetail -f is magic - it watches a file and shows new lines as they appearhead and tail are better than catRead tool instead of cat for better formatting$ grep "status: seed" domains/**/*.md
$ grep -r "broker" . # search recursively
$ grep -i "CLAUDE" settings.json # case-insensitive
$ grep -n "hook" settings.json # show line numbers
grep = "global regular expression print" (don't worry about the name)-r searches recursively through directories-i ignores case-n shows line numbers (very useful)Grep tool - faster and better formatted$ ls -la | grep ".md" # list only .md files
$ cat manifest.md | head -5 # first 5 lines of manifest
$ echo "hello" > file.txt # write to file (overwrites)
$ echo "more" >> file.txt # append to file
$ history | grep "git push" # find past commands
| (pipe) sends output of one command as input to the next> redirects output to a file (overwrites)>> appends to a fileclear)These work everywhere - terminal, Claude Code, any command line tool.
$ echo $HOME
/Users/halsarjant
$ echo $PATH
/usr/local/bin:/usr/bin:/bin:...
$ export MY_VAR="hello"
$ echo $MY_VAR
hello
$HOME is your home directory, $PATH is where your system looks for commandsexport sets a variable for the current sessionCLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS$ Ctrl+C # kill the running command
$ Ctrl+Z # pause (suspend) the command
$ fg # resume the paused command
$ bg # resume it in the background
$ jobs # list paused/background jobs
Ctrl+C is the emergency stop - use it when anything hangsCtrl+Z pauses rather than kills - useful for temporarily switching tasksCtrl+C first, then Ctrl+Zjobs shows what's running or paused in the background$ git status # what's changed?
$ git log --oneline -5 # recent history
$ git diff # see exact changes
$ git add file.md # stage a file for commit
$ git commit -m "message" # save a snapshot
$ git push # sync to GitHub
git status is your "what's happening?" commandgit add says "I want to include these changes in my next save"git commit creates the save point with a descriptiongit push uploads your saves to the cloud (GitHub)git log shows your save history - try it on the EA repo1. What command shows your current directory?
2. What does cd .. do?
3. What does the -a flag do in ls -la?
4. What happens when you rm a file?
5. What does the pipe | do?
6. What does git status show you?
7. What does Ctrl+C do in the terminal?
Module 2
Your terminal can do much more than run one command at a time. cmux turns Ghostty into a multi-pane powerhouse with an embedded browser.
$ cmux new-split right # split right
$ cmux new-split left # split left
$ cmux new-split up # split above
$ cmux new-split down # split below
--json flag returns the surface ID for scripting# What happens when you type: md /path/to/file.md
surface=$(cmux new-split right --json 2>&1 | awk '{print $2}')
cmux send --surface "$surface" "glow -p '/path/to/file.md'; exit"
cmux send-key --surface "$surface" Enter
cmux new-split right --json - creates a pane, returns the surface IDawk '{print $2}' - extracts the ID from the JSON outputcmux send - types a command into that paneglow -p - renders markdown beautifully (then exits);exit closes the pane when you quit glow# Type a command into a specific pane
$ cmux send --surface "$surface" "npm run dev"
# Press Enter in that pane
$ cmux send-key --surface "$surface" Enter
# Close a pane
$ cmux close-surface --surface "$surface"
cmux send types text into a pane (like a ghost typist)cmux send-key sends special keys (Enter, Tab, Escape, etc.)cmux close-surface closes a specific pane$ cmux browser open https://example.com
$ cmux browser navigate <url> --surface <id>
$ cmux browser snapshot --interactive --surface <id>
$ cmux browser get text "h1" --surface <id>
# Fill a form field
$ cmux browser fill "input[name=email]" "hal@genh.co" --surface <id>
# Click a button
$ cmux browser click "button.submit" --surface <id>
# Run JavaScript
$ cmux browser eval "document.title" --surface <id>
# Get the current URL
$ cmux browser get url --surface <id>
fill types into form inputs using CSS selectorsclick clicks elementseval runs arbitrary JavaScriptget text, get html, get url read page contentsnapshot --interactive shows the DOM tree for finding selectors$ cmux notify "Deploy complete!" # system notification
$ cmux set-status "Building..." # status bar message
$ cmux list-surfaces # see all open panes
$ cmux focus --surface "$id" # switch to a pane
cmux notify sends a macOS system notification - useful for long taskscmux set-status updates the text in Ghostty's status barcmux list-surfaces shows all your open panes and their IDscmux set-status1. What does cmux new-split right do?
2. Why use CSS selectors instead of ref IDs with cmux browser?
3. What does cmux send --surface "$id" "ls" do?
4. How do you close a cmux browser pane?
Module 3
You use Claude Code daily. Now learn the configuration, hooks, skills, and systems that make it truly yours.
CLAUDE.md is your global personality filesettings.json is the control panel# Global Instructions
## Terminal Environment
Hal uses Ghostty with cmux (not tmux).
Never use `tmux` - it's not installed.
Never try `ghostty` CLI for tab/pane management
- use `cmux`.
CLAUDE.md in its root~/.claude/CLAUDE.md applies to ALL projects (global)~/.claude/CLAUDE.md - applies everywhere./CLAUDE.md - applies to that repo onlysettings.json under the "hooks" keyYou have two SessionStart hooks:
gsd-check-update.jssession-handoff.js.claude/handoff.md or project memory/clear boundariesYou have one UserPromptSubmit hook:
claudeception-activator.sh/claudeception skill to extract and save it.You have two PreToolUse hooks:
You have one PostToolUse hook:
gsd-context-monitor.jssettings.json under "statusLine"gsd-statusline.js which shows:
/context-handoff saves your current state to a file/clear resets the conversation# Terminal crashed? Accidentally closed the window?
$ claude --resume # or just: claude -r
# Picks up your last conversation exactly where it stopped
$ claude --resume --list # see recent sessions to choose from
/resume is your safety net when things go wrongclaude --resume brings everything back/resume recovers the actual session, handoffs transfer context to a fresh sessionclaude --resume~/.claude/commands/
├── brainstorm.md → /brainstorm
├── deploy-cloudflare.md → /deploy-cloudflare
├── surge.md → /surge
├── bi-analysis.md → /bi-analysis
├── bi-consolidate.md → /bi-consolidate
├── funder-report.md → /funder-report
└── gsd/ → /gsd:*
.md file in ~/.claude/commands/ becomes a slash commanddeploy-cloudflare.md → /deploy-cloudflaregsd/progress.md → /gsd:progress/deploy-cloudflare path/to/file.html~/.claude/skills/ (18 skills)
├── claudeception/ # Self-learning system
├── frontend-design/ # UI design skill
├── frontend-slides/ # Presentation builder
├── cmux-browser-automation/
├── context-handoff/
├── paper/ # ExCo paper writer
├── bi-analysis-workflow/
├── cli-hanging-in-claude-code/
├── swiftui-* # 4 SwiftUI bug skills
└── ...
SKILL.md with detailed instructionscli-hanging-in-claude-code skill"permissions": {
"allow": [
"Bash(git pull *)",
"Bash(git add *)",
"Bash(git commit *)",
"Bash(git push *)",
"Bash(ls *)",
"Skill(claudeception)",
"Skill(context-handoff)"
],
"defaultMode": "default"
}
"allow" list: these actions run automatically*: Bash(git *) allows all git commandssettings.local.json for machine-specific overrides// ~/.claude/.mcp.json
{
"mcpServers": {
"context7": {
"command": "npx",
"args": ["-y", "@upstash/context7-mcp"]
}
}
}
Each works independently, reports back
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS in your settings~/.claude/projects/-Users-halsarjant-hal-ea/
└── memory/
└── MEMORY.md # Persists across sessions
MEMORY.md is loaded at the start of every conversation1. What is CLAUDE.md for?
2. What does the claudeception hook do?
3. When does the session-handoff hook fire?
4. What is an MCP server?
5. How do custom commands work?
6. What does the GSD system do?
Module 4
Putting it all together. Terminal, cmux, Claude Code, and your custom systems working as one integrated workflow.
Real example: deploying a presentation
Open a second pane (cmux new-split right) and try these:
cd ~/hal-ea && ls -la
cd domains && ls
cd .. && pwd
grep -r "status: seed" domains/
grep -rn "broker" domains/ | head -5
git log --oneline -10
git status
git diff --stat HEAD~1
ls -la ~/.claude/
cat ~/.claude/CLAUDE.md | head -20
ls ~/.claude/skills/
Each takes under a minute. If you can do all four, you've got the fundamentals.
Common errors and what they mean:
| Error | What it means | Fix |
|---|---|---|
command not found | The command isn't installed or isn't in your PATH | Check spelling, or install it |
permission denied | You don't have access to that file/folder | Check with ls -la, might need chmod |
No such file or directory | The path is wrong | Check with pwd and ls |
fatal: not a git repository | You're not inside a git repo | cd to the right folder |
Connection refused | The service/server isn't running | Check if the dev server is up |
The terminal almost always tells you what's wrong - read the error message first before trying random fixes.
| Command | What it does |
|---|---|
pwd | Where am I? |
cd path | Go somewhere |
cd .. | Go up one level |
ls -la | List everything |
mkdir -p | Create directories |
grep -r "text" . | Search files |
cmd1 | cmd2 | Pipe output |
| Tab | Auto-complete |
| Up arrow | Previous command |
| Command | What it does |
|---|---|
git status | What's changed? |
git log --oneline -5 | Recent commits |
git diff | See changes |
git add && git commit | Save a snapshot |
git push | Sync to remote |
| Command | What it does |
|---|---|
cmux new-split right | Split pane |
cmux browser open URL | Open browser |
cmux notify "msg" | Send notification |
| Command | What it does |
|---|---|
/commands | List available commands |
/clear | Reset conversation |
/context-handoff | Save state for next session |
| Ctrl+C | Cancel current operation |
| Command | What it does |
|---|---|
| Ctrl+C | Kill current command |
Ctrl+Z then fg | Pause and resume |
claude --resume | Recover crashed session |
/context-handoff + /clear | Fresh context |
1. You're in /Users/hal/projects/ and want to get to /Users/hal/. What command?
2. What's the difference between > and >>?
3. You want to find all files containing "broker" in the current directory and below. Which command?
4. What makes cmux's CSS selectors more reliable than ref IDs for browser automation?
5. Where do global Claude Code instructions go?
6. What triggers the claudeception skill to extract knowledge?
7. You've been working for 2 hours and context is getting full. What's the workflow?
8. What's the relationship between commands and skills?
9. A PreToolUse hook can:
10. What does cmux send --surface "$id" "npm run dev" do?
11. You're running a long command and need to do something else quickly. What's the best approach?
12. After pushing a commit from Claude Code, you want to see what just changed. What command?
You made it.
You now understand the terminal foundations underneath Claude Code, how cmux extends your workspace, and the hooks, skills, commands, and systems that make Claude Code truly yours.
The best way to learn is to use it. Open Ghostty, start typing, and build the muscle memory. Every command you learn removes one more barrier between your ideas and their execution.