How to Install TeamViewer on Ubuntu 24.04, 22.04 or 20.04

TeamViewer is a widely-used remote access and control software that allows users to connect to and manage computers or servers from anywhere in the world. It’s known for its ease of use, secure connections, and support for a wide range of platforms. TeamViewer is often used for remote support, online meetings, and file sharing, making it a versatile tool for both personal and professional use.

To install TeamViewer on Ubuntu 24.04, 22.04, or 20.04, you can use the official TeamViewer APT repository, which ensures you have access to the latest updates and features. This guide will walk you through the installation process using the command-line terminal, and will also cover some useful TeamViewer terminal commands for users who prefer not to use the graphical interface.

Update Ubuntu Before TeamViewer Installation

First, ensure your Ubuntu system is up-to-date with all existing packages. Do this by running the following command:

sudo apt update && sudo apt upgrade

This command will update the package list and upgrade all installed packages to their latest version.

Install Initial Packages For TeamViewer

Next, install the required dependencies for TeamViewer. Although your system likely already contains most of these packages, running the command below will ensure their installation:

sudo apt install software-properties-common apt-transport-https curl ca-certificates -y

These packages are essential for adding external repositories and performing secure transfers over HTTPS.

Import TeamViewer GPG Key and Repository

First, you need to verify the authenticity of the packages; you’ll need to import the GPG key to your keychain. You can do this by executing the following command in your terminal:

curl -fSsL https://linux.teamviewer.com/pubkey/currentkey.asc | sudo gpg --dearmor | sudo tee /usr/share/keyrings/teamview.gpg > /dev/null

Next, you’ll need to import the TeamViewer repository by running the following command:

echo "deb [arch=amd64 signed-by=/usr/share/keyrings/teamview.gpg] http://linux.teamviewer.com/deb stable main" | sudo tee /etc/apt/sources.list.d/teamviewer.list

Install TeamViewer via APT Command

After importing the repository, update your APT package list to reflect the changes by running the following:

sudo apt update

Finally, install TeamViewer by running the following command:

sudo apt install teamviewer

Note: You may be prompted to keep the source or import the maintainer during the installation. It is recommended to choose the option to compare changes and keep the original if they are still the same. Type “N” to proceed.

Example of selecting No to replace the TeamViewer.list source you imported earlier!:

Launch TeamViewer UI

CLI Command to Launch TeamViewer UI

One way to launch TeamViewer is by using the command line terminal. You can quickly open it by executing the following command:

teamviewer

GUI Path to Launch TeamViewer UI

For desktop users who prefer not to use the command line, the best way to use TeamViewer is to open the GUI of the application by following the path:

Activities > Show Applications > TeamViewer

Wayland Potential Issues and Fix

If you use Wayland, you might see an error message indicating TeamViewer doesn’t support it. Although developers have discussed Wayland support for years, they won’t implement it soon, potentially taking a decade. To use TeamViewer in the interim, log out and back in using Ubuntu on Xorg.

Example of Wayland detected error message on TeamViewer directly under password:

To log in using Ubuntu on Xorg, click on the gear icon in the bottom right corner of the login screen and select “Ubuntu on Xorg” before logging in.

Once TeamViewer is open, you can start using it to connect to a remote PC by getting its address or giving another user your own.

Example of TeamViewer on Xorg and error message gone on Ubuntu:

Additional Commands for TeamViewer

TeamViewer Terminal Commands

Using TeamViewer in a Ubuntu terminal is a convenient way to access and control other devices remotely. Here are some quick tips on how to use TeamViewer in a terminal on Ubuntu:

Connect to a Remote Device:

Connect to a remote device by entering its ID and password. You can do this by executing the following command in the terminal:

teamviewer -i [remote ID] -p [remote password]

Replace [remote ID] with the ID of the remote device you want to connect to and [remote password] with the password shared by the device owner.

Start a Remote Session:

To start a remote session, use the following command:

teamviewer -i [remote ID] -p [remote password] -l

This command will start a remote session with the device and open it in a new window.

Enable Fullscreen Mode:

To enable fullscreen mode in the remote session window, use the following command:

teamviewer -i [remote ID] -p [remote password] --Fullscreen

This command will maximize the remote session window to fullscreen mode.

Enable Remote Control:

To enable remote control in the remote session window, use the following command:

teamviewer -i [remote ID] -p [remote password] --RemoteControl

This command will enable remote control, allowing you to control the remote device as if sitting in front of it.

Change the Quality of the Remote Session:

To change the quality of the remote session, use the following command:

teamviewer -i [remote ID] -p [remote password] --quality [quality level]

Replace [quality level] with the desired quality level, ranging from 0 to 9, with 9 being the highest quality.

Transfer Files:

To transfer files between your local machine and the remote device, use the following command:

teamviewer -i [remote ID] -p [remote password] --FileTransfer

This command will open the File Transfer window, allowing you to browse and transfer files between the two devices.

Record the Remote Session:

To record the remote session, use the following command:

teamviewer -i [remote ID] -p [remote password] --record

This command will start recording the remote session and save it to your local machine.

End the Remote Session:

To end the remote session, use the following command:

teamviewer -i [remote ID] -p [remote password] --kill

This command will terminate the remote session and close the TeamViewer window.

Update TeamViewer

The software should update automatically with your system packages for desktop users using the APT package manager. However, if you would like to check manually, you can use the following command in your terminal:

sudo apt update && sudo apt upgrade

This command will update all the packages on your system, including TeamViewer if a newer version is available.

Remove TeamViewer

If you no longer want TeamViewer installed on your system, you can remove it using the following command:

sudo apt remove teamviewer

This command will remove TeamViewer, including all its configuration files, from your system.

If you plan not to re-install the software again, you can remove the repository list file by executing the following command:

sudo rm /etc/apt/sources.list.d/teamviewer.list

This command will delete the repository list file, preventing your system from downloading updates for TeamViewer in the future.

After removing the repository list file, you can remove the GPG key by executing the following command:

sudo rm /usr/share/keyrings/teamviewer.gpg

Final Thoughts

With TeamViewer installed on your Ubuntu system via the official APT repository, you can enjoy seamless remote access and control with the latest features and security updates. The repository ensures your installation stays up-to-date, and by exploring the TeamViewer terminal commands, you can manage remote sessions more efficiently without relying on the GUI. Whether you’re providing remote support or accessing your home computer from afar, TeamViewer offers the flexibility and control you need on Ubuntu.

2 thoughts on “How to Install TeamViewer on Ubuntu 24.04, 22.04 or 20.04”

Leave a Comment