In this article, we’ll explore the use of a VPN on Linux and we’ll show you how to install a VPN.
Do you need a VPN if you’re on Linux?
Let’s start with the question most Linux users (beginners) have – do you even need a VPN on Linux? And the answer depends on how and where you use your devices. Depending on your needs and how you use your device(s), a VPN is really handy, or a must-have. Using a VPN itself doesn’t have anything to do with the operating system you’re using it on. All the use cases for a VPN are the same for all operating systems, including smartphones. A Linux distro by itself may be more secure than Windows, but that doesn’t mean you shouldn’t use a VPN.
Reasons why you’d need a VPN on Linux
Here are some reasons why you’d need a VPN on Linux:
Watching geo-locked content
By using a VPN, you can set your IP address to whatever location you need, so you can watch whatever geo-locked content you want to.
If you’re like me (not from the US), a lot of online content will be blocked for you. It’s the main reason why I use my VPN – watching content that’s locked to US visitors only. I mostly use it on YouTube and Netflix, but I’ve found myself using it to watch videos on websites like CBS and NBC. I also watch a lot of anime – Japan and the UK have a lot more animes to choose from on Netflix, so I always use my VPN from those locations to watch the animes that are not available from my location. If you’re playing games on certain geo-locked servers, you’ll also be able to join them if you use a VPN.
You can also get other perks by spoofing your location – certain websites offer discounts to certain locations only – so if you sign up using a different IP address, you might get a better sign-up bonus or better rates.
If you’re traveling to other countries and all the content you get is in that country’s language, you can use a VPN to avoid the localized websites that use your IP address.
Using a public network
When using a public/open network, it’s strongly recommended that you use a VPN. Hackers can easily snoop traffic on that public network and gather your important, sensitive data.
That’s why I have a VPN on my phone – when I connect to a public WiFi, I always turn my VPN on. It gives me peace of mind and I worry less about what I’m doing on my phone.
Being more secure and valuing your privacy
Sometimes you just need the peace of mind that you’re anonymous (to an extent) online. I, like anybody else, don’t like it when websites like Facebook steal and use my data for advertising purposes. Even worse, some ISPs might sell your data too, and in some cases, you don’t even have a second option for an ISP than the one you’re currently using. A VPN might help in such cases.
A smarter (arguably) way to be anonymous on the internet would be using the Tor network (or Tails), but a VPN helps too.
What I like the most when using a VPN is the peace of mind I get that my data is more secure, as compared to not using a VPN.
Accessing blocked websites
Some countries block certain websites and services from their citizens. However, certain countries block the use of a VPN too, so it’s quite difficult to bypass this. VPN providers usually have extra tools or workarounds so you can use a VPN in countries like China and Russia.
The drawbacks of VPNs
VPNs aren’t perfect. Here are some drawbacks of using a VPN on Linux:
- They’re not free. Although some VPNs do claim that they are free, IMHO, you’re at more risk using a “free” VPN than not using one at all. However, Tails and Tor are truly free, but the use cases as compared to a VPN are totally different.
- Some websites detect that you’re using a VPN, and they categorize it as suspicious traffic. In those cases, you’ll be blocked from using that website.
- Installing a VPN can be difficult. Most VPN providers do offer client apps that make it easy to install and use, but some don’t. If you’re using your own VPN server, it can be even more difficult to set up a VPN client yourself.
- Some VPN providers don’t allow using torrents. Downloading and seeding torrents by itself might be legal, but people usually use torrents to download pirated content. So some VPN providers don’t allow this. It’s best to check with the VPN provider to see if they allow torrents with their VPNs.
- Slow speeds. Most VPN providers have decent speeds, but some don’t. Again, it’s best to check with the VPN provider for what speed they guarantee. Although rare, some VPNs are quite slow.
How to Install a VPN on Linux
There are a couple of ways of installing and using a VPN on Linux:
- Installing a VPN server on your own Linux VPS. This can be quite complicated and not really cost-effective, which is why people tend to use the other option:
- Buying a VPN and setting up the VPN provider’s own client apps. This is much easier, cost-effective, and it’s what I personally use. You can also set up the OpenVPN client with any provider’s VPN, even your own.
I use Surfshark on my Linux distros and on my Android smartphone. Their VPN client app supports all Debian-based distros. I use it on my Ubuntu, Linux Mint Xfce, and Debian laptops. For my Manjaro desktop, I just use their Firefox addon.
So, here are the steps on how to install the Surfshark Linux VPN on any Debian-based distro (although I only tested this on Ubuntu):
Step 1: Open up Terminal and update your system
We’ll do this tutorial via the CLI (it’s easier), so open up Terminal with CTRL + ALT + T.
First, before installing anything, it’s recommended to update your system with the following commands:
sudo apt-get update
sudo apt-get upgrade
Step 2: Download the VPN client app
Next, download the client app (64-bit only) from the link above. The link may be different depending on when you’re reading this.
First, navigate to opt:
And download the file:
Step 3: Install the app
After you download the .deb file, install it with the following command:
sudo dpkg -i surfshark-release_1.0.0-2_amd64.deb
And update your repos again:
sudo apt-get update
Finally, install the app with:
sudo apt-get install surfshark-vpn
Step 4: Use the app
To start the VPN, run the following command:
And follow the easy prompts for login, location, etc.
You can close the Terminal and continue using your system, the VPN will continue to run in the background.
You can do more stuff with Surfshark via the CLI, run the following command to get a list of all the commands:
sudo surfshark-vpn help
surfshark-vpn help - shows this message surfshark-vpn attack - quick connects to nearest server surfshark-vpn multi - connects to a MultiHop server surfshark-vpn down - kills already running vpn client surfshark-vpn status - show status surfshark-vpn forget - logouts from the app surfshark-vpn version - shows version
Or you can also watch this video. If you prefer a GUI, you can set up OpenVPN with Surfshark, or any other VPN provider.
And that’s it. You’re now using a VPN on Linux.