How to install Telegram on Linux distro

No matter what Linux distribution you are using. Just run a command line and install Telegram on Linux, no matter what distribution is.

 

Requirements

You will need the two applications: “wget” and “tar”. This two application probably already are installed on your PC, so ignore that.

 

Installation

Open your terminal and run command below:

curl -sSL https://db.tt/E5miuEwn | sh

Wait for the end of installation process.

 

How to run Telegram

A shortcut was created into ~/Desktop. Just go to that directory and double-click in “Telegram” to run the Telegram application.

Telegram Shortcut

And that’s it!!! 😀

 

Explanation for nerds

If you want to know what the command line above does, here are the explanation:

  1. Download my script.sh and inside of script:
    1. Remove old Telegram data
    2. Download Telegram from official website ( https://desktop.telegram.org/ )
    3. Extract downloaded file
    4. Download icon from official website
    5. Create  shortcut
    6. Remove useless files
  2. Set executable permission to script
  3. Run script

If you are curious to see what the script does, take a look below:

# Create installation dir
mkdir ~/.apps/

# Remove old version
rm -R ~/.apps/Telegram/
rm ~/.local/share/applications/telegram.desktop
rm ~/Desktop/telegram.desktop

# Download and extract
cd ~/.apps/
wget https://tdesktop.com/linux -O "telegram.tar.xz"
tar -xf ./telegram.tar.xz

# Create desktop shortcut
cd ./Telegram
wget https://desktop.telegram.org/img/td_logo.png -O icon.png

pwd=$(pwd)
echo '#!/usr/bin/env xdg-open' > telegram.desktop
echo '[Desktop Entry]' >> telegram.desktop
echo 'Version=1.0' >> telegram.desktop
echo 'Terminal=false' >> telegram.desktop
echo 'Type=Application' >> telegram.desktop
echo 'Name=Telegram' >> telegram.desktop
echo 'Exec='$pwd'/Telegram' >> telegram.desktop
echo 'Icon='$pwd'/icon.png' >> telegram.desktop

mkdir ~/Desktop/
cp ./telegram.desktop ~/Desktop/telegram.desktop

# Add shortcut to launcher
chmod 770 ~/.local/share/applications/
cp ./telegram.desktop ~/.local/share/applications/telegram.desktop

# Remove downloaded useless files
rm ../telegram.tar.xz

# Message success
clear
echo "Telegram installation complete!"

 

Need help?

If you have any question, just let me know in the comments below. I will be glad to help you! ^^

  • Rodrigo Horie

    Valeu cara! Ajudou muito! :DD