Overview
Themullvad status command displays the current state of the VPN tunnel and optionally listens for real-time state changes.
Syntax
Options
| Option | Description |
|---|---|
-v, --verbose | Enable verbose output |
-d, --debug | Enable debug output (conflicts with --verbose and --json) |
-j, --json | Format output as JSON (conflicts with --verbose and --debug) |
-h, --help | Print help information |
Subcommands
listen
Listen for tunnel state changes in real-time:Output Formats
The status command supports three output formats:- Standard - Human-readable connection status
- Verbose (
-v) - Includes additional connection details - Debug (
-d) - Full debug information about tunnel state - JSON (
-j) - Machine-readable JSON format
Tunnel States
The command can report the following tunnel states:- Disconnected - Not connected to any relay
- Connecting - Establishing connection to a relay
- Connected - Successfully connected to a relay
- Disconnecting - Terminating connection
- Error - Connection error occurred
Examples
Basic Status Check
Display current VPN status:Verbose Status
Show detailed connection information:JSON Output
Get status in JSON format for scripting:Listen for State Changes
Monitor tunnel state changes in real-time:Listen with JSON Output
Stream state changes as JSON:Debug Output
Show full debug information:Events (Listen Mode)
When usingstatus listen, the command reports the following daemon events:
- TunnelState - Tunnel connection state changes
- Settings - Configuration changes
- RelayList - Relay list updates
- AppVersionInfo - Version information updates
- Device - Device-related events
- RemoveDevice - Device removal events
- NewAccessMethod - New API access method
- LeakDetected - Network leak detection
Warnings
The command displays warnings for specific conditions:- Not logged in - You’re not logged in to a Mullvad account
- Device revoked - Your device has been revoked from the account
Related Commands
- connect - Connect to VPN
- disconnect - Disconnect from VPN
- account - Check account information
- relay - View relay constraints
Exit Status
| Code | Description |
|---|---|
| 0 | Status retrieved successfully |
| 1 | Failed to retrieve status or connection error |
Source Reference
Implementation:mullvad-cli/src/cmds/status.rs