Overview
The CLI communicates with themullvad-daemon system service to control all VPN functionality.
Binary Name
Platform Availability
- Windows:
mullvad.exe(in Program Files) - macOS:
/usr/local/bin/mullvad - Linux:
/usr/bin/mullvad
The CLI is automatically installed with the desktop application on all platforms.
Installation
Desktop Platforms
The CLI is included with the desktop app installation:- Automatic: Installed alongside the GUI application
- PATH: Added to system PATH during installation
- Permissions: No special permissions required (communicates with daemon)
Verify Installation
Basic Usage
Connection Management
Connect to VPN
Disconnect from VPN
Reconnect
Check Status
Account Management
Manage your Mullvad account:Login
Account Information
Logout
Device Management
Server Selection
List Available Servers
Set Server Location
Server Constraints
Tunnel Configuration
WireGuard Settings
Multihop
DAITA
Obfuscation
Configure obfuscation to bypass censorship:Anti-Censorship Settings
DNS Configuration
DNS Settings
Content Blocking Options
ads- Block advertisementstrackers- Block tracking domainsmalware- Block malicious domainsgambling- Block gambling sitesadult- Block adult contentsocial-media- Block social media platforms
Split Tunneling
Configure application exclusions:Application-Based Split Tunneling
Security Settings
Auto-Connect
Lockdown Mode
Local Network Sharing
API Access Methods
Configure how to reach Mullvad API:Custom Lists
Create and manage lists of favorite servers:Settings Management
Export Settings
Import Settings
Reset Settings
Beta Program
Opt in/out of beta updates:Logging
Manage logging and tracing:Debugging Commands
Shell Completions
Generate shell completion scripts (Linux/macOS):Installing Completions
Bash
Zsh
Fish
Scripting Examples
Auto-Connect on Specific Network
Rotate Between Servers
Monitor Connection Status
Connection Test Script
Output Formats
Many commands support JSON output for scripting:Exit Codes
The CLI uses standard exit codes:0- Success1- General error- Other non-zero values indicate specific errors
Example Error Handling
Environment Variables
The CLI respects standard terminal environment variables:NO_COLOR- Disable colored outputMULLVAD_RPC_SOCKET_PATH- Override daemon socket path (advanced)
Troubleshooting
CLI Cannot Connect to Daemon
Command Not Found
Permissions Errors
The CLI communicates with the daemon via socket/pipe:- Linux: User must have access to
/var/run/mullvad-vpnsocket - macOS: Similar to Linux
- Windows: All users should have access by default
Next Steps
Desktop Guide
Learn about the desktop application
Automation
Automate VPN with scripts
Settings Reference
Detailed settings documentation
Troubleshooting
Common CLI issues and solutions