You're in the terminal, and something isn't working. Maybe a command is stuck. Maybe you typed something wrong and want to start over. Maybe you're not sure which folder you're in.
This reference helps you recover from common situations and navigate with confidence.
The terminal remembers your history and helps you avoid retyping. A few keyboard shortcuts let you work faster and recover from mistakes.
Your computer comes with a built-in terminal, but better options exist:
macOS:
- Built-in Terminal — Works fine to start
- iTerm2 — More features, split panes, better search
- Ghostty — Fast, modern, GPU-accelerated
Windows:
- WSL (Windows Subsystem for Linux) — Run a real Linux environment inside Windows. Recommended for the best compatibility with
tdxand developer tools.
Linux:
- Most distributions include excellent terminals by default
These three shortcuts handle most "I'm stuck" situations:
| Shortcut | When to Use It |
|---|---|
ctrl + c | Something is running and you want to stop it |
ctrl + k | Clear everything from cursor to end of line |
ctrl + l | The screen is cluttered and you want a fresh view |
up arrow | You want to repeat or edit your last command |
Mistyped something? These shortcuts let you fix it without retyping:
| Shortcut | What It Does |
|---|---|
ctrl + a | Jump to the beginning of the line |
ctrl + e | Jump to the end of the line |
ctrl + w | Delete the last word you typed |
ctrl + u | Clear everything you've typed |
| Shortcut | What It Does |
|---|---|
tab | Auto-complete a filename (type first few letters, then press tab) |
ctrl + r | Search your command history (start typing to find past commands) |
When you're disoriented, these commands help:
| Command | What It Tells You |
|---|---|
pwd | Your current location (which folder you're in) |
ls | What files and folders are here |
ls -la | Same, but with more detail (size, dates, hidden files) |
| Command | Where It Takes You |
|---|---|
cd foldername | Into a folder |
cd .. | Up one level (to the parent folder) |
cd ~ | Back to your home directory |
| Command | What It Does |
|---|---|
cat filename | Show the entire file contents |
less filename | View a long file (use arrow keys to scroll, q to quit) |
| Command | What It Does | Example |
|---|---|---|
cp | Copy a file | cp segment.yml backup.yml |
mv | Move or rename a file | mv draft.yml final.yml |
rm | Delete a file | rm old-segment.yml |
mkdir | Create a new folder | mkdir segments |
| Command | What It Does | Example |
|---|---|---|
grep | Find text inside files | grep "high-value" *.yml |
Any command will explain itself:
tdx --help # See all tdx commands
tdx sg --help # See segment commands
tdx journey --help # See journey commandsFor full details, see the Commands Reference.
| Command | What It Does |
|---|---|
tdx sg pull | Download segments from server |
tdx sg push | Upload your changes |
tdx sg validate | Check your YAML before pushing |
tdx journey pull | Download journeys from server |
tdx journey push | Upload journey changes |
tdx claude | Start AI assistant |
You now have a reference for recovering from common terminal situations. You don't need to memorize these—bookmark this page and return when you need it.
The terminal becomes familiar with practice. Each time you use tab to auto-complete or up arrow to recall a command, you're building muscle memory that makes the next task faster.