mullvad
Connect to Mullvad VPN servers
TLDR
Link your Mullvad account with the specified account number
Enable LAN access while VPN is on
Select a server in a specific city
Select a specific server
Establish the VPN tunnel
Check status of VPN tunnel
Check the account expiration date and obtain the device name
SYNOPSIS
mullvad command [options] [arguments]
PARAMETERS
account subcommand
Manages your Mullvad account settings. Common subcommands include login, logout, get (to display account details), and set auto-login.
connect [location]
Establishes a VPN connection. Can specify a location (e.g., country, city, server) or use best to connect to the optimal server.
Example: mullvad connect or mullvad connect us ca.
disconnect
Terminates the active VPN connection.
status
Displays the current VPN connection status, including connection state, connected server, and external IP address.
relay subcommand
Manages VPN server (relay) selection. Subcommands include list (to show available servers), set location, set entry location, and set exit location.
settings subcommand
Configures various Mullvad client settings. Use get to view all current settings or set to modify them.
Examples:
mullvad settings set kill-switch on
mullvad settings set dns mullvad
mullvad settings set tunnel-protocol wireguard
mullvad settings set ipv6 on
mullvad settings set lan-access off
dns subcommand
Manages DNS configuration, often through the mullvad settings set dns command.
diagnostics
Collects diagnostic information and logs, useful for troubleshooting or reporting issues to Mullvad support.
refresh
Refreshes the list of available Mullvad VPN relays.
version
Displays the version of the Mullvad VPN client and daemon.
restore-defaults
Resets all Mullvad client settings to their default values.
upgrade
Checks for and applies updates to the Mullvad VPN client software.
ping
Pings Mullvad servers to check connectivity and latency.
DESCRIPTION
The mullvad command-line interface (CLI) client provides a comprehensive toolset for interacting with the Mullvad VPN daemon on Linux. It allows users to control their VPN connection, manage account settings, select server locations, configure network features like kill switch and DNS, and retrieve connection status. It acts as a primary interface for users who prefer the terminal or want to script Mullvad VPN operations, abstracting the underlying network complexities.
CAVEATS
The mullvad command requires the Mullvad VPN daemon to be running in the background. Many commands, especially those altering network settings or connecting/disconnecting, may require elevated privileges, which the client typically handles via pkexec or sudo prompts. Ensure the Mullvad application is correctly installed and its service is active.
HISTORY
Mullvad VPN, founded in 2009, has developed its Linux client over time, adapting to changing network technologies and user demands. Initially relying on OpenVPN, the client has significantly evolved to integrate WireGuard as its default and preferred protocol. The current mullvad CLI is part of a unified application that includes a background daemon and a graphical user interface, offering a consistent experience across different platforms while providing robust command-line control for power users and scripting.