Private Internet Access (PIA) provides diverse setup methods for Linux, including the easiest process involving installing the native PIA app for Linux.
On the PIA Linux up, you can easily update the VPN, set up features like port forwarding, and uninstall the app.
Thankfully, PIA is compatible with various Linux distros such as Ubuntu, Debian, Fedora, and CentOS. So, you can always benefit from its robust security and commitment to user privacy.
Learn how to install or configure a Private Internet Access server on your Linux machines.
How to Set Up the Private Internet Access App for Linux?
Here’s how to install the PIA native Linux application:
- Buy a Private Internet Access subscription.

- Download the PIA app for Linux from the Private Internet Access website.

- Launch the terminal on your Linux machine. I’ll use Ubuntu for this guide.

- Type in the command “cd Downloads” to change into the directory where the PIA for Linux file is saved.

- Use the command “sh [filename of the PIA for Linux file].” In this case, I entered the command “sh pia-linux-arm64-3.3.1-06924.run.”

- Enter your system user password to continue the installation.

- Once the installation is successful, it’ll display a Quick Tour/Login Window.

- Click “Login” and enter your PIA account credentials.
- Click “VPN Server” to select your preferred server location. I recommend connecting to the server closest to your location for optimal performance. I chose the US – Florida server.
- Click the “Power Button” to establish a VPN connection.
How to Set Up PIA for Linux via Manual Connection Scripts?
Another way to set up Private Internet Access on Linux is to use manual connection scripts. While this method isn’t as simple as the PIA native Linux app setup, you can follow these steps to obtain the same results:
- Get a PIA subscription. Grab our time-limited discounts now!

- Go to PIA’s GitHub repo to get the scripts.

- Click Code > Download Zip to download the compressed folder.

- Launch “Files” from the app drawer on your Linux machine.

- Locate the directory where the compressed folder you downloaded is saved. In this case, it is in the “Downloads” directory.

- Right-click the compressed file and select “Extract Here.”

- Launch your Linux terminal to start the installation process.

- Type “cd Downloads/[name of the uncompressed folder]” to change into the uncompressed folder. Here, I entered the command “cd Downloads/manual-connections-master.”

- Enter the command “sudo ./run_setup.sh” to run the script.

- Enter your system administrator password.

- Enter your Private Internet Access username and password.

- If your terminal displays the error “jq could not be found,” you must install jq.
- To install jq, first, enter Ctrl + C to stop executing the current script. Then, run the command “sudo apt install -y jq.”

- Once you’ve installed jq, rerun the script using the command “sudo ./run_setup.sh” and enter your PIA username/password.

- Once the question “Do you want to use a Dedicated IP token” comes up, enter “Y” for yes or “N” for no.

- Enter “Y” for yes or “N” for no to allow or disable IPv6. I recommend disabling it, as it sometimes interferes with your VPN connection.

- Choose if you want to manually select a server or auto-connect to a server with the lowest latency.

- Enter the maximum latency you want to allow. I’ll set mine to 100.

- You’ll get servers with 100ms latency or less to connect to.

- Select your preferred server location. I’ll choose US – California (131) for this guide.

- Press “W” to select the WireGuard protocol or “o” to choose the OpenVPN connection method. I’ll select WireGuard for this guide.

- Your Private Internet Access is now all set up on your Linux system, and you can enjoy anonymity while browsing the internet.

How to Set Up PIA for Linux Using OpenVPN?
You can also use the OpenVPN setup to manually configure Private Internet Access on your Linux. Here’s a straightforward process to help you:
- Buy a PIA subscription.
- Open your Linux terminal from your app menu.

- Type “sudo apt-get install openvpn” to install OpenVPN.

- Enter your system admin password.

- Enter the command “cd /etc/openvpn” to switch to the OpenVPN directory.

- Download the PIA Linux zip file using the command “sudo wget https://www.privateinternetaccess.com/openvpn/openvpn-nextgen.zip” or “sudo curl -o openvpn.zip” https://www.privateinternetaccess.com/openvpn/openvpn-nextgen.zip”

- Type the command “sudo unzip openvpn zip” to unzip the file.

- Enter the command “sudo openvpn cofig-serverlocationname.ovpn.” In this case, I entered “sudo openvpn us_california.ovpn.”

- Type your Private Internet Access username and password.

- Once it displays “Initialization Sequence Completed,” you’ve successfully connected to PIA on your Linux system.

