- 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
.
- 大話PLC(輕松動漫版)
- 潮流:UI設(shè)計必修課
- Angular UI Development with PrimeNG
- Python高級編程
- Windows Presentation Foundation Development Cookbook
- Python自然語言處理(微課版)
- Python編程與幾何圖形
- JavaCAPS基礎(chǔ)、應(yīng)用與案例
- Learning Probabilistic Graphical Models in R
- Microsoft Dynamics AX 2012 R3 Financial Management
- 大話Java:程序設(shè)計從入門到精通
- 計算機(jī)應(yīng)用技能實(shí)訓(xùn)教程
- Visual Basic語言程序設(shè)計基礎(chǔ)(第3版)
- Web開發(fā)新體驗(yàn)
- Scratch超人漫游記:創(chuàng)意程序設(shè)計:STEAM創(chuàng)新教育指南