Install k6
In this milestone, you install k6 on your machine. k6 has packages for Linux, macOS, and Windows, and you can also use a Docker container or download a standalone binary.
The installation method you choose depends on your operating system and preferences. k6 supports native installation via package managers for the best performance, or Docker for containerized environments.
To install k6, complete the following steps:
Choose your installation method based on your operating system:
Install k6 using your chosen method:
For Linux (Debian/Ubuntu):
sudo gpg -k sudo gpg --no-default-keyring --keyring /usr/share/keyrings/k6-archive-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C5AD17C747E3415A3642D57D77C6C491D6AC1D69 echo "deb [signed-by=/usr/share/keyrings/k6-archive-keyring.gpg] https://dl.k6.io/deb stable main" | sudo tee /etc/apt/sources.list.d/k6.list sudo apt-get update sudo apt-get install k6For Linux (Fedora/CentOS):
sudo dnf install https://dl.k6.io/rpm/repo.rpm sudo dnf install k6For macOS:
brew install k6For Windows (Chocolatey):
choco install k6For Windows (Winget):
winget install k6 --source wingetFor Docker:
docker pull grafana/k6For Binary: Download the latest binary from the GitHub Releases page. For detailed steps, see Install k6 - Binary.
Verify the installation by checking the k6 version:
k6 versionIf k6 is installed correctly, you should see version information displayed in your terminal.
If you encounter installation issues, refer to the k6 installation troubleshooting guide.
In the next milestone, you’ll write your first k6 test script to perform HTTP requests and measure performance.
