- Mastering Sublime Text
- Dan Peleg
- 476字
- 2021-11-12 16:30:44
Installing Sublime Text on Linux
This section will explain how to install Sublime Text on different Linux distributions.
Installing Sublime Text on Ubuntu 32/64 bit
This section will explain how to install Sublime Text on Ubuntu 32/64 bit.
There are a few different options for installing Sublime Text on your Ubuntu; we will use the Personal Package Archive (PPA) one. For this, we need to add the PPA that contains the Sublime Package. PPA is a software repository that contains packages that can be installed by Ubuntu's Launchpad.
To add the repository, run the following from the terminal:
sudo add-apt-repository ppa:webupd8team/sublime-text-3 sudo apt-get update sudo apt-get install sublime-text-installer
To install Sublime Text 3 on our Ubuntu, we can now use the following commands:
subl filename ("filename" is the filename to edit) subl foldername ("foldername" is the folder to open) subl . (to open the current directory)
We can also see the Sublime icon on Ubuntu's action bar, which is typically on the left-hand side, as shown in the following screenshot:

After we have installed Sublime, we want to set it as the default editor for everything! To do that, simply open the defaults.list
file of Ubuntu by using the following command:
sudo subl /usr/share/applications/defaults.list
And replace all occurrences of gedit.desktop
with sublime-text.desktop
.
Installing Sublime Text on other Linux distributions
Installing Sublime on a Linux other than Ubuntu takes a little longer, but we will do it as fast as possible! We start by going to http://www.sublimetext.com/3 and downloading the desired tarball for 32-bit or 64-bit.
After downloading, let's open our terminal and navigate to the Downloads folder:
cd ~/Downloads
The downloaded file is compressed using TAR. We will have to NTAR it first by running the following command:
tar xf sublime_text_3_build_3047_x64.tar.bz2
Move the extracted folder to /op:
sudo mv sublime_text_3 /opt/
We want to make a symbolic link so that we can run Sublime straight from the terminal:
sudo ln -s /opt/sublime_text_3/sublime_text /usr/bin/subl
Now, we have Sublime installed and can use the following commands to open the directory:
subl filename ("filename" is the filename to edit) subl foldername ("foldername" is the folder to open) subl . (to open the current directory)
Some distributions such as OpenSUSE, Ubuntu, or GNOME, use .desktop
files. These files are for the desktop/action bar launch icons.
Let's add Sublime's .desktop
file to the environment. It's good for us that Sublime comes with the file already and we don't need to write it. Just copy the file to the right location using the following command:
sudo cp /opt/sublime_text/sublime_text.desktop /usr/share/applications/
Your distribution may not provide /usr/share/applications
, in which case you'll have to copy the file to ~/.local/share/applications
.
- Dynamics 365 for Finance and Operations Development Cookbook(Fourth Edition)
- vSphere High Performance Cookbook
- Developing Mobile Web ArcGIS Applications
- 實用防銹油配方與制備200例
- Animate CC二維動畫設計與制作(微課版)
- 深入淺出RxJS
- MongoDB權威指南(第3版)
- .NET 3.5編程
- 第一行代碼 C語言(視頻講解版)
- C/C++程序員面試指南
- C#程序設計教程(第3版)
- 自學Python:編程基礎、科學計算及數據分析(第2版)
- 區塊鏈架構之美:從比特幣、以太坊、超級賬本看區塊鏈架構設計
- Building Slack Bots
- 零基礎學C++(升級版)