Return to protonvpn.com Facebook   Twitter   Reddit   Instagram   Mastodon   ProtonMail
Support Center / Download and setup / How to use the official Linux CLI

How to use the official Linux CLI

ProtonVPN offers both an official Linux app with graphical user interface and an official Linux CLI. In this article, we explain how to install and use the Linux CLI.

The official ProtonVPN Linux CLI is available for many Linux Debian-based distros, Fedora 31+, and Archlinux / Manjaro. If you are using the old community ProtonVPN client for Linux, we recommend that you upgrade one of the new official clients. Please note that, at the present time, the new ProtonVPN CLI doesn’t support Split Tunneling and doesn’t run on headless servers.

How to install the official Linux CLI

Debian-based distros

Our command-line tool officially supports the following Debian and Ubuntu-based distributions:

  • Debian 10
  • Ubuntu 18.04 (LTS)
  • Mint 19.3+
  • MX Linux 19
  • Kali Linux

It also works with many distros based on these Linux versions (not Ubuntu Server or Raspbian), but we cannot provide support for these at this time.

If you are using an older version of our Linux client, we recommend that you uninstall it before installing the new CLI. Please see Note 1 at the end of this article for instructions.

1. Get the ProtonVPN repo setup DEB package

Download the ProtonVPN DEB package

2. Install the ProtonVPN repository

Open a terminal and run the following:

sudo apt-get install {/path/to/}protonvpn-stable-release_1.0.1-1_all.deb

3. Update the apt-get package list

Enter the command:

sudo apt-get update

4. Install the ProtonVPN Linux CLI

Last step! Type this command:

sudo apt-get install protonvpn-cli

Fedora 31+

Please note that our CLI does not work in earlier versions of Fedora. To upgrade your system, run:

dnf upgrade

1. Get the ProtonVPN repo setup RPM package

Download the ProtonVPN RPM package

2. Install the ProtonVPN repository


Open the terminal and run the following:

sudo dnf install {/path/to/}protonvpn-stable-release-1.0.0-1.noarch.rpm

3. Update the dnf package list


Enter the command:

sudo dnf update

4. Install the ProtonVPN Linux CLI


Last step! Type this command:

sudo dnf install protonvpn-cli

You are now ready to protect your online activity and access blocked content with ProtonVPN. 

Archlinux and Manjaro 19+

1. Update your local repository 

Open the terminal and enter the following command:

pamac update --force-refresh

2. Verify that ProtonVPN is now in your local repository

Enter the following command to list all the ProtonVPN packages in your repository:

pamac search --aur protonvpn-cli

Arch repo search

If no ProtonVPN packages are returned, check your internet connection and repeat Step 1 and Step 2 to ensure the packages appear.

3. Build and install ProtonVPN

Run:

pamac build protonvpn-cli

4. Import the PGP key

You will be prompted to Trust Proton Technologies AG <opensource@protonvpn.me> and import PGP key. Ensure the PGP key fingerprint exactly matches

 A884 41BD 4864 F95B EE08 E63A 71EB 4740 1994 0E11

If it does, then go ahead and click y to import it. If your package manager fails to fetch or import the key, please see Note 5 below.

How to use the official Linux CLI

1. Log in using your regular Proton/ProtonVPN account details using the following command (please note that these are not the OpenVPN/IKEv2 login credentials used by the older community Linux client).

 protonvpn-cli login [ProtonVPN username]

You will be prompted to enter your password. If you don’t have a ProtonVPN account you can sign up for one here.

The CLI will remember your login details between sessions. 2. Open a list of ProtonVPN servers with:

protonvpn-cli connect (or protonvpn-cli c)

3. Select a server location and click OK. Select a server at that server location and click OK. 4. Select udp or tcp (we recommend udp unless you have a reason to choose tcp).

GIF for Linux login

A connection to the VPN server will now be established. To check your connection status, enter:

protonvpn-cli status (or protonvpn-cli s)

To disconnect, enter:

protonvpn-cli disconnect (or protonvpn-cli d)

Alternatively, you can disconnect using NetworkManager.

GIF for Linux connect

How to use Kill Switch

The ProtonVPN official Linux CLI includes a kill switch. The basic Kill Switch will block all your internet connections when the VPN is running and the connection to one of our servers fails. To enable it, enter:

protonvpn-cli ks --on

The CLI also features a Permanent Kill Switch. This prevents all internet connections unless the VPN is running and connected to one of our servers. To enable it, enter:

protonvpn-cli ks --permanent

You can disable the Kill Switch by entering:

protonvpn-cli ks --off

How to connect using the command-line

To see the full list of connection options, enter:

protonvpn-cli c --help

GIF for Linux disconnect

To connect to the fastest ProtonVPN server for your location, for example, enter:

protonvpn-cli c -f

Or to connect to the fastest Tor server (Plus and Visionary users only), enter:

protonvpn-cli c --tor

Additional connection options, including specifying a custom DNS server, can be found by entering:

protonvpn-cli config --help

Entering protonvpn-cli h (or protonvpn-cli –help) will always show the latest commands supported by the command line tool.

How to uninstall the official Linux CLI

