Mullvad VPN CLI Commands
Most Used
| Command | Description |
|---|---|
mullvad account login | Log in to your Mullvad account. |
mullvad account get | Show your account information, including account number, device name, and expiration date. |
mullvad relay list | List available server locations. |
mullvad relay set location <country_code> <city_code> | Select a server location. Replace <country_code> and <city_code> with your desired values. |
mullvad relay set location <server_name> | Select a specific server by name. |
mullvad connect | Connect to the selected server location. |
mullvad disconnect | Disconnect from the VPN. |
mullvad status -v | Check your connection status with detailed information. |
mullvad auto-connect set on | Enable auto-connect on startup. |
mullvad lockdown-mode set on | Enable Lockdown mode to block all Internet traffic until connected to Mullvad. |
mullvad dns set default --block-ads --block-trackers --block-malware --block-adult-content | To enable all DNS filters except social media, use the following command. |
mullvad relay set tunnel-protocol wireguard | Use Wireguard as the tunnel protocol (Is default). |
mullvad tunnel set wireguard --quantum-resistant on | Enable Quantum Resistant. |
Basic Commands
| Command | Description |
|---|---|
mullvad account login <account_number> | Log in to your Mullvad account. Replace <account_number> with your actual account number. |
mullvad account get | Show your account information, including account number, device name, and expiration date. |
mullvad account list-devices | List all device names associated with your account. |
mullvad relay list | List available server locations. |
mullvad relay set location <country_code> <city_code> | Select a server location. Replace <country_code> and <city_code> with your desired values. |
mullvad relay set location <server_name> | Select a specific server by name. |
mullvad connect | Connect to the selected server location. |
mullvad disconnect | Disconnect from the VPN. |
mullvad relay update | Force an update of the server location list. |
mullvad status -v | Check your connection status with detailed information. |
Advanced Commands
| Command | Description |
|---|---|
mullvad relay set tunnel-protocol openvpn | Use OpenVPN as the tunnel protocol. |
mullvad relay set tunnel openvpn --transport-protocol tcp | Use OpenVPN over TCP. |
mullvad relay set tunnel-protocol wireguard | Use Wireguard as the tunnel protocol (Is default). |
mullvad auto-connect set on | Enable auto-connect on startup. |
mullvad auto-connect set off | Disable auto-connect on startup. |
mullvad lan set allow | Enable LAN access. |
mullvad lockdown-mode set on | Enable Lockdown mode to block all Internet traffic until connected to Mullvad. |
mullvad tunnel set ipv6 on | Enable in-tunnel IPv6. |
Split Tunneling (Linux)
| Command | Description |
|---|---|
mullvad-exclude <program> | Start a new process excluded from Mullvad. |
mullvad split-tunnel add <pid> | Exclude a running process from Mullvad using its PID. |
mullvad split-tunnel list | List all currently excluded processes. |
mullvad split-tunnel delete <pid> | To restore a previously excluded process use this command. |
mullvad split-tunnel clear | To restore all previously excluded processes use this command. |
Shadowsocks Commands
| Command | Description |
|---|---|
mullvad bridge set location <location> | Set the location for Shadowsocks. Replace <location> with a specific country or city. |
mullvad bridge set state on | Enable bridge mode for Shadowsocks. |
mullvad bridge set state off | Disable bridge mode. |
mullvad bridge set custom set shadowsocks --cipher <CIPHER> <REMOTE_IP> <REMOTE_PORT> <PASSWORD> | Configure advanced Shadowsocks settings. |
DNS Commands
| Command | Description |
|---|---|
mullvad dns set default --help | To view the help, use this command. |
mullvad dns set default --block-ads --block-trackers --block-malware --block-gambling --block-adult-content | To enable all DNS filters except social media, use the following command. |
mullvad dns set default | To turn off all the content blockers use this command. |
Make custom server lists
| Command | Description |
|---|---|
mullvad custom-list new Favorites | To create a new custom list named "Favorites" use this command. |
mullvad custom-list edit add Favorites se-mma-wg-001 | To add a specific server, city or country to the list use one of these commands. |
mullvad custom-list edit add Favorites se got | To add a specific server, city or country to the list use one of these commands. |
mullvad custom-list edit add Favorites se | To add a specific server, city or country to the list use one of these commands. |
mullvad relay set custom-list Favorites | To select your custom list so you can connect to it, use this command. |
mullvad custom-list edit remove Favorites se-mma-wg-001 | To remove a specific server,city or country from the list use one of these commands. (The same as add) |
mullvad custom-list edit rename Favorites Favourites | To rename a custom list use this command. |
mullvad custom-list list | To list all your custom lists and their content use this command. |
Reset Settings
| Command | Description |
|---|---|
mullvad factory-reset | This command performs a factory reset on all settings, deletes app logs and cache files, disconnects the app, and logs you out. |