Installing software on Debian-based systems like Ubuntu has always been straightforward, thanks to the Advanced Packaging Tool (APT). However, recent changes have rendered the traditional method of adding repositories somewhat obsolete, particularly with the deprecation of `apt-key`. In this guide, we'll explore the updated process for installing AnyDesk on the latest Debian and Ubuntu distributions, ensuring smooth operation and future-proof installation.
Adding AnyDesk Repository:
To begin, we need to add the AnyDesk repository to our system's sources list. However, instead of modifying the main `sources.list` file, which is not recommended, we'll create a separate file in the `/etc/apt/sources.list.d/` directory. This ensures cleaner package management and easier removal if necessary.
sudo apt install -y gnupg2
curl -fsSL https://keys.anydesk.com/repos/DEB-GPG-KEY | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/anydesk.gpg
sudo echo "deb http://deb.anydesk.com/ all main" | sudo tee /etc/apt/sources.list.d/anydesk-stable.list
Updating Package Metadata:
Once the repository information is added, we need to update the local cache of package metadata using `apt update`. This step is crucial as it ensures that our system recognizes the packages available from the newly added repository.
sudo apt update
Installing AnyDesk:
With the repository added and package metadata updated, we can now proceed to install AnyDesk using `apt install`.
sudo apt install -y anydesk
By following these steps, installing AnyDesk on Debian and Ubuntu systems becomes a streamlined process. We've adapted to the changes in package management, avoiding deprecated methods like `apt-key` and adhering to best practices by keeping repository configurations separate.
Reference: