Telegram is a sort of open, secure messaging service that runs in the cloud. It provides a robust open API, puts a lot of emphasis on privacy, and offers a slate of mobile, web and desktop clients. These points alone have seen the service become incredibly popular with open-source, privacy and Linux enthusiasts.
For the avoidance of doubt please note that I am not writing this post to persuade anyone that Telegram is ‘the best’ messaging service around. Nor am I going to say that it is the most secure, or that using it through a Terminal app makes any sense when various mobile and desktop GUI apps are freely available.
- Colored terminal messages
- Message management, including message history
- Create/join/manage group chats
- Start secure encrypted one-on-one conversations
- Add/edit/remove contacts
- Send/load photos and videos
Telegram-CLI rather helpfully supports tab completion. If you’re the sort of person who regularly forget commands, or simple like to speed up your workflow, you only need to remember the first few characters of any command, and the tab key will do the rest.
How To Install Telegram CLI on Ubuntu
If you’re running Ubuntu 16.04 LTS or Ubuntu 16.10 you can install telegram-cli through the Snap store by searching for ‘telegram-cli’ in the Ubuntu Software app or running:
Assuming you have, just run the app using the following command:
This will prompt you for your phone number. Type it in to the terminal, then double-check that it’s correct. Press Enter.
After that, you’re good to go!
To view a list of all current chats, groups and unread messages type:
To message a contact or group, type
msg followed by their name (remember that you can use tab to autocomplete) and then your message:
To view a conversation or chat history type
history followed by the name of the contact or group and the number of lines you wish to see:
history Liam 10 will print the 10 most recent messages in my conversation with Liam:
You’ll find a comprehensive list of all the commands supported by telegram-cli on the project’s GitHub wiki:
Or, while using the client, by running