If you wish to uninstall the ProtonVPN official Linux CLI, open Terminal and disable the kill switch (if it is running). To do this, enter:

protonvpn-cli ks --off

Then:

Debian distros

1. Uninstall the CLI with:

sudo apt-get autoremove protonvpn

3. Remove any leftover files:

rm -rf ~/.cache/protonvpn

And

rm -rf ~/.config/protonvpn

Fedora 31+

1. Uninstall the CLI app with:

sudo dnf remove protonvpn -y; sudo dnf autoremove -y; sudo dnf clean packages

2. Check if all ProtonVPN packages are uninstalled:

dnf/yum list installed | grep proton

3. Check if any ProtonVPN folders remain on your system:

ls -ld /usr/lib/python3.*/site-packages/proton*

If any folders are found then remove them using:

sudo rm -rf /usr/lib/python3.*/site-packages/proton*

4. Check again that all folders are removed (see Step 3 above).

Archlinux and Manjaro

Run:

pamac remove protonvpn-cli

Notes

1. Uninstall the older community ProtonVPN app

To uninstall the older community ProtonVPN app, run:

protonvpn configure

Select option 7) Purge Configuration. Then uninstall through the package manager you used for installation. For Debian, if the package is installed system-wide then use the command:

sudo pip3 uninstall protonvpn-cli

If not, then use:

pip3 uninstall protonvpn-cli

2. Disable the kill switch if you have uninstalled the app

The kill switch can be easily disabled from within the official Linux CLI app, but this will not be possible if you have uninstalled the CLI app first without disabling the kill switch. This may result in your system being unable to access the internet. To remove the kill switch after the CLI app has been uninstalled:

a) Identify ProtonVPN connection names by running the command:

nmcli connection show --active

This will display a list of all your system’s active connections.

b) Look for any connections with the pvpn- prefix. This usually includes pvpn-killswitch and pvpn-ipv6leak-protection, and may include pvpn-routed-killswitch. Delete all these connections using the following command:

nmcli connection delete [connection name]

For example:

nmcli connection delete pvpn-killswitch

c) Re-run the following command to verify that ProtonVPN connections have been deleted:

nmcli connection show --active

If any ProtonVPN connections remain, delete them as described above.

3. Required dependencies

Our Linux CLI needs one of the following dependencies installed in order to work. Installing both of these dependencies is not recommended as it may cause problems:

  • KWallet  or
  • Gnome-keyring

Note that most distros come pre-installed with one of these dependencies, so usually no additional configuration is required. Also required is:

  • systemd

4. Supported distros

The ProtonVPN Linux CLI is currently officially supported on the following distros:

  • Debian 10
  • Ubuntu 18.04 +
  • Mint 19.3+
  • MX Linux 19+
  • Kali Linux
  • Fedora 31+

We are working on adding official support for more distros, but we cannot offer support for unsupported distros and versions. The Debian client should work on many Debian-based distros, and we invite users to test-run our software on their systems. But we cannot provide support if things don’t work on these unsupported systems.

5. Manually install the PGP key in ArchLinux / Manjaro

If your package manager fails to fetch or import the key,  you can import it manually using the steps below. Please note that we use Pacman for this (not Pamac, as used in the main setup guide above).

a. Download our public PGP key 

Click the link https://repo.protonvpn.com/debian/public_key.asc to download.

b. Add the key to Pacman

In Terminal enter:

pacman-key --add /path/to/downloaded/public_key.asc

(Replace /path/to/ with the path to wherever you downloaded key)

c. Ensure that the key has been added to pacman keyring

Enter:

pacman-key --finger A88441BD4864F95BEE08E63A71EB474019940E11

d. Sign the key

Run:

pacman-key --lsign-key A88441BD4864F95BEE08E63A71EB474019940E11

Leave a Reply

Your email address will not be published. Required fields are marked *

Don't find your answer? We're happy to help you!     Contact Our Support Team

Secure your internet

Get ProtonVPN

For customer support inquiries, please submit the following form for the fastest response:
Support Form

For all other inquiries:
contact@protonvpn.com


-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: OpenPGP.js v4.10.10
Comment: https://openpgpjs.org

xsBNBFiYeeIBCACpwuYcTsACyjQaqY3tOUonokamGZf3VDuLvcA9nQnu4vlB
n1RFFUJa5Pmf2yZ9EjJFSldTl5lreE3tFf53CcZ9wKa1R6aMnN/0VqURJho0
ZTqevQlCvuJ9kKHkDck3Em0/1WWnhDJgabp+fOa5HAHoAvcNy5gVPuexTT/N
wp6QcfB7w+qFhf73s0bcSn5RC+FAYlQxZVFhFtA7/7LthBVatDJrYLYP9XJd
zOZqz9AX0XZwKal25RcVeGHkNKgloo0bTgro4D88MR7saqXFHTRhy3+Wss7c
uqrh0uIkVmqtadoK/rAbqOyFXQ2DlvSMVrEMLUvwlZbC0taqcKDfNA+FABEB
AAHNLWNvbnRhY3RAcHJvdG9udnBuLmNvbSA8Y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