This guide demonstrates how to install TeamViewer on Debian using the command-line terminal. TeamViewer provides remote access to computers and devices, enabling you to control desktops, transfer files, and provide technical support from anywhere. Whether you need to assist a family member with their computer, access your work machine from home, or manage servers remotely, TeamViewer handles secure encrypted connections across different operating systems and networks. For command-line-based remote access, you might also consider OpenSSH on Debian.
You will learn two installation methods: the recommended extrepo approach for quick setup, and manual repository configuration for users who need full control over their APT sources. Both methods install the same packages from TeamViewer’s official repository, so choose based on your preferences for simplicity versus customization.
Choose Your TeamViewer Installation Method
TeamViewer offers a dedicated APT repository for Debian systems. You can configure this repository automatically using extrepo or manually for more control.
| Method | Channel | Version | Updates | Best For |
|---|---|---|---|---|
| extrepo (Recommended) | Debian extrepo | Latest stable | Automatic via apt upgrade | Most users; simplest setup with automatic GPG handling |
| Manual Repository | TeamViewer Official | Latest stable | Automatic via apt upgrade | Scripted deployments, custom configurations, or learning APT internals |
For most users, the extrepo method is recommended because it handles GPG key management automatically and integrates with Debian’s trusted repository system. The manual method provides identical packages but requires more configuration steps.
Update Debian Before TeamViewer Installation
Before installing new software, first refresh your package lists and upgrade existing packages to ensure system stability:
sudo apt update && sudo apt upgrade
This command synchronizes your local package index with the repositories and then applies any pending security or bug fixes.
Install TeamViewer with extrepo (Recommended)
The extrepo tool manages external repositories through Debian’s official curated list. This method automatically handles GPG key downloads and repository configuration.
Step 1: Install extrepo
First, install the extrepo package from Debian’s repositories:
sudo apt install extrepo
Step 2: Enable Non-Free Policy
Because TeamViewer is proprietary software, you must first enable the non-free policy in extrepo’s configuration before enabling the repository:
sudo sed -i 's/# - non-free/- non-free/' /etc/extrepo/config.yaml
This command uncomments the non-free policy line, which then allows extrepo to manage repositories containing proprietary software.
Step 3: Enable the TeamViewer Repository
Now enable the TeamViewer repository. The teamviewer_default repository provides stable releases:
sudo extrepo enable teamviewer_default
TeamViewer also provides a
teamviewer_previewrepository for beta releases. Enable it withsudo extrepo enable teamviewer_previewif you want early access to new features. Most users should stick with the stable repository.
Step 4: Update Package Index
Refresh your package lists to include the newly added TeamViewer repository:
sudo apt update
Step 5: Install TeamViewer
Now install TeamViewer using apt:
sudo apt install teamviewer
During installation, APT pulls in all required dependencies including Qt libraries and display server components.
Step 6: Verify Installation
Confirm TeamViewer installed correctly by checking the version:
teamviewer --version
Expected output:
TeamViewer 15.x.x (DEB)
Install TeamViewer with Manual Repository Configuration
If you prefer explicit control over your APT configuration or need to script deployments, you can manually add the TeamViewer repository using the modern DEB822 format.
Step 1: Install Required Packages
Begin by installing curl and gnupg for downloading and processing the GPG signing key:
sudo apt install curl gnupg
Step 2: Import the TeamViewer GPG Key
Next, download and convert TeamViewer’s GPG signing key to the binary format APT requires:
curl -fsSL https://linux.teamviewer.com/pubkey/currentkey.asc | sudo gpg --dearmor -o /usr/share/keyrings/teamviewer.gpg
This single command fetches the ASCII-armored key, converts it to binary format using gpg --dearmor, and writes it to the system keyrings directory with proper root ownership.
Step 3: Add the TeamViewer Repository
Create the repository configuration file using the DEB822 .sources format:
cat <<EOF | sudo tee /etc/apt/sources.list.d/teamviewer.sources
Types: deb
URIs: https://linux.teamviewer.com/deb
Suites: stable
Components: main
Architectures: amd64
Signed-By: /usr/share/keyrings/teamviewer.gpg
EOF
This guide uses DEB822
.sourcesfiles for third-party repositories to keep APT configuration consistent and readable. For format details, see DEB822 format reference.
Step 4: Update Package Index
Refresh your package lists to include the TeamViewer repository:
sudo apt update
Step 5: Verify Repository Configuration
Before installing, verify the repository was added correctly by checking the package policy:
apt-cache policy teamviewer
Expected output:
teamviewer:
Installed: (none)
Candidate: 15.x.x
Version table:
15.x.x 500
500 https://linux.teamviewer.com/deb stable/main amd64 Packages
The version numbers are placeholders. Your output will show the actual current version available from the TeamViewer repository.
Step 6: Install TeamViewer
Once the repository is configured, install TeamViewer using apt:
sudo apt install teamviewer
Step 7: Verify Installation
Finally, confirm the installation succeeded:
teamviewer --version
Expected output:
TeamViewer 15.x.x (DEB)
Launch TeamViewer
After installation, you can start TeamViewer using either the terminal or your desktop environment’s application menu.
Launch from Terminal
To launch TeamViewer directly from the command line:
teamviewer
This command opens the TeamViewer user interface. If the daemon is not running, it will start automatically.
Launch from Applications Menu
Alternatively, desktop users can navigate through the application menu:
GNOME: Activities → Show Applications → TeamViewer
KDE Plasma: Application Launcher → Internet → TeamViewer
Xfce: Applications Menu → Internet → TeamViewer
TeamViewer Command Reference
In addition to the graphical interface, TeamViewer provides several command-line options for managing connections, the daemon service, and system configuration. These commands are particularly useful for headless servers and scripted deployments.
Basic Information Commands
Check your TeamViewer ID and connection status:
teamviewer info
Expected output showing your TeamViewer ID and daemon status:
TeamViewer
15.x.x (DEB)
TeamViewer ID: 1 234 567 890
teamviewerd status
teamviewerd start/running
The output displays your unique TeamViewer ID, which remote users need to connect to your machine. If the daemon is not running, you will see a message suggesting to restart it.
To view all available commands and options:
teamviewer help
Daemon Management
The TeamViewer daemon must be running to accept incoming connections. Use these commands to manage the service:
To check the current daemon status:
teamviewer daemon status
Expected output when the daemon is running:
/etc/init.d/teamviewerd status teamviewerd start/running
To start the daemon manually:
teamviewer daemon start
Similarly, to stop the daemon:
teamviewer daemon stop
After making configuration changes, restart the daemon:
teamviewer daemon restart
If you prefer manual control, disable automatic startup on boot:
teamviewer daemon disable
To restore automatic startup:
teamviewer daemon enable
Headless Server Configuration
For servers without a graphical interface, configure unattended access:
teamviewer setup
This interactive command guides you through setting up headless mode, including password configuration and license agreement.
Set a password directly (useful for automated deployments):
teamviewer passwd YOUR_SECURE_PASSWORD
Replace
YOUR_SECURE_PASSWORDwith a strong password. This password allows incoming connections without the graphical interface running.
Device Assignment
To assign this device to your TeamViewer account for centralized management:
teamviewer assignment --id=YOUR_ASSIGNMENT_ID
Later, you can unassign the device to make it unmanaged again:
teamviewer unassign
Repository Management
Additionally, TeamViewer can manage its own repository configuration:
To view current repository settings:
teamviewer repo
You can also switch between stable and preview releases:
teamviewer repo stable
teamviewer repo preview
Troubleshooting Support
If you encounter issues, create a log archive for support requests:
teamviewer ziplog
When troubleshooting launch problems, include additional system information:
teamviewer ziplog plus
Both commands save the archive to your home directory, containing logs and system information useful when contacting TeamViewer support.
Update TeamViewer
Since you configured the TeamViewer repository, updates arrive automatically through your system’s package manager. When new versions are released, they become available during regular system updates:
sudo apt update && sudo apt upgrade
Alternatively, to update only TeamViewer without affecting other packages:
sudo apt update
sudo apt install --only-upgrade teamviewer
Remove TeamViewer
If you no longer need TeamViewer, you can remove it completely from your system.
Uninstall the Package
First, remove TeamViewer and its configuration files:
sudo apt remove --purge teamviewer
Then, remove any orphaned dependencies that were installed with TeamViewer:
sudo apt autoremove
Remove Repository Configuration
If you used extrepo to install TeamViewer, disable the repository:
sudo extrepo disable teamviewer_default
However, if you configured the repository manually, remove the sources file and GPG key instead:
sudo rm /etc/apt/sources.list.d/teamviewer.sources
sudo rm /usr/share/keyrings/teamviewer.gpg
Refresh the package index to confirm the repository was removed:
sudo apt update
Remove User Configuration Data
Warning: The following commands permanently delete your TeamViewer settings, connection history, and saved credentials. This action cannot be undone. Skip this step if you plan to reinstall TeamViewer later.
Remove TeamViewer user data directories:
rm -rf ~/.config/teamviewer
rm -rf ~/.local/share/teamviewer
Verify Removal
Confirm TeamViewer is no longer installed:
apt-cache policy teamviewer
Expected output after complete removal:
teamviewer: Installed: (none) Candidate: (none) Version table:
Conclusion
You have installed TeamViewer on Debian and learned how to manage the application using command-line tools. The extrepo method provides the simplest setup experience, while manual repository configuration gives you full control over your APT sources. With the daemon commands, you can configure unattended access for headless servers or disable automatic startup when you only need TeamViewer occasionally. For ongoing remote support needs, consider configuring device assignment to integrate with your TeamViewer account for centralized management.
To continue configuring your Debian system, explore our guides on enabling contrib and non-free repos on Debian for additional proprietary software, setting up Debian backports for newer package versions, or installing Docker on Debian for containerized applications.
Must be
curl -fSsL https://linux.teamviewer.com/pubkey/currentkey.asc | sudo gpg –dearmor | sudo tee /usr/share/keyrings/teamview.gpg > /dev/null