Skip to main content
The Mullvad CLI (mullvad) is included with all desktop installations of the Mullvad VPN app. This guide covers installation and setup for Linux, macOS, and Windows.

Prerequisites

Before using the CLI, you need:
  1. A Mullvad account (create one at mullvad.net)
  2. The Mullvad daemon (mullvad-daemon) installed and running
  3. Appropriate system permissions (root/administrator for some operations)

Installation by Platform

Linux

The CLI is included with the Mullvad VPN app installation.

Debian/Ubuntu

Download and install the .deb package from the Mullvad downloads page:
sudo apt install ./mullvad-vpn_*_amd64.deb
The mullvad binary will be installed to /usr/bin/mullvad.

Fedora/RHEL

Download and install the .rpm package:
sudo dnf install ./mullvad-vpn-*.rpm
or
sudo rpm -i mullvad-vpn-*.rpm

Arch Linux

Install from the AUR or use the official package:
yay -S mullvad-vpn

Verifying Installation

Verify the CLI is installed:
which mullvad
mullvad --version

macOS

The CLI is included with the Mullvad VPN app.

Installation

  1. Download the .pkg installer from mullvad.net/download
  2. Open the downloaded .pkg file
  3. Follow the installation wizard
The mullvad binary will be installed to /usr/local/bin/mullvad.

Adding to PATH

The installation should automatically add /usr/local/bin to your PATH. Verify the CLI is accessible:
which mullvad
mullvad --version
If the command is not found, ensure /usr/local/bin is in your PATH:
export PATH="/usr/local/bin:$PATH"
Add this line to your ~/.zshrc or ~/.bash_profile to make it permanent.

Windows

The CLI is included with the Mullvad VPN app installation.

Installation

  1. Download the .exe installer from mullvad.net/download
  2. Run the installer as Administrator
  3. Follow the installation wizard
The mullvad.exe binary will be installed to:
C:\Program Files\Mullvad VPN\resources\mullvad.exe

Adding to PATH

To use the CLI from any command prompt:
  1. Open System PropertiesEnvironment Variables
  2. Under System variables, find and edit Path
  3. Add: C:\Program Files\Mullvad VPN\resources
  4. Click OK to save
  5. Restart any open command prompts
Alternatively, use the full path:
"C:\Program Files\Mullvad VPN\resources\mullvad.exe" --version

PowerShell

In PowerShell, you may need to use the full path or create an alias:
Set-Alias mullvad "C:\Program Files\Mullvad VPN\resources\mullvad.exe"
Add this to your PowerShell profile to make it permanent:
notepad $PROFILE

Verifying Installation

After installation, verify the CLI and daemon are working:

Check CLI Version

mullvad --version
Expected output:
mullvad 2026.x

Check Daemon Status

Verify the daemon is running:

Linux

systemctl status mullvad-daemon
If not running, start it:
sudo systemctl start mullvad-daemon
sudo systemctl enable mullvad-daemon  # Enable on boot

macOS

mullvad version
If the daemon is not running, start the Mullvad VPN app from Applications.

Windows

Open Services (services.msc) and check that “Mullvad VPN Service” is running. You can also check using the CLI:
mullvad version

Test CLI Connection

Test that the CLI can communicate with the daemon:
mullvad status
If successful, you’ll see the current VPN connection state.

Building from Source

If you want to build the CLI from source:

Requirements

All Platforms

  1. Install Rust toolchain:
    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    
  2. Clone the repository:
    git clone https://github.com/mullvad/mullvadvpn-app.git
    cd mullvadvpn-app
    git submodule update --init
    
  3. Install additional dependencies:
    • Protobuf compiler (version 3.15+)
    • Go (version 1.21+)
    • Bash (version 4.0+)

Linux-Specific Dependencies

Debian/Ubuntu:
sudo apt install gcc libdbus-1-dev protobuf-compiler
Fedora/RHEL:
sudo dnf install dbus-devel protobuf-devel

Build the CLI

From the repository root:
cargo build --release --bin mullvad
The binary will be at:
target/release/mullvad
Optionally, install it system-wide:
sudo cp target/release/mullvad /usr/local/bin/

Cross-Compilation

Linux ARM64:
rustup target add aarch64-unknown-linux-gnu
TARGETS="aarch64-unknown-linux-gnu" cargo build --release --bin mullvad
Windows ARM64:
rustup target add aarch64-pc-windows-msvc
TARGETS="aarch64-pc-windows-msvc" cargo build --release --bin mullvad
macOS Universal Binary:
./build.sh --universal

Shell Completions

The CLI can generate shell completion scripts for better command-line integration.

Bash

mullvad shell-completions bash > /tmp/mullvad.bash
sudo mv /tmp/mullvad.bash /etc/bash_completion.d/mullvad
Reload your shell:
source ~/.bashrc

Zsh

mullvad shell-completions zsh > ~/.zsh_completions/_mullvad
Add to your ~/.zshrc if not already present:
fpath=(~/.zsh_completions $fpath)
autoload -Uz compinit && compinit
Reload your shell:
source ~/.zshrc

Fish

mullvad shell-completions fish > ~/.config/fish/completions/mullvad.fish
Reload Fish completions:
fish_update_completions

PowerShell (Windows)

Shell completions are not currently supported on Windows.

Permissions

Linux/macOS

Most CLI commands require the daemon to be running with root privileges. The CLI itself doesn’t need root access for most operations, but the daemon does. If you see permission errors:
sudo systemctl status mullvad-daemon

Windows

On Windows, the Mullvad service runs with SYSTEM privileges. You don’t need administrator privileges to use the CLI for most operations, but starting/stopping the service requires elevation.

Troubleshooting

Command Not Found

Linux/macOS:
which mullvad
If not found, ensure the installation directory is in your PATH:
export PATH="/usr/local/bin:$PATH"  # macOS
export PATH="/usr/bin:$PATH"        # Linux
Windows: Verify the PATH includes:
C:\Program Files\Mullvad VPN\resources

Cannot Connect to Daemon

If you see “Failed to connect to daemon” errors: Linux:
sudo systemctl status mullvad-daemon
sudo systemctl start mullvad-daemon
macOS: Start the Mullvad VPN app from Applications, or check if the daemon is running:
ps aux | grep mullvad-daemon
Windows: Check Services:
Get-Service "Mullvad*"
Restart the service if needed:
Restart-Service "Mullvad VPN Service"

Permission Denied

Linux/macOS: The daemon must run as root. Verify it’s running with appropriate privileges:
sudo systemctl restart mullvad-daemon
Windows: Run Command Prompt or PowerShell as Administrator if you need to manage the service.

Next Steps

Now that the CLI is installed:
  1. CLI Overview - Learn basic CLI usage and commands
  2. Command Reference - Detailed documentation for each command
  3. Examples - Common usage patterns and workflows

Additional Resources

Build docs developers (and LLMs) love