Skip to main content
All CollectionsPureVPN Linux
Set up PureVPN Command Line App on Linux
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.

Updated over a year ago

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.

  • 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

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

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

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

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

Locations list

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

  • purevpn-cli --location OR purevpn-cli -l

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

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

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

Check account details

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

  • purevpn-cli --account purevpn-cli -a

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

Find app version

  • To check the version of your Linux application, use the following command:

  • purevpn-cli --version purevpn-cli -v

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

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

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

Disconnect PureVPN

  • To disconnect from the VPN, simply enter the following command:

  • Purevpn-cli --disconnect OR purevpn-cli -d

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

Logout PureVPN

  • To log out from the PureVPN application, enter the following simple command:

  • purevpn-cli --logout OR purevpn-cli -o

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

Did this answer your question?