What this step is
Prepare the tools for the next step: a terminal to type commands into, and — on the AI route — an AI assistant that runs commands for you.
Whichever route you take, you need the terminal: the AI works inside it too.
First: open a terminal
Mac has Terminal built in: press ⌘ + Space, type “Terminal” and press Enter. A window appears with a line ending in % or $ — that’s the terminal.
This setup’s scripts run in Linux, so Windows first needs its built-in Linux environment, WSL. About 10 minutes and one restart.
Follow Install WSL on Windows, then come back. From now on, “terminal” on Windows means the Ubuntu window inside WSL.
Manual route: you’re done here
If you won’t use AI, the terminal is all you need. Go to the next step and choose “Type it yourself”.
AI route: install an AI assistant
Pick one — whichever you have an account for:
| Claude Code | Codex | |
|---|---|---|
| From | Anthropic (Claude) | OpenAI (ChatGPT) |
| Account needed | Claude Pro, Max, Team, Enterprise or Console (not the free plan) | A paid ChatGPT plan such as Plus, Pro, Business, Edu or Enterprise |
Paste this into the terminal and press Enter (same command on Mac and in WSL):
curl -fsSL https://claude.ai/install.sh | bashWhen it finishes, close the terminal and open it again, then check — a version number means it worked:
claude --versionThen type claude, press Enter and log in to your Claude account in the browser when prompted. Details: Install Claude Code.
Paste this into the terminal and press Enter (same command on Mac and in WSL):
curl -fsSL https://chatgpt.com/codex/install.sh | shWhen it finishes, close the terminal and open it again, then check — a version number means it worked:
codex --versionThen type codex, press Enter, choose “Sign in with ChatGPT” and log in in the browser. Details: Install Codex.
Optional: install it as a skill
If you’ll set up servers often, install this setup as an AI skill; afterwards one sentence — “use xiaoxiaodong-vps to set up my new server” — is enough. Not needed the first time: the message in the next step tells the AI to download the setup itself. See Install the xiaoxiaodong-vps skill.
Stuck?
It says command not found?
Close and reopen the terminal after installing so the new command is found. Still failing? See the matching how-to.
The browser didn't open for login?
The terminal prints a URL — copy it into a browser, log in, then return to the terminal.
Can I skip WSL on Windows and use PowerShell?
The AI assistants themselves run on Windows, but this setup’s scripts need Linux tools like bash and ssh, which are easiest in WSL — so the guide uses WSL throughout.
Before moving on, check
✓ All ticked — on to the next step.