Set up PureVPN Command Line App on Linux

Learn how to set up and configure PureVPN's Command Line App for enhanced privacy and security. Follow our step-by-step guide to easily install and utilize PureVPN's powerful features from the command line interface. Safeguard your online activities with this comprehensive tutorial.

Written By Fahad Ahmed

Updated at May 28th, 2024


Install PureVPN app

Get complete control over your online privacy and security with PureVPN's Command Line App. This comprehensive guide provides step-by-step instructions to install and configure the app, ensuring a seamless setup process. Before proceeding, download the app from the provided link to kickstart your journey towards enhanced online protection.

  • To install the PureVPN app, simply execute the following command.
curl https://purevpn-dialer-assets.s3.amazonaws.com/cross-platform/linux-cli/production/cli-install.sh | sudo bash

  • Once the installation is complete, use the following command to load the PureVPN CLI into your profile.
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/etc/pure-linux-cli/:/etc/pure-linux-cli/ > ~/.bashrc

Delete

Login to PureVPN app

  • After completing a successful installation, you can log in to PureVPN by entering the following command.
purevpn-cli  --login OR purevpn-cli –i

Delete

Note: Please use double hyphen if you're using "login" as a whole.

Connect with your preferred location

If you want to connect to a specific location, don't worry! PureVPN offers an easy way to choose and connect to your desired location.

  • To select a specific location, simply specify the country name after the command as follows:
purevpn-cli --connect “United States” OR purevpn-cli -c “US”

  • You can also use country codes from the country list to create a VPN connection. For example:
purevpn-cli --connect DE OR purevpn-cli -c DE
Delete

Note: Please use double hyphen if you're using "connect" as a whole.

Connect via recommended server/ location

Wondering what is the recommended server?

Well, the recommended server will automatically connect you to a country/ server proposed  by our smart algorithm (based on geographical distance). Read more about how PureVPN smart algorithm works.

How to get connected with the recommended location/server? Enter the command below 👇

purevpn-cli -r

Delete

Note: Please use double hyphen if you're using "recommended" as a whole.

Delete

Locations list

List of countries and their respective country codes can be viewed using this command. 

purevpn-cli --location OR purevpn-cli -l
Delete

Note: Please use double hyphen if you're using "location list" as a whole.

Delete

How to switch protocol

The choice of VPN protocol can significantly impact the performance and stability of your connection. It is important to select the correct protocol when connecting to a VPN server. PureVPN recommends using the automatic protocol, as it will choose the most suitable connection setting for you. However, if the automatic protocol option doesn't work, you can switch between different protocols as needed.

Protocol Guide:

WireGuard: (Recommended)

WireGuard provides a fast and secure VPN connection and it’s usually used for web browsing and streaming.

UDP: 

UDP is mainly used for streaming and downloading. It provides a fast VPN connection with medium encryption.

TCP:

TCP is more reliable, but also a little slower, and is usually used for web browsing. 

  • To switch between protocols, use the following command:
purevpn-cli --protocol auto OR purevpn-cli -p auto
purevpn-cli --protocol wireguard OR purevpn-cli -p wireguard

  • To view the currently selected protocol, use the same command without any arguments.
purevpn-cli --protocol
Delete

Note: Please use double hyphen if you're using "protocol" as a whole.

Delete

Check account details

  • To view your account details in the PureVPN app, simply enter the following command:
purevpn-cli --account purevpn-cli -a

Delete

Note: Please use double hyphen if you're using "account" as a whole.

Delete

Find app version

  • To check the version of your Linux application, use the following command:
purevpn-cli --version purevpn-cli -v
Delete

Note: Please use double hyphen if you're using "version" as a whole.

Delete

Manage help section

  • To access the help section and obtain assistance for commands in our latest application, use the following command:
purevpn-cli --help purevpn-cli -h

Delete

Note: Please use double hyphen if you're using "help" as a whole.

Delete

Disconnect PureVPN

  • To disconnect from the VPN, simply enter the following command:
Purevpn-cli --disconnect OR purevpn-cli -d
Delete

Note: Please use double hyphen if you're using "disconnect" as a whole.

Delete

Logout PureVPN

  • To log out from the PureVPN application, enter the following simple command:
purevpn-cli --logout OR purevpn-cli -o

Delete

Note: Before logging-out, make sure that VPN is not connected. Also, please use double hyphen if you're using "login" as a whole.

Delete