---
title: "Essential Tips for Installing & Using Sublime Text on Ubuntu"
description: "An essential tool for many IT administrators, Sublime Text on Ubuntu helps manage files and configurations with ease. Learn how in this tutorial!"
canonical: "https://adamtheautomator.com/sublime-text-on-ubuntu/"
---

# Essential Tips for Installing & Using Sublime Text on Ubuntu

> An essential tool for many IT administrators, Sublime Text on Ubuntu helps manage files and configurations with ease. Learn how in this tutorial!

Source: https://adamtheautomator.com/sublime-text-on-ubuntu/

---

ATA Learning

Tap to hide

[

ATA Learning

](/)

*   [Home](/)
*   [Tutorials](/tutorials/)
*   [Instructors](/author/)
*   [Advertising](/advertising/)
*   [Recommended Resources](/resources/)
*   [About Adam](/about-adam/)

Search for:  

*   [](https://twitter.com/adbertram)
*   [](https://github.com/Adam-the-Automator)
*   [](https://www.linkedin.com/company/adam-the-automator-llc)
*   [](/feed/)

![Essential Tips for Installing & Using Sublime Text on Ubuntu](https://adamtheautomator.com/wp-content/uploads/2022/07/Essential-Tips-for-Installing-Using-Sublime-Text-on-Ubuntu.jpg)

# Essential Tips for Installing & Using Sublime Text on Ubuntu

[![](https://secure.gravatar.com/avatar/2788bb1a3f735603f81eca51d68daec56a9d97e805a10268fb2c20afcc76b81b?s=192&d=mm&r=g)Nicholas Xuan Nguyen](https://adamtheautomator.com/author/nicholas-xuan-nguyen/)14 July 20227 min. read

Categories: [IT Ops](/category/it-ops/)

Tags:[Linux](/tag/linux/)[Sublime Text](/tag/sublime-text/)[Ubuntu Linux](/tag/ubuntu-linux/)

Table of Contents

*   [Prerequisites](#prerequisites)
*   [Adding the Sublime Text Repositories](#adding-the-sublime-text-repositories)
*   [Installing Sublime Text on Ubuntu](#installing-sublime-text-on-ubuntu)
*   [Interacting with Sublime Text via Command Line Interface (CLI)](#interacting-with-sublime-text-via-command-line-interface-cli)
*   [Creating Your First Project in Sublime Text](#creating-your-first-project-in-sublime-text)
*   [Installing Packages (plugins) with Package Control](#installing-packages-plugins-with-package-control)
*   [Conclusion](#conclusion)

Many text/code editors out in the market can help with coding for your project. But if you haven’t found one that suits your taste, why not try Sublime Text on Ubuntu?

Sublime Text is a powerful text editor with a wide range of features. And guess what? You can get Sublime Text for FREE! But mind you, being free doesn’t make Sublime Text any less than a premium tool.

In this tutorial, you’ll learn to set up Sublime Text, create a project and install plugins for additional features you can use for your project.

Read on and start coding like a pro!

## Prerequisites

This tutorial will be a hands-on demonstration. If you’d like to follow along, be sure you have a Linux machine with [Ubuntu](https://adamtheautomator.com/install-ubuntu/) installed. This tutorial uses Ubuntu 20.04 LTS, but any recent version of Ubuntu should work.

Related:[How to Install Ubuntu 20.04 \[Step-by-Step\]](https://adamtheautomator.com/install-ubuntu/)

## Adding the Sublime Text Repositories

Sublime Text is a powerful text editor with a wide range of features and is available for Ubuntu systems. But just like other tools, you’ll have to install Sublime Text by downloading the Sublime Text repository first.

To add the Sublime Text repository on your machine:

1\. Run the wget command below to download the Sublime Text repository public GPG key to your apt keyring. A keyring is a collection of public keys used for verifying the authenticity of packages, in this case, the Sublime Text repository.

```bash
wget -O- https://download.sublimetext.com/sublimehq-pub.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/sublimehq.gpg
```

Related:[Install Python Wget and Automate your File Downloads](https://adamtheautomator.com/python-wget/)

![Add the Sublime Text public GPG key](https://adamtheautomator.com/wp-content/uploads/2022/07/image-37.png)

Add the Sublime Text public GPG key

2\. Next, run the below command to add the Sublime Text repository to your system’s apt sources list.

The tee command writes the output of the echo command to a file called /etc/apt/sources.list.d/sublime-text.list. Apt uses this file to know which repositories to check for software packages.

Adding the Sublime Text repository to the sublime-text.list file enables you to install Sublime Text using apt.

```bash
echo 'deb [signed-by=/usr/share/keyrings/sublimehq.gpg] https://download.sublimetext.com/ apt/stable/' | sudo tee /etc/apt/sources.list.d/sublime-text.list
```

![Adding the Sublime Text repository](https://adamtheautomator.com/wp-content/uploads/2022/07/image-38.png)

Adding the Sublime Text repository

3\. Run [apt update](https://linuxize.com/post/how-to-use-apt-command/#updating-package-index-apt-update) to update your system’s package list. This command ensures apt knows about the new Sublime Text repository you just added in step two.

```bash
apt update -y
```

![Updating the system’s package list](https://adamtheautomator.com/wp-content/uploads/2022/07/image-39.png)

Updating the system’s package list

4\. Finally, run the [apt-cache](https://debian-handbook.info/browse/stable/sect.apt-cache.html) command below to check the Sublime Text repository is configured correctly.

```bash
apt-cache policy sublime-text
```

The output below shows the apt policy for the Sublime Text repository.

![Checking the Sublime Text repository is configured correctly](https://adamtheautomator.com/wp-content/uploads/2022/07/image-40.png)

Checking the Sublime Text repository is configured correctly

## Installing Sublime Text on Ubuntu

Now that you have added the Sublime Text repository to your system, you’re ready to install Sublime Text using the apt utility.

Run the [apt install](https://linuxize.com/post/how-to-use-apt-command/#installing-packages-apt-install) command below to install Sublime Text and dependencies on your machine.

```bash
apt install sublime-text -y
```

![Installing Sublime Text on Ubuntu](https://adamtheautomator.com/wp-content/uploads/2022/07/image-41.png)

Installing Sublime Text on Ubuntu

Now, run the following command to verify Sublime Text’s installed version.

```bash
subl --version
```

As of this writing, you can see below the latest Sublime Text version installed is **Build 4126**. Yours may be different depending on the latest release. This output confirms you’ve successfully installed Sublime Text on your machine.

![Verifying that Sublime Text version installed](https://adamtheautomator.com/wp-content/uploads/2022/07/image-42.png)

Verifying that Sublime Text version installed

## Interacting with Sublime Text via **Command Line Interface (CLI)**

Even though Sublime Text uses GUI, you can still interact with the tool by running subl commands on your terminal. And since you’ve just installed Sublime Text, you’ll launch it for the first time.

But first, you’ll verify if Sublime Text has a symlink added to your system’s PATH environment variable to ensure interactions with Sublime Text via your terminal goes smoothly.

Related:[How To Wrangle Ubuntu Environment Variables](https://adamtheautomator.com/ubuntu-environment-variables/)

1\. Run the following command to print the directories defined in your system’s PATH variable.

```bash
printenv | grep PATH
```

As shown below, one of the directories must be /usr/bin/.

![Checking directories in the PATH variable](https://adamtheautomator.com/wp-content/uploads/2022/07/image-43.png)

Checking directories in the PATH variable

2\. Next, run the echo command below to check that the /usr/local/bin/subl symlink file exists. This symlink allows you to run subl commands from any directory on your system.

Some operating systems, like [Windows 10](https://www.sublimetext.com/docs/command_line.html#windows-10), require you to set up the environment variable before using the subl command. Luckily, when you install Sublime Text on Ubuntu using apt, the environment variable is set up for you automatically in _/usr/bin/_.

```bash
echo /usr/local/bin/subl 
```

![Checking the /usr/local/bin/subl symlink file exists](https://adamtheautomator.com/wp-content/uploads/2022/07/image-44.png)

Checking the _/usr/local/bin/subl_ symlink file exists

3\. Now, run the command below to see the manual page for subl CLI.

Whenever you’re working in a terminal, it’s always a good idea to check the manual page to see the list of available options for a command.

```bash
subl --help
```

Below, you can see arguments you can use to interact with Sublime Text via your terminal.

![Viewing the manual page for subl CLI](https://adamtheautomator.com/wp-content/uploads/2022/07/image-45.png)

Viewing the manual page for subl CLI

4\. Finally, run the subl command below to launch the Sublime Text window.

```bash
subl
```

If all goes well, you’ll see the default theme of the Sublime Text window, as shown below.

![Opening Sublime Text via the Terminal](https://adamtheautomator.com/wp-content/uploads/2022/07/image-46.png)

Opening Sublime Text via the Terminal

Alternatively, you can search for sublime in the Dash and click on Sublime Text to launch the application.

![Opening Sublime Text from the Dash](https://adamtheautomator.com/wp-content/uploads/2022/07/image-47.png)

Opening Sublime Text from the Dash

> _Whichever way option you choose to launch Sublime Text is up to you. But if you’re mostly working in a terminal, running the subl command is the ideal option._

## **Creating Your First Project in Sublime Text**

Now that you’ve installed and opened Sublime Text, it’s time to create your first [project](https://www.sublimetext.com/docs/projects.html). Projects in Sublime Text are made up of two files:

*   The _.sublime-project_ file – contains the project definition and controls which folders are associated with the project. You can share this file with other users and commit to version control systems. This file can also contain settings that apply to files open in a particular window only, and build systems that apply only within that window.
*   The _.sublime-workspace_ file – contains data, including which files are opened, the contents of unsaved files, and modifications to each. Contrary to _.sublime-project_ files, _.sublime-workspace_ files contain data you must keep private.

To create a project in Sublime Text:

1\. Run the below command to create and open a file called MyProject in Sublime Text.

```bash
subl ~/MyProject
```

![Creating a file in Sublime Text](https://adamtheautomator.com/wp-content/uploads/2022/07/image-48.png)

Creating a file in Sublime Text

2\. Next, click on the Project menu, and choose Save Project As to set a name for your project.

![Saving the Project](https://adamtheautomator.com/wp-content/uploads/2022/07/image-49.png)

Saving the Project

3\. Run the ls command below on your terminal to list the files and directories in your home directory (~/).

```powershell
ls ~/
```

Below, you can verify both the _.sublime-project_ and _.sublime-workspace_ files for your project exist.

![Verifying the .sublime-project and .sublime-workspace files](https://adamtheautomator.com/wp-content/uploads/2022/07/image-50.png)

Verifying the _.sublime-project_ and _.sublime-workspace_ files

4\. Provide a project name you like, and click Save to finalize creating your project.

![Providing a project name](https://adamtheautomator.com/wp-content/uploads/2022/07/image-51.png)

Providing a project name

5\. Now, click on the Project menu again, and choose Add Folder to Project to select the folders you like to add to your project.

![Adding folders to project](https://adamtheautomator.com/wp-content/uploads/2022/07/image-52.png)

Adding folders to project

6\. Select all folders you’d like to add to your project and click Open.

![Selecting folders to add to the project](https://adamtheautomator.com/wp-content/uploads/2022/07/image-53.png)

Selecting folders to add to the project

After adding the folders to your project, the left panel appears where you’ll see the list of folders associated with your project.

Congratulations! You’ve just created your first project in Sublime Text.

![Viewing folders added to the project](https://adamtheautomator.com/wp-content/uploads/2022/07/image-54.png)

Viewing folders added to the project

## Installing Packages (plugins) with **Package Control**

Sublime Text is a great text editor, but with the help of plugins, you can make Sublime Text even better. Plugins are pieces of code that add more functionality to an application.

In Sublime Text, plugins are called packages, and Package Control is a package manager for Sublime Text that lets you find, install, and update packages. With Package Control, you don’t have to worry about manually downloading and installing packages.

But first, you’ll have to install Package Control for Sublime Text:

1\. Click on the Tools menu, and select Install Package Control, as shown below, to install Package Control.

![Installing Package Control ](https://adamtheautomator.com/wp-content/uploads/2022/07/image-55.png)

Installing Package Control

![Confirming Package Control was installed](https://adamtheautomator.com/wp-content/uploads/2022/07/image-56.png)

Confirming Package Control was installed

2\. Once installed, restart Sublime Text.

3\. Now, open your favorite web browser, navigate Package Control‘s [official page](https://packagecontrol.io/), and find the package you like to install. In this example, you’ll install the Visual Studio Code(VSC) package to take advantage of VSC’s outstanding features.

Search for Visual Studio Code in the search box, and choose the first Visual studio code item in the search result list, as shown below, to open the package.

![Searching for VSC package](https://adamtheautomator.com/wp-content/uploads/2022/07/image-57.png)

Searching for VSC package

Below, you can see the package details for VSC.

![Viewing VSC’s package details](https://adamtheautomator.com/wp-content/uploads/2022/07/image-58.png)

Viewing VSC’s package details

4\. Switch back to Sublime Text, press Ctrl+Shift+P keys, or click on Tools —> Command Palette to open the command palette.

![Opening the Command Palette](https://adamtheautomator.com/wp-content/uploads/2022/07/image-59.png)

Opening the Command Palette

5\. Type package in the input box, select Package Control: Install Package, and press Enter to get access to available packages you can install.

![Accessing package control in the command palette](https://adamtheautomator.com/wp-content/uploads/2022/07/image-60.png)

Accessing package control in the command palette

6\. Now, type vsc in the new input box that appears, and select the first result from the list (Visual studio code), as shown below, to install the VSC package.

![Searching and installing the VSC package](https://adamtheautomator.com/wp-content/uploads/2022/07/image-61.png)

Searching and installing the VSC package

You’ll see a message that says “Installing Package” on the status bar at the bottom of the window, as shown below. You’ll know the package is installed once the message disappears.

![Viewing the package installation status](https://adamtheautomator.com/wp-content/uploads/2022/07/image-62.png)

Viewing the package installation status

7\. Once installed, click on the Preferences menu —> Package Settings —> Package Control and select Settings, and you’ll see a JSON file open in a new tab.

![Viewing installed packages](https://adamtheautomator.com/wp-content/uploads/2022/07/image-63.png)

Viewing installed packages

8\. Finally, find the installed\_packages section in the second column, and you’ll see your newly installed package listed, as shown below.

Now you can use all of the VSC package’s features for your project.

![Verifying the newly-installed package (VSC)](https://adamtheautomator.com/wp-content/uploads/2022/07/image-64.png)

Verifying the newly-installed package (VSC)

## Conclusion

In this tutorial, you’ve learned how to install and use Sublime Text for your project on Ubuntu. You’ve installed packages with the built-in Package Control. You’re now ready to start coding in Sublime Text like a pro with these newly-acquired skills.

There are thousands of packages available, and more are being added over time, like the Nodejs package that adds support for [Node.js](https://packagecontrol.io/search/Node) development. So if you’re working with Node.js, install the package and start coding right away!

Related:[How to Create an HTTPS NodeJS Web Service with Express](https://adamtheautomator.com/https-nodejs/)

Share this article

[Share on X](https://twitter.com/intent/tweet?url=https%3A%2F%2Fadamtheautomator.com%2Fsublime-text-on-ubuntu%2F&text=Essential%20Tips%20for%20Installing%20%26%20Using%20Sublime%20Text%20on%20Ubuntu)[Share on Facebook](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fadamtheautomator.com%2Fsublime-text-on-ubuntu%2F)[Share on LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fadamtheautomator.com%2Fsublime-text-on-ubuntu%2F)

## Related Posts

![](https://adamtheautomator.com/wp-content/uploads/2024/03/openldap-4.jpg)

### [How to Install and Configure an OpenLDAP Ubuntu Server](/openldap/)

Unlock the power of OpenLDAP on Ubuntu for centralized user authentication, seamless access control management, and enhanced directory services!

![](https://adamtheautomator.com/wp-content/uploads/2023/08/install-go-on-ubuntu-1.jpg)

### [How to Install GO on Ubuntu Linux](/install-go-on-ubuntu/)

Learn the ins-and-outs of how to install GO Ubuntu Linux and see how you can take advantage of this popular programming language!

![](https://adamtheautomator.com/wp-content/uploads/2023/07/update-the-kernel-in-ubuntu.jpg)

### [Learn how to Update the Kernel In Ubuntu Linux Safely](/update-the-kernel-in-ubuntu/)

In this ATA Learning tutorial learn the ins-and-outs to update the kernel in Ubuntu Linux safely through several different methods!

## Categories

*   [IT Ops](/category/it-ops/)
*   [Cloud](/category/cloud/)
*   [DevOps](/category/devops/)
*   [Home Ops](/category/home-ops/)
*   [Information Security](/category/infosec/)
*   [Software Development](/category/software-development/)

## Site

*   [Home](/)
*   [Tutorials](/tutorials/)
*   [Instructors](/author/)
*   [Advertising](/advertising/)
*   [Recommended Resources](/resources/)
*   [About Adam](/about-adam/)

Copyright 2026© ATA Learning | [Privacy Policy](/privacy/)
