Mastering Sublime Text Installation on Linux: A Comprehensive Guide
- By admin --
- Thursday, 24 Aug, 2023
Mastering the installation of Sublime Text on Linux involves a few simple steps. Sublime Text is a popular text editor that offers a sleek interface and powerful features. Here's a comprehensive guide to installing it on a Linux system:
Step 1: Download Sublime Text
- Open a web browser and go to the Sublime Text official website: https://www.sublimetext.com/
- Click on the "Download" button to download the latest version of Sublime Text.
Step 2: Install Sublime Text
-
Open a terminal window. You can usually do this by searching for "Terminal" in your applications or by pressing
Ctrl + Alt + T
. -
Navigate to the directory where the downloaded Sublime Text package is located using the
cd
command. For example:cd ~/Downloads
Replace
~/Downloads
with the actual path to the directory where you downloaded Sublime Text. -
Extract the downloaded package using the
tar
command. Replacesublime_text_build
with the appropriate version number you downloaded:tar xvzf sublime_text_build.tar.gz
-
Move the extracted folder to a system-wide location. A common location is
/opt
:sudo mv sublime_text /opt/
Step 3: Create a Symbolic Link
-
Navigate to the
/usr/local/bin
directory:cd /usr/local/bin
-
Create a symbolic link to the
sublime_text
executable in the/opt/sublime_text
directory:sudo ln -s /opt/sublime_text/sublime_text
Step 4: Create a Desktop Entry (Optional but Recommended)
-
Create a
.desktop
file for Sublime Text. You can use a text editor likenano
orvim
:sudo nano /usr/share/applications/sublime-text.desktop
-
Add the following content to the file:
[Desktop Entry]
Version=1.0 Type=Application Name=Sublime Text GenericName=Text Editor Comment=Sophisticated text editor for code, markup, and prose Exec=/opt/sublime_text/sublime_text %F Terminal=false MimeType=text/plain; Icon=/opt/sublime_text/Icon/256x256/sublime-text.png Categories=TextEditor;Development; StartupNotify=true Actions=new-window;new-file; [Desktop Action new-window] Name=New Window Exec=/opt/sublime_text/sublime_text -n OnlyShowIn=Unity; [Desktop Action new-file] Name=New File Exec=/opt/sublime_text/sublime_text --command new_file OnlyShowIn=Unity;
-
Save the file and exit the text editor.
Step 5: Launch Sublime Text
You can now launch Sublime Text by searching for it in your applications menu or by typing sublime_text
in the terminal.
Congratulations! You have successfully installed Sublime Text on your Linux system. You can further customize Sublime Text by installing packages and plugins to enhance its functionality.