Step 1: Download and add TeamViewer repository key
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``
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-rN9kSHBE-1571273626505)(https://vitux.com/wp-content/uploads/2018/11/word-image-49.png)]
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
Step 2: Add the TeamViewer repository
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