Getting Started With TeamViewer on Ubuntu

Published:16 November 2022 - 5 min. read

Nicholas Xuan Nguyen Image

Nicholas Xuan Nguyen

Read more tutorials by Nicholas Xuan Nguyen!

Connecting to people and machines worldwide is now easier than ever with TeamViewer. But installing TeamViewer on Ubuntu is not as straightforward as on Windows.

No worries! This tutorial will walk you through the process of installing TeamViewer on Ubuntu.

Read on and stay connected with your team with TeamViewer!

Prerequisites

This tutorial will be a hands-on demonstration. To follow along, be sure you have the following:

  • An Ubuntu machine to install TeamViewer on – This tutorial uses Ubuntu 20.04 LTS, but any recent Ubuntu will work fine.

Installing TeamViewer on Ubuntu via the Software Center

TeamViewer supports Cross-platform connections. But since TeamViewer does not come installed by default on Ubuntu, you first have to install this tool on your machine.

The most user-friendly way to install TeamViewer on Ubuntu is via the Software Center, a one-stop shop for all your software needs.

To install TeamViewer from the Software Center:

1. Open your favorite web browser, and visit the official download page for TeamViewer.

2. Under Ubuntu, Debian (lower-left), click the x86 64bit option to download the TeamViewer package for 64-bit Ubuntu systems.

Downloading the TeamViewer deb package
Downloading the TeamViewer deb package

3. Once downloaded, open your file manager, right-click the .deb package and select Open with Software Install. Doing so opens the Ubuntu Software Center and begins installing TeamViewer.

Open the TeamViewer deb package in Software Install
Open the TeamViewer deb package in Software Install

4. Now, click Install on TeamViewer’s overview page to install TeamViewer.

Installing TeamViewer
Installing TeamViewer

5. Enter your password when prompted and click Authenticate to continue with the installation.

Authenticating the package installation
Authenticating the package installation

Below, you can see TeamViewer’s installation progress.

Viewing TeamViewer’s installation
Viewing TeamViewer’s installation

Once installed, you will see a delete icon, as shown below.

Verifying TeamViewer is installed
Verifying TeamViewer is installed

6. Lastly, click on Activities, search for and click TeamViewer to launch the tool.

Launching TeamViewer on Ubuntu
Launching TeamViewer on Ubuntu

Installing TeamViewer via the Terminal

Not a fan of clicking and switching between different windows to install packages? If you are a command-line person, you can install TeamViewer via the terminal in Ubuntu.

1. Run the apt update command below to update your system’s package index.

sudo apt update -y
Updating the package index
Updating the package index

2. Next, run the below wget command to add the TeamViewer’s GPG key since you will install TeamViewer from an external repository.

Why add the GPG key? While installing packages for the first time, APT checks and ensures that it downloads the correct file by matching the cryptographic signature. If there is a mismatch, APT will not install that package.

wget -O - https://download.teamviewer.com/download/linux/signature/TeamViewer2017.asc | sudo apt-key add -
Adding the TeamViewer’s GPG key
Adding the TeamViewer’s GPG key

3. Run the following apt-add-repository command to add the TeamViewer repository to your system.

Ubuntu’s default repositories might not contain the latest version of the software. But adding TeamViewer’s repository ensures you get the latest stable version as soon as it is available.

sudo apt-add-repository "deb http://linux.teamviewer.com/deb stable main"
Adding the TeamViewer repository
Adding the TeamViewer repository

4. Now, rerun the below command to update the package index to include the TeamViewer repository.

sudo apt update -y
Updating the package index to include the Team Viewer repository
Updating the package index to include the Team Viewer repository

5. Once updated, run the apt-cache command below to check the TeamViewer’s repository configuration.

apt-cache policy teamviewer

If the TeamViewer repository is correctly configured, you will see an output similar to the one below.

Checking if the TeamViewer repository is correctly configured
Checking if the TeamViewer repository is correctly configured

6. Next, run the following apt install command to install TeamViewer.

sudo apt install teamviewer -y
Installing TeamViewer on Ubuntu
Installing TeamViewer on Ubuntu

7. Once the installation completes, run the teamviewer command below to launch TeamViewer from your terminal.

teamviewer
Launching TeamViewer via Terminal
Launching TeamViewer via Terminal

8. Finally, tick the I accept the EULA and the DPA checkbox and click Continue to accept the license agreement. This prompt only shows the first time you launch TeamViewer.

