Summary
The command line is a text-based way to drive your computer. It does not replace Unity, Rider, VS Code, or GitHub Desktop — it sits underneath them, and it is where installing tools, running builds, using Git, launching local AI models, and automating repeated work are most reliable. For game developers the payoff is concrete: cloning and updating repositories, switching branches before a lab or milestone, running build scripts, and diagnosing missing SDKs or broken paths (see source-terminal-guide-game-dev).
This page is the orientation layer. The Git track (git-concepts, git-workflow, git-branching, git-github-unity) covers version control in depth; this page covers everything around it — the shell itself, package managers, and command-line build and AI workflows.
Key ideas
Three ideas often confused
| Term | Plain meaning | Examples |
|---|---|---|
| Terminal emulator | the window you type into | Windows Terminal, macOS Terminal, iTerm2, WezTerm |
| Shell | the language that interprets your commands | PowerShell, Bash, Zsh, Fish |
| Command-line tool (CLI) | a program controlled by typed commands | git, gh, dotnet, python, npm, ollama, Unity |
Keeping these separate explains most beginner confusion: a tutorial “for the terminal” usually means “for a particular shell”, and a command that fails is often a missing tool, not a broken shell.
A sensible beginner setup
- Windows: Windows Terminal as the host, PowerShell 7+ as the shell,
wingetfor installs; add WSL 2 or Git Bash when a tutorial assumes Linux/Bash commands. - macOS: Terminal or iTerm2, Zsh, Homebrew for installs.
- Linux: the distro’s terminal, Bash, and the native package manager (
apt,dnf,pacman).
This wiki’s examples use PowerShell and Bash side by side, matching the Windows-first, cross-platform reality of the programme.
In practice
Navigation and files
The everyday commands have direct PowerShell equivalents; PowerShell also accepts the Bash-style aliases (ls, cd, pwd, clear).
| Action | Bash / Zsh | PowerShell |
|---|---|---|
| Where am I? | pwd | Get-Location |
| List files | ls | Get-ChildItem |
| Change / go up | cd folder / cd .. | cd folder / cd .. |
| Make a folder | mkdir Name | New-Item -ItemType Directory Name |
| Create a file | touch file.md | New-Item file.md |
| Delete (careful) | rm file / rm -r dir | Remove-Item file / Remove-Item dir -Recurse |
Quote paths that contain spaces: cd "C:\Users\Student\Unity Projects\Snake Prototype".
Installing tools with a package manager
A package manager installs and updates software from the command line; prefer it over copying install scripts from forums.
winget search git
winget install Git.Git
winget upgrade --allbrew install git gh # macOS
sudo apt install git curl # Ubuntu/DebianFor Python/AI work, use an isolated virtual environment per project rather than installing globally:
python -m venv .venv
source .venv/bin/activate # PowerShell: .\.venv\Scripts\Activate.ps1
python -m pip install -r requirements.txtGit is the most common reason to open a terminal
The day-to-day loop — git pull, edit, git status, git add, git commit -m "…", git push — lives in git-workflow; branches and conflicts in git-branching; the GitHub side (.gitignore, Git LFS, .meta files, Pull Requests) in git-github-unity. Two modern conveniences worth knowing:
git switch -c <branch>/git switch main— the clearer modern alternative togit checkoutfor moving between branches.gh— GitHub’s official CLI (gh auth login,gh repo clone,gh pr create) for doing GitHub tasks without leaving the terminal.
Building a game from the command line
The editor is the usual way to build, but command-line builds make pipelines repeatable and are the basis of CI. Unity supports batch-mode builds that call a method in an Editor script:
& "C:\Program Files\Unity\Hub\Editor\<version>\Editor\Unity.exe" `
-quit -batchmode `
-projectPath "C:\Projects\MyUnityGame" `
-executeMethod BuildScript.PerformBuildFor small C# prototypes the .NET CLI is quick: dotnet new console -n SnakePrototype, then dotnet run. When a command sequence gets long, put it in a build.ps1 or build.sh so teammates and markers run the same steps instead of memorising them.
Local AI and LLM tooling
Much AI work is launched and configured from the terminal: running a local model (ollama run <model>), starting its API (ollama serve, commonly at http://localhost:11434), or LM Studio’s lms commands. Terminal coding agents should be used with a review-first loop — inspect, plan, make a small change, review the diff and run the build yourself, commit only after review. This is also how this project uses local models (Ollama) as a cheap pre-processing helper, never as the final author.
Safety and secrets
- Be wary of commands you do not understand, especially
rm -rf,sudo, andcurl … | sh. - Never commit secrets — API keys, passwords, private keys, or
.envfiles. Keep keys in environment variables ($env:OPENAI_API_KEYin PowerShell,export OPENAI_API_KEY=…in Bash) and add.envto.gitignore. - Run
git statusandgit diffbefore committing so you can see exactly what is about to be saved.
Evidence
The setup recommendations, command pairs, and workflows here are condensed from a cross-platform beginner guide compiled against official documentation (Microsoft Learn, git-scm, GitHub, Unity, Python, Ollama, LM Studio); see source-terminal-guide-game-dev for the full guide and its source links.
Further reading
- The Linux Book — a free, deeper grounding in the Linux shell and command line for readers who want more than the beginner orientation above.
Implications
- Comfort with a handful of commands (
pwd,ls,cd, plus the core Git loop) removes most of the friction beginners hit with engines and version control. - Repeatable command-line builds are the bridge from “it works on my machine” to CI and team pipelines.
- The same terminal skills transfer directly to running local AI tooling safely, which is increasingly part of a game developer’s workflow.
Related
git-concepts · git-workflow · git-branching · git-github-unity · source-control · source-terminal-guide-game-dev · source-progit