How to Install Telegram on Ubuntu 24.04

When considering data privacy, open-source applications represent the optimal choices. Telegram is also an open-source messaging app for chatting, voice calling, video calling, and file sharing. It has all the features of WhatsApp but stands out with a no-ad and no-data selling policy. 

In this guide, I will be explaining a step-by-step process of installing Telegram on Ubuntu 24.04 Noble Numbat.

Install Telegram on Ubuntu

On Ubuntu, various approaches can be used to install Telegram; such as:

  1. Using Snap
  2. Using Flatpak
  3. Using Tar File

Install Telegram on Ubuntu Using Snap

Snap is a package manager that comes in all Ubuntu distributions. Telegram desktop is also available as a snap package. One of the key advantages of getting Snap packages is that they update automatically. 

The steps to install Telegram desktop using Snap are listed below:

Step 1: Launch Terminal 

Installing Telegram using snap is a terminal-based method. Therefore, launch the terminal to proceed with the installation.

Step 2: Install Telegram Desktop

Now, use the snap install utility to install the Telegram desktop application.

sudo snap install telegram-desktop

The Telegram Desktop application has been successfully installed.

Step 3: Run Telegram Desktop

Lastly, execute the telegram-desktop command to launch the application.

telegram-desktop

You can also search and open it from the Ubuntu applications launcher.

To uninstall the Telegram snap package, use the command given below:

sudo snap remove telegram-desktop

Install Telegram on Ubuntu Using Flatpak

The Flatpak is another package distribution system through which the Telegram desktop application can be installed on Ubuntu. Flatpak packages load faster than Snap packages and are secure because they run in a sandbox environment. 

The steps to set up flatpak and install Telegram on Ubuntu are listed below:

Step 1: Install Flatpak

The Flatpak does not come pre-installed on Ubuntu. Execute the command given below to install the Flatpak:

sudo apt install flatpak

Note: After installing the Flatpak for the first time on Ubuntu you need to logout and log back.

Step 2: Add Flathub Repository

The Flathub repository contains all the flatpak packages, so to install any flatpak package, its repository must be added.

sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

Step 3: Install Telegram

Use the flatpak command to install the Telegram Desktop app.

sudo flatpak install org.telegram.desktop

Step 4: Launch the Telegram Desktop Application

Now, launch the application from the app menu or use the flatpak run command with the package name.

flatpak run org.telegram.desktop

To delete the Telegram flatpak package from Ubuntu, first, find the application ID using flatpak list command.

flatpak list

Now, remove the package using flatpak uninstall command.

sudo flatpak uninstall org.telegram.desktop

The Telegram flatpak package has been deleted from the Ubuntu.

Install Telegram on Ubuntu by Downloading from Official Website

If you want to use the Telegram application in a sandbox environment then you can download its tar file from the official Telegram website.

Follow the step-by-step guide, to use the Telegram desktop on Ubuntu downloaded from the official website.

Step 1: Download Tar File

Open the official website of Telegram and visit the desktop application download page. 

Click on Get Telegram for Linux button.

Or use the wget command mentioned below to download the tar file.

wget https://telegram.org/dl/desktop/linux

Step 2: Untar the File

Now, extract the file using the tar utility.

sudo tar -xf tsetup.5.0.1.tar.xz

All the content will be extracted in a folder called Telegram.

Step 3: Launch the App

In the Telegram directory, there will be two executable files Telegram and Updater. 

Double-click the Telegram file from the GUI or run the executable from the terminal using the below command.

./Telegram

If you want to launch it from the dash or application menu, read the section below.

Add Stand-Alone Applications to Ubuntu Launcher

Telegram downloaded using a Tar file comes as a stand-alone application that works in a sandbox environment. Instead of launching it from the downloaded file, it would be a lot more convenient to launch it from the applications menu. 

To put the stand-alone app in the Ubuntu Dash or apps menu follow the steps mentioned below:

Step 1: Create a .desktop File

To make any stand-alone application run from the Ubuntu launcher it must have an associated .desktop file in the /usr/share/applications directory. Let’s create a file using the nano editor, before that make sure that you are in the /usr/share/applications directory.

sudo nano telegram.desktop

Add the line mentioned below in the file.

[Desktop Entry]Name=TelegramExec=/home/sam/Telegram/TelegramStartupNotify=trueTerminal=falseType=ApplicationIcon=/home/sam/Downloads/telegram_icon.png

Change the Exec and Icon paths to the Telegram executable path and icon file path according to your settings and save the file.

Step 2: Launch the Application from the Dash

Access the dash using the Super Key or click on the Ubuntu icon at the bottom. Search telegram and click on it to open.

Using Telegram from Terminal on Ubuntu

Telegram also has a third-party command line interface variant called Telegram CLI. It can be used to exchange messages directly from the terminal. To install and use Telegram CLI on Ubuntu, follow the steps mentioned below:

Step 1: Install Telegram CLI

Telegram CLI can be installed by using the APT command.

sudo apt install telegram-cli

Step 2: Use Telegram from Terminal

Now, type use the telegram command to start a session.

telegram-cli

Other useful telegram commands are listed below:

List contacts:

telegram-cli list_contacts

Displaying Stats:

stats

To add a contact:

add_contact <number> <first_name> <last_name>

To send messages:

msg <contact_name> text

To start a chat:

chat_with_peer <contact_name>

To start a group chat:

create_group_chat <chat_agenda> <contact1> <contact2> <contact3>

Can I Install Telegram Desktop on Ubuntu using APT

No! Telegram Desktop is no longer available in the default repository of Ubuntu, therefore it cannot be installed using the default package manager.

Conclusion

Telegram is an open-source chatting application available as mobile and desktop variants. Its desktop version can be installed on Ubuntu 24.04 through snap, flatpak, and downloading the tar file. In this guide, I presented the step-wise guide to installing the Telegram desktop on Ubuntu and also explained how to launch a stand-alone variant of Telegram through Dash.