Back to Guides

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.

In the terminal, you will then need to navigate to the folder where the program file is located in order for these commands to work. To make this easier in macOS and Windows, you can create a path.

Create a path in macOS

export PATH="/Applications/Mullvad$PATH"

Create a path 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\

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

macOS uninstall script

macOS users can run a bundled uninstall script to completely remove the app, as well as its local log files, cache, and settings

/Applications/Mullvad\ VPN/Contents/Resources/