Installing Telegram on Linux: A comprehensive common guide for all distributions

I'm a passionate software developer.
Search for a command to run...

I'm a passionate software developer.
Check out the other articles by clicking on blog.alexandrecalaca.com/all-articles
Node JS Node.js is an open-source, cross-platform JavaScript runtime environment that allows developers to execute JavaScript code outside of a web browser. It is designed for building scalable and high-performance network applications, making it pa...
Components Introduction In order to truly understand props in React, we first need to be clear on what components are. A component is a reusable piece of the user interface that encapsulates structure, styling, and behavior. Instead of repeating the ...

Introduction Context By default, Codespace is using the GITHUB_TOKEN env var (the “Codespaces token”), which can’t create repos. It’s necessary to authenticate gh with a token/account that has the right scopes, or create the repo on the web first. Ob...

Solution Here it is: git commit --allow-empty-message -m "" Explanation To create a Git commit without a message, or with an empty message, you can use the --allow-empty-message flag with the git commit command. git commit --allow-empty-message -m "...

Steps Cleanup phase This phase’s goal is to removes existing containers, volumes, networks and images Stop and remove volumes docker compose down --volumes --remove-orphans The previous command stops and removes containers, networks, and default volu...

Steps Stop the service It’s not mandatory, but before uninstalling, it's a good practice to stop any running Docker services. sudo systemctl stop docker Remove docker packages It’s used to completely and forcefully remove a list of specified packag...

Revisited and updated on November 06th, 2023.
Telegram is a cloud-based instant messaging app and communication platform. It was created by Pavel Durov and his brother Nikolai Durov in 2013. Telegram is known for its focus on security, privacy, and encryption, making it a popular choice for individuals and groups who value secure and private communication.

This step is optional. It's just to make sure you have Fedorainstalled.
cat /etc/os-release

hostnamectl
Output

When you run hostnamectl without any options, it provides detailed information about the system's hostname, operating system, kernel, and other system-related settings.
lsb_release -a
Output

lsb_release is a command-line utility commonly found in Linux distributions that adhere to the Linux Standard Base (LSB). The LSB is a standardization initiative that aims to increase compatibility between different Linux distributions by defining a common set of libraries and conventions.
uname -a
Output

The uname -a command is used to display detailed system information about the Linux operating system. It provides information about the system's kernel and other system-related details.
shall we?

Go to the official website or click directly on the following link: https://desktop.telegram.org/

Click on the Get Telegram for Linux x64 button or click directly on the following link: https://telegram.org/dl/desktop/linux
ls ~/Downloads/
Your output should include a file called something like the following:
[elitebughunter@192 ~]$ ls ~/Downloads/
tsetup.4.11.3.tar.xz
tar -xJvf ~/Downloads/tsetup.4.10.3.tar.xz
Output:

The tar -xJvf command on Fedora, or any Linux system, is used to extract the contents of a tarball archive file that has been compressed with the XZ compression format.
Let's break this command down:
tar: tarball archive files command;
-x: Extract files;
-J: Use the XZ compression format;
-v: Display the names of the files as they are extracted;
-f: File that you want to extract.
ls
Output

sudo mv Telegram/ /opt/telegram
Output

The /opt/telegram is the destination directory where we want to move the "Telegram" directory. /opt is a common location for installing optional or third-party software on Linux systems.
This is a common method for organizing and installing software on Linux systems. After moving, the software installed in "/opt/telegram" can be run from there, and it may require administrative privileges due to the use of sudo.
sudo ln -sf /opt/telegram/Telegram /usr/bin/telegram
Output

The command sudo ln -sf /opt/telegram/Telegram /usr/bin/telegram creates a symbolic link from the /usr/bin/telegram location to the /opt/telegram/Telegram binary executable file.
So, when we run sudo ln -sf /opt/telegram/Telegram /usr/bin/telegram, we are creating a symbolic link named telegram in the /usr/bin directory that points to the Telegram executable in "/opt/telegram/Telegram." This allows us to run the Telegram application from the command line by simply typing telegram.
which telegram
Output

telegram
Output:


Thank you for reading this article.
If you have any questions, thoughts, suggestions, or corrections, please share them with us.
We appreciate your feedback and look forward to hearing from you.
Feel free to suggest topics for future blog articles. Until next time!