Set Up a Linux CLI Environment on Windows
Set up a Linux CLI environment on Windows
The CLI examples throughout this documentation use bash, the default shell on Linux and macOS. If your local machine runs Windows, you need a Linux-compatible shell environment before following CLI, API, or Terraform guides.
This page covers four approaches. Pick the one that fits your workflow, then return to the guide you were reading.
Quick comparison#
| Approach | Best for | Setup time | Limitations |
|---|---|---|---|
| WSL 2 | Most users: full Linux on Windows | 5–10 min | Requires Windows 10 1903+ or Windows 11 |
| Git Bash | Quick CLI tasks when Git is already installed | 2–5 min | No package manager, limited GNU tools |
| Docker Desktop | Teams standardizing on containers | 10–15 min | Licensing requirements for large organizations |
| Quake AI VM | Existing customers who want a persistent remote environment | 5 min | Requires a Quake AI account and internet connection |
WSL 2 (recommended)#
Windows Subsystem for Linux (WSL 2) runs a full Linux kernel inside Windows. After setup, you open a terminal and work in Ubuntu exactly as the docs describe: bash, apt, curl, ssh, pip, and brew all work natively.
Install WSL#
Open PowerShell as Administrator and run:
wsl --installThis installs WSL 2 with Ubuntu as the default distribution. Restart your machine when prompted.
For detailed instructions and troubleshooting, see the Microsoft WSL installation guide.
Open your Linux shell#
After restarting, open the Ubuntu app from the Start menu (or type wsl in any terminal). You are now in a bash shell.
Install CLI tools#
From inside your WSL terminal, install the tools used in Quake AI guides:
sudo apt update && sudo apt install -y python3 python3-pip curlInstall the OpenStack CLI:
pip3 install python-openstackclientInstall OpenTofu (for IaC guides):
curl -fsSL https://get.opentofu.org/install-opentofu.sh | sh -s -- --install-method standaloneVerify#
bash --version
openstack --version
tofu --versionGit bash#
Git for Windows bundles Git Bash, a minimal bash environment with curl, ssh, grep, awk, and other common Unix utilities. If you already have Git installed, Git Bash is ready to use.
Install#
Download and run the installer from gitforwindows.org. Accept the defaults.
Limitations#
Git Bash does not include a package manager (apt, brew). You cannot install the OpenStack CLI or OpenTofu directly inside Git Bash. Use Git Bash for guides that only require bash, curl, ssh, or git. For anything that needs package installation, use WSL 2 instead.
Verify (git bash)#
Open Git Bash from the Start menu and run:
bash --version
curl --version
ssh -VDocker desktop#
If you already use Docker, you can run CLI tools inside a Linux container without modifying your Windows environment.
Install (Docker desktop)#
Download Docker Desktop for Windows and complete the installation. Docker Desktop requires WSL 2 as its backend on modern Windows; the installer enables it automatically.
Run a Linux shell with CLI tools#
Start an Ubuntu container with your project files mounted:
docker run -it --rm -v "%cd%":/work -w /work ubuntu:24.04 bashInside the container, install the tools you need:
apt update && apt install -y python3 python3-pip curl
pip3 install python-openstackclientVerify (Docker desktop)#
bash --version
openstack --versionWhen you exit the container, installed tools are lost. To avoid reinstalling each time, create a Dockerfile with your tools pre-installed, or use a named volume.
SSH into a Quake AI VM#
If you have a Quake AI account, you can create a Linux VM and SSH into it from Windows. This gives you a full native Linux environment with no local setup beyond an SSH client (built into Windows 10+).
Create a VM#
Follow the Quickstart to create an Ubuntu instance on the Developer plan.
Connect via SSH#
Open PowerShell or Windows Terminal and connect:
ssh ubuntu@YOUR_VM_IPReplace YOUR_VM_IP with the floating IP assigned to your instance.
Install CLI tools (SSH into a Quake AI VM)#
Once connected, you are on a standard Ubuntu machine. Install tools as described in the WSL 2 section above:
sudo apt update && sudo apt install -y python3 python3-pip curl
pip3 install python-openstackclient
curl -fsSL https://get.opentofu.org/install-opentofu.sh | sh -s -- --install-method standaloneVerify (SSH into a Quake AI VM)#
openstack --version
tofu --versionNext steps#
- Install OpenStack client: detailed CLI setup
- Add an SSH key pair: generate and upload keys (includes Windows-specific instructions)
- Automate your infrastructure with OpenTofu: provision infrastructure with OpenTofu
- Create application credentials: authenticate your CLI environment
Usage Guidelines
The sample code, software libraries, command line tools, proofs of concept, templates, and other related technology on this page (including any of the foregoing that is provided by Quake AI personnel) is provided to you as Quake AI Content under the Quake AI Customer Agreement, or the relevant written agreement between you and Quake AI (whichever applies). Do not use this Quake AI Content in your production accounts, or on production or other critical data. You are responsible for testing, securing, and optimizing the Quake AI Content (such as sample code) as appropriate for production grade use based on your specific quality control practices and standards. Deploying Quake AI Content may incur Quake AI charges for creating or using Quake AI chargeable resources, such as running Compute instances or storing data in Object Storage. Your use is also subject to the Acceptable Use Policy.
For the full policy, see Usage Guidelines.
Last validated: 04.06.2026