Overview
k6 is available for all major platforms. Choose your preferred installation method below.Linux
Install via package managers or download binaries
macOS
Install with Homebrew or download directly
Windows
Install with package managers or executables
Docker
Run k6 in containers without installation
Installation methods
- macOS
- Linux
- Windows
- Docker
Build from source
For developers who want to build k6 from source:Install Go
Make sure you have Go installed (version 1.21 or later).
Building from source gives you access to the latest features and allows you to customize k6 for your specific needs.
Install k6 extensions
k6 has a rich ecosystem of extensions that add support for new protocols and features:Using xk6
xk6 is the official tool for building k6 with extensions:Verify your installation
After installation, verify k6 is working correctly:Troubleshooting
k6 command not found
k6 command not found
If you get a “command not found” error:
- Make sure k6 is in your PATH
- Try closing and reopening your terminal
- On Windows, restart Command Prompt or PowerShell after installation
Permission denied on Linux/macOS
Permission denied on Linux/macOS
If you encounter permission errors:Or use
sudo when running installation commands.Docker volume mounting issues
Docker volume mounting issues
If your test scripts aren’t being found in Docker:
- Make sure you’re using absolute paths or
$(pwd) - On Windows, use
${PWD}in PowerShell or%cd%in Command Prompt - Check that the script file exists in the mounted directory
Next steps
Quick start guide
Now that k6 is installed, let’s run your first load test!