Setting up the terminal
The terminal is a window where you type commands instead of clicking. Here you need it for one thing: running an agent, Claude Code or Codex, inside a folder on your computer. Setup takes about fifteen minutes. The labs are demonstrated, so you don’t need any of this to follow them.
Last verified November 4, 2026, against each company’s own instructions.
Before you start
Pick a tool your plan and your data allow.
- Codex needs ChatGPT Plus ($20 a month) or higher, or an MSU ChatGPT Edu seat. On an Edu seat, MSU allows research data up to confidential, with MSU IT approval. On a personal plan, use public data only. ChatGPT Free and Go get Codex only inside the ChatGPT desktop app, as OpenAI rolls it out.
- Claude Code needs Claude Pro ($20 a month) or higher. The free plan doesn’t include it. Claude isn’t approved at MSU yet, so use public data only.
The full rules, tool by tool, are on Choosing a tool.
You may not need the terminal at all. Both agents also run in an ordinary app window: the Code tab in the Claude desktop app, and Codex mode in the ChatGPT desktop app. They do nearly everything the terminal does. What the terminal adds is running the same task over and over by itself.
1. Open the terminal
| Mac | Windows | |
|---|---|---|
| Open it | Press Cmd+Space, type Terminal, and press Return. It’s also in Applications, then Utilities. | Right-click the Start button (or press Win+X) and choose Terminal. On Windows 10, choose Windows PowerShell, not the one marked (x86). |
| What you’ll see | A line ending in % and a blinking cursor. | A line starting with PS. That’s PowerShell, which is what you want. |
| Where it starts | Your home folder, /Users/yourname | Your home folder, C:\Users\yourname |
2. The commands you need
Type a command, then press Return or Enter. Most are the same on both.
| What it does | Mac | Windows |
|---|---|---|
| Show where you are | pwd | pwd |
| List what’s here | ls | ls |
| Go into a folder | cd Documents | cd Documents |
| Go up one level | cd .. | cd .. |
| Make a folder | mkdir agent-test | mkdir agent-test |
| Open this folder in a normal window | open . | explorer . |
| Clear the screen | clear or Cmd+K | cls |
| Stop whatever is running | Ctrl+C | Ctrl+C |
| Bring back an earlier command | Up arrow | Up arrow |
| Finish a long name for you | Tab | Tab |
| Get a folder’s full path | Drag the folder from Finder into the terminal window. | Shift+right-click the folder, choose Copy as path, then paste. |
To go to a folder you can see on screen, type cd and a space, drag the folder in (Mac) or paste its path (Windows), and press Return.
3. Install the agent
Copy one command into the terminal and press Return. Install whichever tool you’ll use, or both. Each command is the company’s own.
Codex
Mac:
curl -fsSL https://chatgpt.com/codex/install.sh | sh
Windows, in PowerShell:
powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex"
Claude Code
Mac:
curl -fsSL https://claude.ai/install.sh | bash
Windows, in PowerShell:
irm https://claude.ai/install.ps1 | iex
On Windows, Anthropic also recommends installing Git for Windows, which lets Claude Code use the same command tools it uses on a Mac. Without it, Claude Code works through PowerShell.
Check that it worked
Close the terminal, open a new one, and type codex --version or claude --version. A version number means it’s installed.
4. Sign in and try it
Make a practice folder, go into it, and start the agent. The first time, a browser window opens so you can sign in with your ChatGPT or Claude account. With an Edu seat, sign in with the MSU account that has the seat.
mkdir agent-test
cd agent-test
codex
Type claude instead of codex for Claude Code. Then ask for something small in plain English, for example:
Make a file called notes.md with three ideas for organizing a literature review.
The agent shows each step as it works. If it asks for permission, read what it wants to do before you approve it. Press Esc to stop it at any point, and type /exit to leave. Then run open . or explorer . to see the file it made.
For the commands inside each agent, see Claude Code and Codex, side by side.
If something goes wrong
| What you see | What to do |
|---|---|
Mac: command not found after installing | Close the terminal and open a new one. If Claude Code still isn’t found, run this line, then open a new terminal: |
| Mac: a window asks to install command line developer tools | Click Install. These are Apple’s free developer tools, and the agents use them. It takes a few minutes. |
| Windows: running scripts is disabled on this system | Run this, answer Y, and try again: |
| Windows: an error about 32-bit | You opened Windows PowerShell (x86). Close it and open Terminal, or Windows PowerShell without (x86). |
Optional add-ons
None of these is needed. Each one fixes a particular annoyance.
A nicer terminal
- Warp (Mac, Windows, Linux). A modern terminal where you can click to move the cursor, select text like a document, and read output in blocks. It has its own AI features too. Free, and an account is optional.
- iTerm2 (Mac). The long-standing favorite, with split panes and tabs. Free.
- Ghostty (Mac). Fast and minimal. Free. No Windows version.
- Windows Terminal (Windows). Built into Windows 11, and free from the Microsoft Store on Windows 10. It’s good enough for most people.
An editor alongside
- VS Code (Mac, Windows, free) shows your files, a terminal (Ctrl+`), and a side panel for either agent. Add the Claude Code or Codex extension from its Extensions view. The Claude Code extension needs a paid Claude plan.
Talking instead of typing
Good prompts are long and specific, and they’re faster to say than to type.
- Mac Dictation. Turn it on in System Settings, then Keyboard, then Dictation. Start it with the Microphone key or the shortcut shown there. Free.
- Windows voice typing. Press Win+H. Free, and needs an internet connection.
- Wispr Flow and Superwhisper (Mac, Windows). More accurate dictation apps with free tiers, and paid plans around $10 to $15 a month.
Reading the files agents write
Agents often write Markdown files (ending in .md): plain text with headings and bullets. Obsidian (free) and Typora ($14.99 once) show them formatted. In VS Code, press Shift+Cmd+V (Mac) or Ctrl+Shift+V (Windows) for a preview.
An undo button: Git
Git saves snapshots of a folder, so you can roll back anything an agent changed. OpenAI’s advice is to save a snapshot before and after each task. GitHub Desktop (Mac, Windows, free, no account needed) does it with buttons. Codex also behaves differently in a Git folder: it can edit files there, while in other folders it starts out read-only.
Installing other tools
Homebrew (Mac, needs macOS 15 or newer) and winget (built into Windows 11) install and update other command-line tools with one command. Neither is needed for the agents.
Windows: WSL
WSL runs Linux inside Windows. Both agents now run directly on Windows, so skip it unless you already work in Linux. The one exception is Claude Code’s optional sandbox, which on Windows works only under WSL 2. To install it, run wsl --install in PowerShell opened as Administrator, then restart.