Get Surfshark
  • Search
  • EN
  • Log in
  • Get Surfshark
  • Menu
Recommended by:
4.3 out of 5

VPN for Linux: How to install and run Surfshark

  • Easy security and privacy when online
  • Access to worldwide content bypassing all censorship
  • Simple to install and use on Ubuntu & other distros

Works on Ubuntu, Debian

linux vpn

Surfshark VPN for Linux

Why use a VPN on Linux? There are a few good reasons.

Don’t lose control online

Don’t lose control online

Linux keeps you in control of the processes on your device. This control ends where online begins. 

To achieve privacy and security, you need to encrypt your data and route it via a trustworthy VPN server to obfuscate your IP address. And this is the area where Surfshark is really good at.

Access any entertainment you want

There are ways to get around software being incompatible with Linux distros – for example, using Wine for Windows apps. 

Think of a Linux VPN as Wine for online entertainment. Whether it’s YouTube videos, streaming libraries, or entire services “incompatible” with your country, you can make them work for you by installing Surfshark.

Access any entertainment you want

Want to learn about the excellent uses of Surfshark in more detail?

Check this page out

How to download a VPN for Linux

Once you’re ready to get a Linux VPN, follow this simple guide to download it:


Subscribe to Surfshark.


Download the installer.


You’re now ready to install it!

How to install a VPN for Linux

Installing a Linux VPN is a little more involved than downloading it, but it isn’t hard. 

  1. Once you have downloaded the installer, open the terminal (CTRL+ALT+T in Ubuntu).
  2. Type in sudo apt-get install {/path/to/}surfshark-release_1.0.0-1.1_amd64.deb into the terminal and press Enter. 
  3. To update it, enter sudo apt-get update.
  4. Complete installing Surfshark with the command sudo apt-get install surfshark-vpn.
  5. You are now ready to use your Linux VPN!

After installing Surfshark, you can command it via the terminal. 

How to use a VPN on Linux

Here are some of the most common (and useful) commands for Surfshark on Linux:

1. You run Surfshark by entering sudo surfshark-vpn and pressing Enter. You’ll have to enter your computer’s root password to proceed.
2. You will then be asked to enter your Surfshark registration email address and then the account password.
3. Now you’re running Surfshark.

To connect to a server:

1. After you launched Surfshark, you’ll see a list of server locations, each with a number. Enter that number and press Enter to connect to that server.
2. You’ll be asked to choose between the UDP and TCP protocol. UDP is generally faster, so type in the number associated with UDP and press enter.
3. Upon connecting to the server, you’ll see your new IP in the window!

To disconnect from a server:

1. Type in sudo surfshark-vpn down in the terminal and press Enter. That’s it!

Other useful commands:

1. To show all possible Surfshark commands, enter sudo surfshark-vpn help.
2. To check your connectivity, enter sudo surfshark-vpn status.
3. To quickly connect to your fastest/optimal server, enter sudo surfshark-vpn attack.
4. To establish a Multihop connection, enter sudo surfshark-vpn multi.

Armed with this knowledge, you will be able to make full use of your Linux VPN.

Things to love about Surfshark VPN’s Linux Client

Strict no-logs policy

Strict no-logs policy

It doesn’t make sense to get a VPN for privacy just to end up being tracked by the provider. That’s why Surfshark is dedicated to keeping no logs. What’s even better, our 100% RAM servers provide an additional security layer if someone would try to seize them.

Serious encryption

Serious encryption

Encryption is key to making your internet traffic unreadable to spies. Therefore, Surfshark is one of the handful of VPN providers that use AES-256-GCM - not only practically unbreakable but also really fast in execution.

Private DNS servers

Private DNS servers

Your device calls up the DNS server to translate to website addresses into IP addresses it can use. This gives DNS providers a lot of power over you - and that’s why Surfshark uses its own DNS service to maintain the best service it can.

Unlimited devices

Unlimited devices

How many devices do you want to protect with VPN? With Surfshark, that question is pointless as one account is enough to run the app simultaneously of infinite devices. Protect everything you can reach!


Do I need a VPN with Linux?

Yes, you need a VPN with Linux. The danger of being hacked may be a bit lower than for the regular Windows user. Yet areas where Linux VPN can help you are still massive:

  • VPN obscures your traffic from your ISP or anyone else who’d like to spy on it. Instead of knowing what websites you’re visiting or that you’re streaming/gaming/sharing files, they’ll only see VPN traffic. 
  • Geoblocking doesn’t care about your operating system, and can affect even something as simple as your access to YouTube videos or news sites.

In fact, most of the points outlined here apply to Linux users as well.

Is there a free VPN for Linux?

Free VPNs exist around the world and for a variety of systems, but they all pale in comparison to paid VPNs:

  • Paid VPNs host more servers in more countries
  • Paid VPNs provide faster connection speeds
  • Paid VPNs don’t have speed caps, advertising, or other such means of trying to monetize a “free” platform
  • Paid VPNs have the funding to put into research and development that keeps them at the forefront of the security race, up to and including the physical security of the servers
  • Free VPNs often leak data, don’t provide encryption, and often contain malware

So even if free Linux VPNs are out there, you’re much better off sticking with a paid VPN (like Surfshark).

Is VPN legal?

VPN use is legal in nearly every country in the world. Only a few oppressive regimes limit its use.

However, if you use a VPN to partake in illegal activities – like pirating copyrighted material – the law may still come after you.

Why use VPN for Linux instead of Tor?

Tor has the undeniable benefit of being free. However, it is limited in usability as it puts privacy above all other considerations. 

Tor routes your encrypted traffic via three nodes, which makes it slow. Even the Tor Browser FAQ tells you not to use it for streaming or sharing files. 

There’s also the issue with Tor nodes being provided by volunteers. As such, there’s no way to know if malicious agents and state security agencies did not compromise them. Holding both the entry and exit nodes makes it possible to correlate someone’s online activities if they joined over those.

Also, some ISPs are suspicious of people using Tor.

Luckily for you, using Tor with over VPN solves the entry node and ISP snooping issues. 

Get Linux-level privacy online with Surfshark!

30-day money-back guarantee