How to install tar ball sublime text on Ubuntu?

I recently installed sublime text 3 from tarball via https://www.sublimetext.com/3.

What I get is

  • changelog.txt

  • Icon

  • plugin_host

  • python3.3.zip

  • sublime.py
  • sublime_text.desktop
  • crash_reporter
  • Packages
  • sublime_plugin.py
  • sublime_text

When I run ./sublime_text, yes, the application launches. However, it does not say sublime text was installed. It is only accessible from the commandline. How can I access to the sublimetext from desktop or somewhere else?


Solution 1:

The tarball is not meant to install sublime text on the system.

Instead use a package from the apt repository:

wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
sudo apt-get install apt-transport-https

# stable version
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list

sudo apt-get update
sudo apt-get install sublime-text

Source: https://www.sublimetext.com/docs/3/linux_repositories.html

Solution 2:

sudo mv ./sublime_text_3/ /opt/sublime_text/
sudo cp /opt/sublime_text/sublime_text.desktop /usr/share/applications/

That's it! Now you can search for the sublime in system applications and execute it.