How to set up Surfshark VPN on Linux (Legacy version)




In this tutorial, you will learn how to install the Surfshark VPN client on your Linux device. This client is the only thing you will need to protect your data, bypass censorship, and enjoy streaming content on your machine.


You will need a computer running Ubuntu or Debian operating system and an active Surfshark subscription. 

 

Don't have a subscription yet? Get Surfshark here.

You will learn how to:

 

Install the VPN client

  1. Right-click here, copy the link, and paste it into the terminal next to the command as shown below:

    sudo wget [insert the copied link]

  2. After the download is complete, enter the command below

    sudo dpkg -i [insert the downloaded file name]

  3. If you are using Ubuntu, continue the installation as shown below. On other Linux distributions, open the Terminal and proceed to step 5.

    Click_the_Install_button.png

    After a successful installation, the white Install button will turn into a red Remove button, (see the picture above).

    Installed.png

  4. Now open the terminal. You can do that by pressing Ctrl+Alt+T keys or navigating to it in your apps menu.

    Open_a_terminal.png

  5. First, type this command and press Enter:

    sudo apt-get update

    sudo_apt-get_update.png

  6. Then install Surfshark VPN by entering this command:

    sudo apt-get install surfshark-vpn

    sudo_install_the_app.png

Connect to the VPN

  1. To run Surfshark VPN type this command in the Terminal:

    sudo surfshark-vpn

    You'll need to enter your computer root user's password to continue with Surfshark client. This is necessary for Surfshark to be able to create and manage the VPN tunnel. 

    sudo_start.png

    After that, enter the email address you used when registering and click Enter. Then type your password and press Enter again.

    enter_SS_creds.png

  2. You will see a full list of Surfshark locations.  A number identifies each location.

    To select a location, type the number next to it to the terminal and press
    Enter.

    choose_location.png

  3. Surfshark for Linux uses OpenVPN protocol. You can choose between two options: UDP and TCP. We recommend UDP for better speeds and it is suggested by default, so you can continue by pressing Enter.

    choose_the_protocol.png

  4. Success, you're now connected! You can see the connection status and your new IP.

    Status_connected.png

    You can now close the terminal or minimize it. It doesn't have to be open for Surfshark to run in the background.

  5.  In order to disconnect, open the terminal and enter this command:

    sudo surfshark-vpn down

    vpn_down.png

Other commands

These are all the commands that will allow you to control your Surfshark client: 

 

  1. Use this command to print all Surfshark commands in the terminal:

    sudo surfshark-vpn help

  2. Check your connectivity status:

    sudo surfshark-vpn status

  3. Disconnect from Surfshark VPN:

    sudo surfshark-vpn down

  4. Quick-connect to your Optimal location:

    sudo surfshark-vpn attack

  5. To log out of the client:

    sudo surfshark-vpn forget

  6. To connect to a MultiHop location:

    sudo surfshark-vpn multi

  7. To uninstall Surfshark:

    sudo apt-get remove surfshark-vpn

 

Make sure your connection was successful

 

It's always recommended to check whether your connection was successful after setting up a VPN for the first time. This can be easily done by doing an IP leak test and a DNS leak test which is available on our website. Click here to find out how to make sure your connection was successful.

 

Congratulations - you have successfully installed and configured your Surfshark VPN client! As long as you’re connected, your location is private and your sensitive data is secure.



You may also be interested in:

  1. How to make sure if my connection was successful?
  2. How to enable 2FA on your Surfshark account?
  3. Linux unstable connection troubleshooting

 

 

Was this article helpful?
Thank you for your feedback!