Skip to main content

Linux - Installing OpenVPN through the Terminal

Alternitive Setups

While the application is functional on most distributions of Linux there are some distros or Desktop Environments that are yet to be tested and supported. In order to protect your unsupported device most linux distros have the capability to use openvpn from the command line to connect to the VPN servers. Some of the commands below will need to be adjusted based on your distribution such as apt-get which will need to be swapped for the equivalent to your system.I have included some of the more common distributions below.

Step 1: Open the terminal.

Step 2: Install Openvpn:

  • For Debian Based: sudo apt-get install openvpn

  • For Slackware based: zypper in openvpn

  • For Redhat Based: sudo yum install openvpn

  • For Arch Based: sudo pacman -S openvpn

Step 3: Change Directory: cd /etc/openvpn

Step 4: Download the zip file:

sudo wget https://www.privateinternetaccess.com/openvpn/openvpn.zip

OR

sudo curl -o openvpn.zip https://www.privateinternetaccess.com/openvpn/openvpn.zip

Step 5: Unzip the file: sudo unzip openvpn.zip

Step 6: Connect: sudo openvpn config-filename-goes-here.ovpn

Now you can connect and start browsing anonymously!

Some networks are configured to be more restrictive than others, which can sometimes interfere with VPN connections. In the event the default files do not work, please try redoing the config file portion of the OpenVPN install and replace the https://www.privateinternetaccess.com/openvpn/openvpn.zip file with one of the URLs listed below; please try each set until one of them works:

https://www.privateinternetaccess.com/openvpn/openvpn-ip.zip

https://www.privateinternetaccess.com/openvpn/openvpn-ip-lport.zip

https://www.privateinternetaccess.com/openvpn/openvpn-tcp.zip

https://www.privateinternetaccess.com/openvpn/openvpn-ip-tcp.zip

Authors list

First published: 04/04/2018

Last updated: Sep 6, 2019 by Joseph Calhoon