TeamViewer is a popular software for remote access over the Internet to and from your system for Linux, MacOS and Windows. This application can connect to any personal computer or server so that you can use it as if you were sitting right in front of it. TeamViewer works as a remote control for your partner’s computer system and allows you to establish a remote session. Both you and your partner must have this small application installed and running, even if you are not an administrator. All you need to know is your partner’s ID and password to control his computer.
In this article, we will explain how to install the TeamViewer application on your Ubuntu system, both from the user interface and from the command line.
The commands and procedures mentioned in this article were executed on a Ubuntu 20.04 LTS system, the same instructions can be used for the older Ubuntu 18.04 version as well.
Installation of TeamViewer Through Ubuntu Command Line
If you prefer the command line over the graphical interface, follow these steps in order to install TeamViewer through the Ubuntu Terminal application:
Step 1: Download and add TeamViewer repository key
Open the Terminal either through the system Dash or the Ctrl+Alt+T shortcut.
First, you need to download the TeamViewer repository key as we will installing TeamViewer through its official website. Run the following command in order to download the key:
$ cd /tmp $ wget https://download.teamviewer.com/download/linux/signature/TeamViewer2017.asc
The .asc key file will be downloaded to your Downloads folder by default.
Please add this key to your system through the following apt-key command as sudo:
$ sudo apt-key add TeamViewer2017.asc
Run the following command to add the official TeamViewer repository from where we will be installing TeamViewer.
For TeamViewer Stable version:
$ sudo sh -c 'echo "deb http://linux.teamviewer.com/deb stable main" >> /etc/apt/sources.list.d/teamviewer.list'
For TeamViewer Preview version:
$ sudo sh -c 'echo "deb http://linux.teamviewer.com/deb preview main" >> /etc/apt/sources.list.d/teamviewer.list'
We are adding the repository for TeamViewer Preview version in this tutorial.
Now, enter the following command as root in order to update your system’s repository index with that on the internet:
$ sudo apt update
Step 3: Install TeamViewer through the apt command
Finally, run the following command as sudo in order to install TeamViewer to your system:
$ sudo apt install teamviewer
The system will prompt you with a Y/n option in order to continue the installation procedure. Please enter Y and hit Enter to continue. TeamViewer will then be installed on your system.
Step 4: Launch TeamViewer
If you wish to launch TeamViewer through the command line, enter the following command in your Terminal:
In order to uninstall TeamViewer from your system without removing any configurations you might have made, enter the following command as sudo:
$ sudo apt remove teamviewer
The system will prompt you with a Y/n option in order to begin the uninstall procedure. Please enter Y and hit Enter to begin. TeamViewer will then be removed from your system.
If you have made any configurations, you can remove TeamViewer and all those by using the following command:
$ sudo apt purge teamviewer
TeamViewer Installation on Ubuntu Through Graphical Installer
For a person who does not want to open the Command Line much, installing a software present in the Ubuntu repository through the UI is very simple. For Teamviewer, we will be downloading the .deb package and then install it through the Ubuntu Software Install.
You can download the official .deb installation package from the following website:
Scroll down on the page and click on the download link for Ubuntu, Debian (stable version) or TeamViewer Preview version.
Save the file on your system, which will be saved to the Downloads folder by default.
Open the Downloads folder where you will be able to see the TeamViewer .deb package.
Right click on the package and select the Open with Software Install option from the menu. This will open the following installer:
Click the Install button on the above window. The following authentication dialog will display for you to provide the authentication details for a sudo user as only an authorized user can install a software on Ubuntu.
Enter your password and click the Authenticate button. After that, the installation process will begin, displaying a progress bar as follows.
TeamViewer will then be installed to your system and you will get the following message after a successful installation:
You can launch TeamViewer any time you want by entering ‘TeamViewer’ in the Ubuntu Dash or access it from the Applications list.
TeamViewer will open in the following view; through which you can connect or be connected to a remote computer.
Uninstalling Teamviewer through the UI is fairly simple. On your Ubuntu desktop Activities toolbar, click the Ubuntu Software icon.
The Ubuntu Software manager will open in the following view:
Click on the Installed tab and locate the TeamViewer entry from the list of installed software.
Click the Remove icon against the TeamViewer entry.
A dialog will ask you if you are sure about removing the software from your system. Please enter the Remove button to uninstall TeamViewer. An authentication dialog will display for you to provide the authentication details for a sudo user as only an authorized user can install a software on Ubuntu. Enter your password and click the Authenticate button. After that, the uninstall process will begin, removing TeamViewer from your system.
By following the steps described in this article, you can learn to download and install the latest version of TeamViewer on your Ubuntu system, both through the graphical user interface and the command line.