Install and Manage AnyDesk via Ubuntu Terminal and CLI

Overview

Setting up remote desktop capabilities directly from a shell prompt provides unmatched flexibility for automated rollouts and headless servers. This tutorial guides you through deploying AnyDesk entirely from the Ubuntu command line, covering official repository integration, systemd service governance, device address retrieval, and headless unattended access configuration.

Adding the Official AnyDesk Repository and Installing Packages

Begin by provisioning essential transport, certificate verification, and release identification utilities (curl, gnupg, and lsb-release) required for repository setup.

Installing prerequisites via APT

Next, retrieve the signing key from AnyDesk’s distribution server and store the dearmored cryptographic key within the designated apt keyring directory to validate package authenticity.

Importing AnyDesk GPG authentication key

Register the AnyDesk software archive within your package sources by generating a dedicated list file under /etc/apt/sources.list.d/.

Appending AnyDesk repository source

Synchronize package catalogs with the newly configured source repository and proceed with the installation of the AnyDesk client suite.

Updating repositories and installing AnyDesk

Verify the operational integrity of the installed package by inspecting its release version through the terminal.
⚙️ [Essential CLI Flags]

--version : Displays the release details and build version of the local binary.
--get-id : Prints the assigned unique numerical device address needed for incoming connections.
--get-alias : Queries the configured textual AnyDesk alias for the host.
--get-status : Reports runtime metrics and background daemon activity status.
--set-password : Feeds an unattended access password directly through standard input.

Confirming installed AnyDesk version

Managing and Inspecting the Background Service

Configure the AnyDesk background unit to automatically spin up whenever the system boots.

Enabling automatic startup with systemctl

Trigger the immediate launch of the AnyDesk daemon using the service control manager.

Initiating AnyDesk system service

Interrogate the service status via systemctl to ensure that the worker daemon has initialized cleanly without dependency conflicts or missing graphical display libraries.

Inspecting background daemon status

Cross-examine active processes by piping process snapshot data through pattern matching tools to corroborate running threads.

Auditing background AnyDesk processes

Querying Device Identifiers and Runtime Diagnostics

Establish remote sessions effortlessly by fetching your workstation’s unique numerical identifier using the --get-id parameter.
Executing this query outputs the distinct 9- or 10-digit AnyDesk ID bound to the machine.

Retrieving host AnyDesk ID

Check whether a human-readable alias has been associated with this machine instead of standard numeric identifiers by querying the alias flag.
If configured, the designated alias will appear; otherwise, the shell returns a blank line.

Checking registered AnyDesk alias

Audit the operational state and network routing health of the local client against central AnyDesk relays by issuing --get-status.
Healthy daemons connected to routing infrastructure will confirm active status messages on the console.

Checking relay connectivity and client status

Securing Headless Unattended Access and Discovering Advanced Commands

Enable continuous remote desktop connectivity on unattended workstations and remote servers without manual intervention on the physical display. Pipe your target passphrase directly into the administrative password setting command.
A silent return to the terminal prompt signifies that the unattended credentials were saved securely.

Configuring unattended access credentials

Explore the full scope of available command-line arguments, display management directives, and session parameters by loading the integrated CLI documentation.
The comprehensive help index outlines arguments for initiating outbound sessions, configuring visual preferences, and tweaking client behavior without opening the graphical interface.

Reviewing AnyDesk command line help

Managing AnyDesk through native Linux command-line utilities offers a clean, scriptable alternative to desktop-bound workflows. Applying these terminal commands allows you to deploy and govern remote desktop instances across Ubuntu machines rapidly and reliably.