How to Uninstall the PIA Linux App?
Uninstalling PIA from your Linux machine is a breeze since you get an in-app installer. Here’s how:
- Launch the Private Internet Access native Linux app.
- Click the power button again to disconnect from the server location. This step is only necessary if you’re still connected to the VPN.
- Open Settings by clicking the three dots on the top right of the app homepage.
- Click “Help” from the menu on the left.
- Click “Uninstall Private Internet Access.”

- To continue the installation process, you’ll receive a prompt from the terminal, “Proceed with uninstall.” Type “Y” and press Enter.

- Once the terminal displays “Stopped existing client,” the PIA app has been stopped.

- Enter your sudo password to complete the installation.

How to Uninstall PIA on Linux Through the Terminal?
If you didn’t install PIA for Linux via its app, you can uninstall the VPN through your Linux terminal. Follow these simple steps:
- Launch the terminal in your Linux system.

- Enter the command “rm -rf ~/.config/privateinternetaccess” and press Enter.

- Type in “rm -rf ~/.config/PrivateInterntAccess” and press Enter.

- Finally, enter “sudo rm -rf /opt/piavpn.” You may be prompted to enter your root/admin password. Type in your password and press Enter again.

- If you want to remove the PIA app icon from your Linux application menu, enter “sudo rm -rf /usr/share/application/piavpn.desktop.”

The PIA app is now completely uninstalled from your Linux system.
How to Set up Port Forwarding Through PIA on Linux?
Setting up port forwarding through PIA on your Linux machine is a breeze.
Port forwarding enables remote access to your Linux system through tools like SSH (Secure Shell) or VNC (Virtual Network Computing).
You can set up the PIA port forwarding directly through the PIA Linux app or manually on the terminal.
How to Set PIA’s Port Forwarding Through Linux App?
Using the Private Internet Access app is the easiest way to set up PIA port forwarding on your Linux machine. Here’s how:
- Launch the PIA Linux app and click the three vertical dots at the top right of the app.
- Click Settings > Network. Check the “Request Port Forwarding” box.

- Return to the PIA homepage and click “VPN Server” to select a server location.
- Click a server with port forwarding support. Note that any server location that doesn’t support port forwarding will be greyed out. When you hover over it, you’ll get the message “Port forwarding is not available for this location.”
- Click the big button to initiate a VPN connection. The port forwarding detail, including VPN IP, is at the bottom right.
How to Set PIA’s Port Forwarding on Linux Manually?
If you set up the PIA VPN using Manual Configuration Scripts, you should activate port forwarding similarly.
Follow these steps to get it done:
- Obtain the configuration scripts from PIA’s GitHub repo.

- On the right side of the repo, click “Code” then “Download Zip.”

- Open “Files” on your Linux system to access the downloaded compressed folder.

- Right-click on the file and select “Extract Here” to uncompress the folder.

- In your Linux terminal, type “cd Downloads/[name of the uncompressed folder]” to change the directory to that of the folder. In this case, I entered “cd Downloads/manual-connections-master.”

- Run the configuration script using the command “sudo ./run_setup.sh.”

- Enter your system administrator password.

- Enter your PIA username and password to continue.

- Enter “Y” once you get the question, “Do you want port forwarding assigned?” Then, press Enter to continue.

FAQs
Does Private Internet Access (PIA) Support WireGuard on Linux?
Yes, Private Internet Access supports the WireGuard protocol on Linux.
The easiest way to change protocol is to use the PIA native Linux app.
You can also set the WireGuard protocol on your Linux machine using your terminal’s manual connection script.
Can I Use Private Internet Access (PIA) With Network Manager on Linux?
No, Private Internet Access doesn’t support connection via Network Manager on Linux. To connect to PIA on Linux, you can use the PIA native Linux app, set up manual connection scripts, or use the OpenVPN method.
How Can I Optimize PIA’s Performance on Linux?
You can optimize the Private Internet Access performance on Linux by switching to the WireGuard protocol, selecting a server closest to your physical location, or getting a PIA-dedicated IP address for an extra layer of security.
Empower Your Linux Experience With PIA
Private Internet Access provides a user-friendly native app for Linux users, making the setup process seamless and straightforward.
Thankfully, you also get all the exceptional PIA features available to Windows and MacOS users via the app setup.
Join the PIA train by grabbing my exclusive discounts to save on the multiyear deal today!