How To Install Teamviewer On Linux

How To Install Teamviewer On Linux

Reading time1 min
#Linux#RemoteAccess#TeamViewer#LinuxSupport#RemoteDesktop

How To Install TeamViewer on Linux – Pragmatic Remote Access Setup

Securing remote access for Linux machines often means navigating a patchwork of tools. TeamViewer stands out for its ease of use and cross-platform support—if you can get it running reliably on your distribution. Linux package management, dependency chains, and systemd integration bring their own quirks. This guide breaks down the process for Ubuntu, Debian, Fedora, RHEL, and openSUSE, with a few side notes from the trenches.


TeamViewer for Linux: Context

Unlike Windows or macOS, Linux distributions require precise attention to package format and system integration layers. TeamViewer’s upstream support covers most mainstream platforms, but you’ll run into distribution- and version-specific nuances.

Common use cases:

  • Instant remote access for a headless server on a remote site
  • Ad-hoc user support without pre-configuring SSH keys or VPN
  • File transfer between workstations in restricted environments

Note: Native Wayland sessions limit some remote desktop features; consider X11 fallback for full functionality.


Pre-Flight: What You Actually Need

  • Linux host (x86_64; arm not supported as of TeamViewer 15.x)
  • Root access, or at minimum, rights to install and load kernel modules
  • Active network connection (installer fetches dependencies)
  • Baseline familiarity with CLI and logs (errors won’t always surface in GUI)

Check distro and version. For instance:

cat /etc/os-release
# or
lsb_release -a

Kernel versions below 4.x can cause trouble—kernel modules may fail to build.


1. Downloading the Right Package

Official repository only. Do not trust third-party mirrors or outdated .deb/.rpm links from StackOverflow posts.

Get the latest build:
https://www.teamviewer.com/en/download/linux/

Table: Package Types

Distro FamilyFile TypeExample Filename
Ubuntu/Debian.debteamviewer_amd64.deb
Fedora/RHEL/openSUSE.rpmteamviewer.x86_64.rpm

Pick the package matching your distribution and architecture.
Tip: If deploying on multiple systems, script the download with wget.


2. Ubuntu / Debian Install (Tested: Ubuntu 22.04, Debian 11)

wget https://download.teamviewer.com/download/linux/teamviewer_amd64.deb
sudo apt update
sudo apt install -y gdebi-core
sudo gdebi teamviewer_amd64.deb

Alternative if gdebi fails:

sudo dpkg -i teamviewer_amd64.deb
sudo apt-get install -f

Occasionally, you’ll see errors:

teamviewer: error while loading shared libraries: libqt5widgets.so.5

Fix with:

sudo apt install libqt5widgets5

Daemon setup (often needed for incoming LAN connections):

sudo teamviewer --daemon enable
sudo systemctl start teamviewerd

Note: On first launch, you may see the EULA prompt hang or remain hidden under other windows in X11. Move windows aside.


3. Fedora / RHEL / CentOS (Tested: Fedora 38, RHEL 9)

wget https://download.teamviewer.com/download/linux/teamviewer.x86_64.rpm
sudo dnf install ./teamviewer.x86_64.rpm

On CentOS/RHEL:

sudo yum localinstall ./teamviewer.x86_64.rpm

If you see:

Error: Nothing to do

—likely a missing dependency, most commonly Qt5:

sudo dnf install qt5-qtbase qt5-qtx11extras

If on a minimal RHEL install, you may need EPEL:

sudo dnf install epel-release
sudo dnf update

Bug: TeamViewer may not autostart as a service—see below.


4. openSUSE (Tested: Leap 15.5)

wget https://download.teamviewer.com/download/linux/teamviewer.x86_64.rpm
sudo zypper install ./teamviewer.x86_64.rpm

Sporadically zypper refuses unsigned RPMs. If so, add --no-gpg-checks flag, but audit package hash first.


5. Basic Launch & Post-Install Checks

teamviewer &

Or use launch menu. The main window should display your TeamViewer ID.
Add your credentials or register for unattended access.

Firewall: The TCP 5938 Trap

Strict-firewall hosts often block TeamViewer by default. Allow traffic:

sudo ufw allow 5938/tcp

On RHEL/CentOS:

sudo firewall-cmd --add-port=5938/tcp --permanent
sudo firewall-cmd --reload

TeamViewer will fall back to 443/80 if 5938 is blocked, but performance degrades.


6. SystemD Integration & Startup

Enable TeamViewer daemon for headless access (critical for remote reboot/power-cycle scenarios):

sudo systemctl enable teamviewerd
sudo systemctl start teamviewerd

Check status:

sudo systemctl status teamviewerd

Expected log output:

teamviewerd[1534]: Daemon startup complete – Listening for remote connections

Known issue: Multiple local users logged in may create authentication conflicts; only one session may be active for remote input.


7. Remote Test & Verification

From another machine, connect using displayed ID and password.
CLI check from the host:

teamviewer info

Output includes TeamViewer version, status, and ID.

If the status is "not ready," verify that teamviewerd is running and that your network allows outbound connections.


Non-Obvious Tips

  • Script upgrades in cron with basic logic to backup config and confirm service restart.
  • Remove /etc/apt/sources.list.d/teamviewer.list before re-installing older builds—TeamViewer repo can cause APT key warnings on some distros.
  • To suppress GUI popups after crash/reboot (for servers):
    Append -daemon flag in custom systemd unit or use teamviewer --daemon restart.

Summary

TeamViewer can be integrated smoothly with most Linux setups given attention to system package format, dependency chains, and daemon/service management. Rely on official builds, manage kernel/module compatibility, and always verify both service and firewall status before remote sessions. For non-x86_64 hardware or advanced policy requirements, consider alternatives like AnyDesk or direct VNC.


Reference Links & Further Reading

  • TeamViewer Linux Knowledge Base
  • SSH Tunnels for Emergency Access (see: “How to Set Up SSH Tunneling for Secure Remote Access on Linux”)
  • VNC vs. TeamViewer: Bandwidth, Latency, and Security Considerations

Practical, not perfect: you may encounter edge-case failures on heavily customized or minimal Linux builds. In such scenarios, log outputs and package diffs are your best tools.