---
title: "Install k6 | Grafana k6 documentation"
description: "k6 has packages for Linux, Mac, and Windows. As alternatives, you can also using a Docker container or a standalone binary."
---

# Install k6

k6 has packages for Linux, Mac, and Windows. Alternatively, you can use a Docker container or a standalone binary.

You can also use the k6 Studio desktop application to help you generate k6 scripts from a browser recording. Refer to [k6 Studio](#k6-studio) for more details.

## Linux

### Debian/Ubuntu

Bash ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```bash
curl -fsSL https://dl.k6.io/key.gpg | sudo gpg --dearmor -o /usr/share/keyrings/k6-archive-keyring.gpg
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 k6
```

### Fedora/CentOS

Using `dnf` (or `yum` on older versions):

Bash ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```bash
sudo dnf install https://dl.k6.io/rpm/repo.rpm
sudo dnf install k6
```

## MacOS

Using [Homebrew](https://brew.sh/):

Bash ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```bash
brew install k6
```

## Windows

If you use the [Chocolatey package manager](https://chocolatey.org/) you can install the unofficial k6 package with:

![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```none
choco install k6
```

If you use the [Windows Package Manager](https://github.com/microsoft/winget-cli), install the official packages from the k6 manifests [(created by the community)](https://github.com/microsoft/winget-pkgs/tree/master/manifests/k/k6/k6):

![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```none
winget install k6 --source winget
```

Alternatively, you can download and run [the latest official installer](https://dl.k6.io/msi/k6-latest-amd64.msi).

## Docker

Bash ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```bash
docker pull grafana/k6
```

We also have a separate image you can use with `chromium` installed to run k6 browser tests.

Bash ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```bash
docker pull grafana/k6:master-with-browser
```

## Download the k6 binary

Our [GitHub Releases page](https://github.com/grafana/k6/releases) has a standalone binary for all platforms. After downloading and extracting the archive for your platform, place the `k6` or `k6.exe` binary in your `PATH` to run `k6` from any location.

## Using k6 extensions

If you use one or more [k6 extensions](/docs/k6/latest/extensions/), you need a k6 binary built with your desired extensions. Head to [Explore extension](/docs/k6/latest/extensions/explore/) to get started.

## Upgrade k6

Upgrade to the latest version of `k6` using one of the following commands.

### Linux (Debian/Ubuntu)

Bash ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```bash
sudo apt-get update
sudo apt-get install k6
```

### Linux (Fedora/CentOS)

Bash ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```bash
sudo dnf upgrade k6
```

### MacOS

Bash ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```bash
brew upgrade k6
```

### Windows (Chocolatey)

![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```none
choco upgrade k6
```

### Windows (Windows Package Manager)

![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```none
winget upgrade k6
```

### Windows (MSI installer)

Download and run [the latest official installer](https://dl.k6.io/msi/k6-latest-amd64.msi).

### Docker

Pull the latest image:

Bash ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```bash
docker pull grafana/k6:latest
```

### Binary

Download the latest binary from the [GitHub Releases page](https://github.com/grafana/k6/releases), and replace your existing installation.

## Troubleshooting

If installation fails, check the [list of common installation issues](/docs/k6/latest/set-up/install-k6/troubleshooting/). If your problem is not listed and persists, open an issue in the [k6 GitHub repository](https://github.com/grafana/k6), or report it on our [community forum](https://community.grafana.com/).

## k6 Studio

k6 Studio is a desktop application for Windows, macOS, and Linux, that can help you generate k6 scripts from a browser recording, and quickly test your application. You can generate protocol and browser scripts, and test and debug your scripts with a visual interface, without having to touch any code.

- For installation instructions, refer to [Install k6 Studio](/docs/k6-studio/set-up/install/).
- For more details about k6 Studio, refer to the [k6 Studio docs](/docs/k6-studio/).

## Next steps

Now that you have k6 installed in your machine, you can:

- Head over to [Running k6](/docs/k6/latest/get-started/running-k6/) to learn how to create and run your first test.
- Refer to [Configure k6 Intellisense](/docs/k6/latest/set-up/configure-k6-intellisense/) to set up code editing features to your code editor, such as auto-completion of k6 functions.
