I am trying to install Sublime through the following command. But it returns error.
sudo apt-get install sublime-text-2 but it returns
Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package sublime-text-2 Any helps I have not found any similar question and solution for this problem.
And Also 2 is the recent one or version 3 is available.
22 Answers
Add the ppa and install as follows:
sudo add-apt-repository ppa:webupd8team/sublime-text-2 sudo apt-get update sudo apt-get install sublime-text 1First, you should be installing Sublime Text 3, not ST2, as it is much more up-to-date with many bug fixes and added features. On the page I linked, select either Ubuntu 64-bit or 32-bit, depending on your system, and save the .deb file to your ~/Downloads directory. Next, run the following commands, where XXXX is the build number:
cd ~/Downloads sudo dpkg -i sublime-text_build-XXXX_amd64.deb # for 64-bit # or sudo dpkg -i sublime-text_build-XXXX_i386.deb # for 32-bit This will install ST3 in /opt/sublime_text, put the subl command in /usr/bin/subl, and set up icons properly. You can then follow my answer here on making Sublime the default text editor.