How to use the Mullvad CLI

Follow these instructions to use the Mullvad command line interface (CLI) in your operating system's terminal.


If you haven't already, first download the Mullvad VPN app and install it.

Add the CLI binary to your PATH

In order for your terminal/console to find the mullvad CLI binary, the Mullvad VPN app resource directory must be present in the PATH environment variable, which is where your OS searches for binaries.

In Windows

  1. In the Windows Start menu, search for and open advanced system settings.
  2. In the System Properties window that opens, click on the Environment Variables button.
  3. Under the System variables section, find and double-click on the row called Path.
  4. In the new window that opens, click on New and enter C:\Program Files\Mullvad VPN\resources\

In Linux and MacOS

The Mullvad VPN CLI is added to a system wide PATH directory by default, so nothing has to be done here.

Available commands

These are the various commands available to you.

Specify your account

Replace the number string with your Mullvad account number.

mullvad account set 1234123412341234

Show account info

This command will show your account number and the expiration date of your account.

mullvad account get

List server locations

This command displays a list of available countries and cities.

mullvad relay list

Select a location

In this example, we are connecting to a server in Sweden (se), in the city of Malmö (mma).

Replace "se" with the country of your choice and, optionally, "mma" with a specific city in that country.

mullvad relay set location se mma


Connect to the location that you selected.

mullvad connect


mullvad disconnect

Check your connection status

mullvad status

Auto-connect on start-up

If you want Mullvad to start and connect when you boot up your computer, use this command.

mullvad auto-connect set on

To turn this off, run

mullvad auto-connect set off

Enable LAN access

mullvad lan set allow