Tick the checkbox next to I accept the EULA and the DPA
Tick the checkbox next to I accept the EULA and the DPA

The main interface of TeamViewer will now be shown, like the one below. You can see in the middle that you have been assigned a unique ID and password. This information is required when connecting to this computer from another using TeamViewer.

On the right side, you will see a field where you can enter a partner’s ID to connect to their computer or perform a file transfer.

Viewing the TeamViewer main interface
Viewing the TeamViewer main interface

Connecting to a Remote Computer

Now that you have installed TeamViewer on your computer, you have come to the most exciting part — connecting to a remote machine. This tutorial uses another Ubuntu computer, but you can connect to any machine with TeamViewer running and is connected to the internet.

1. Sign in to your account on your TeamViewer.

Signing in to TeamViewer
Signing in to TeamViewer

2. Next, get the remote machine’s Partner ID and password, and connect to the remote machine with the following:

  • Type in the other machine’s Partner ID in the Partner ID field on TeamViewer on your machine.
  • Ensure the Remote control option is selected.
  • Click Connect to establish a connection between your local and remote machine.
Connecting to a remote machine
Connecting to a remote machine

3. Enter the remote machine’s connection password, and click Log On to authenticate the connection.

Authenticating the remote connection
Authenticating the remote connection

You will see the remote machine’s desktop in a new window if successfully connected.

Below, the right side of the TeamViewer window displays a toolbar with options to chat, transfer files, and so on.

Congratulations! You can now work on the remote machine as if sitting in front of it!

Verifying the local machine has control over the remote machine
Verifying the local machine has control over the remote machine

Installing the TeamViewerPS PowerShell Module

You now have control over the remote machine, which is cool. But do you have to manage everything on the remote machine manually?

Why not install the TeamViewerPS module? The TeamViewerPS is a PowerShell that allows you to interact with TeamViewer API and the local TeamViewer client.

To install the TeamViewerPS module:

1. Login as root, and run the below command on your terminal to launch a new PowerShell session.

pwsh
Launching a new PowerShell session
Launching a new PowerShell session

2. Next, run the Install-Module command below to install the TeamViewerPS module.

Install-Module TeamViewerPS

Type A and press Enter to continue with the installation.

Confirming the TeamViewerPS module installation
Confirming the TeamViewerPS module installation

Confirming the TeamViewerPS module installation

3. Now, run the following Update-Module command to update the TeamViewerPS module to the latest version.

Update-Module TeamViewerPS
Updating the TeamViewerPS module
Updating the TeamViewerPS module

Using the TeamViewerPS PowerShell Module

After installing the TeamViewerPS Module, it is time to see if the module actually works. The TeamViewerPS module lets you automate tasks such as but not limited to the following.

  • Retrieving a list of online clients.
  • Connecting or disconnecting from machines.
  • Or even uninstalling the TeamViewer application.

But since these tasks require a paid TeamViewer subscription, you will run the basic commands instead to test the TeamViewerPS PowerShell module.

1. Run the below command to check the TeamViewer version installed on your machine.

Note that all the below commands must be run as the root user.

Get-TeamViewerVersion
Checking the TeamViewer version
Checking the TeamViewer version

2. Next, run the following command to retrieve the TeamViewer ID of the local machine.

Get-TeamViewerId

You will see a similar output to the one below. As you can see, the TeamViewerID is printed in the STDOUT stream. You can save this information in a variable you can use in your CI/CD pipelines.

Retrieving the TeamViewer ID of the local machine
Retrieving the TeamViewer ID of the local machine

3. Lastly, run the below Get-Help command to learn more about the TeamViewerPS module.

Get-Help about_TeamViewerPS
Viewing information about the TeamViewerPS module
Viewing information about the TeamViewerPS module

Conclusion

The need for remote management tools has never been greater, especially with the current pandemic. In this tutorial, you installed TeamViewer on Ubuntu and learned how to connect to a remote machine with a few clicks.

With TeamViewer, you can easily connect to and manage remote machines running any operating system from the comfort of your machine. You can now save time by automating tasks with TeamViewer and the TeamViewerPS PowerShell module.

With this newfound knowledge, why not start creating a web API to automate some of your TeamViewer tasks?

Hate ads? Want to support the writer? Get many of our tutorials packaged as an ATA Guidebook.

Explore ATA Guidebooks

Looks like you're offline!