Installing and Configuring Sublime Text 3 on Ubuntu
Installation Methods
Sublime Text is a popular IDE that we can now install via PPA – thanks to Webupd8 team.
To install Sublime text in Ubuntu run the following commands in your terminal (Ctrl + Alt + T):
sudo add-apt-repository ppa:webupd8team/sublime-text-3
sudo apt-get update
sudo apt-get install sublime-text-installer
Alternative Installation
- If you don’t want to install Sublime text and prefer to use it as a standalone application you can download it separately from http://www.sublimetext.com/
Configuration
Disabling Update Notifications
To stop sublime notifying you of new versions every time you open it, add the following command to Preferences > Settings – User:
"update_check": false
Running Sublime Text with Sudo Privileges
The Problem
So far we’ve installed Sublime text in our Ubuntu OS. However, we can only modify files that our user has permission to change. This is not particularly helpful if you would like to change system files or your project is located in a restricted path.
The Solution
To be able to change system files we need to run Sublime as sudo. To do that:
- Locate sublime-text.desktop in
/usr/share/applications/
- Add
gksudo
in front ofExec=
- The final change should look like:
Exec=gksudo /opt/sublime_text/sublime_text %F
Important Notes
- The path to sublime could be different in your machine
- Make sure gksudo is already installed
Installing gksudo
gksudo
is used to run graphical (GUI) applications as root. To install gksudo use the following command:
sudo apt-get install gksu