Sublime 2 Installation for Linux

Linux

You can download the package and uncompress it manually. Alternatively, you can use the command line.

For i386

cd ~

wget http://c758482.r82.cf2.rackcdn.com/Sublime\ Text\ 2.0.1.tar.bz2

tar vxjf Sublime\ Text\ 2.0.1.tar.bz2

For x64

cd ~

wget http://c758482.r82.cf2.rackcdn.com/Sublime Text 2.0.1 x64.tar.bz2

tar vxjf Sublime\ Text\ 2.0.1\ x64.tar.bz2

Now we should move the uncompressed files to an appropriate location.

sudo mv Sublime\ Text\ 2 /opt/

Lastly, we create a symbolic link to use at the command line.

sudo ln -s /opt/Sublime\ Text\ 2/sublime_text /usr/bin/sublime

In Ubuntu, if you also want to add Sublime Text to the Unity luncher, read on.

First we need to create a new file.

sudo sublime /usr/share/applications/sublime.desktop

Then copy the following into it.

[Desktop Entry]

Version=2.0.1

Name=Sublime Text 2

# Only KDE 4 seems to use GenericName, so we reuse the KDE strings.

# From Ubuntu's language-pack-kde-XX-base packages, version 9.04-20090413.

GenericName=Text Editor



Exec=sublime

Terminal=false

Icon=/opt/Sublime Text 2/Icon/48x48/sublime_text.png

Type=Application

Categories=TextEditor;IDE;Development

X-Ayatana-Desktop-Shortcuts=NewWindow



[NewWindow Shortcut Group]

Name=New Window

Exec=sublime -n

TargetEnvironment=Unity

If you’ve registered your copy of Sublime Text, but every time you open it you’re asked to enter your license, you should try running this command.

sudo chown -R username:username /home/username/.config /sublime-text-2

Just replace username with your account’s username. This should fix the permission error in the case that you opened up Sublime Text as root when you first entered the license.

你可能感兴趣的:(Install)