Mastering Sublime Text Installation on Linux: A Comprehensive Guide

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

  1. Open a web browser and go to the Sublime Text official website:
  2. Click on the "Download" button to download the latest version of Sublime Text.

Step 2: Install Sublime Text

  1. Open a terminal window. You can usually do this by searching for "Terminal" in your applications or by pressing Ctrl + Alt + T.

  2. 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.

  3. Extract the downloaded package using the tar command. Replace sublime_text_build with the appropriate version number you downloaded:

    tar xvzf sublime_text_build.tar.gz

  4. 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

  1. Navigate to the /usr/local/bin directory:

    cd /usr/local/bin

  2. 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)

  1. Create a .desktop file for Sublime Text. You can use a text editor like nano or vim:

    sudo nano /usr/share/applications/sublime-text.desktop

  2. 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;

  3. 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.

Comment As:

Comment (0)