Lauching Sublime Text From Command Line

After following this tutorial, I cannot launch Sublime Text from command line. How can I fix this?

Here is Solutions:

We have many solutions to this problem, But we recommend you to use the first solution because it is tested & true solution that will 100% work for you.

Solution 1

After following this tutorial and facing the reported problem, I googled it and realised that I had forgot to create a symbolic link.

sudo ln -s /opt/sublime/sublime_text /usr/bin/subl

Now the problem is solved 🙂

Solution 2

For recent versions of Ubuntu and Sublime Text 3, I’m adding a symlink like this:

sudo ln -s /opt/sublime_text/sublime_text /usr/local/bin/subl

Then I can execute it from terminal like subl myFile.php.

Solution 3

For anyone who is struggling for sublime text 3.

After creating symlink for opening ST3 use :

subl .

dont use:

sublime .

Solution 4

Personally I prefer creating an alias in ~/.bashrc, to avoid having to keep track of symbolic links:

alias subl=/opt/sublime_text/sublime_text

Solution 5

for those who install sublime in Ubuntu Software, just type

sudo ln -s /snap/sublime-text/38/opt/sublime_text/sublime_text /usr/local/bin/subl

Note: Use and implement solution 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from or, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply