Milind Soorya
milind's Blog

milind's Blog

How to open sublime text from the windows command line

How to open sublime text from the windows command line

Milind Soorya's photo
Milind Soorya

Published on Oct 23, 2021

2 min read

Subscribe to my newsletter and never miss my upcoming articles


I am a very big fan of VS Code. I genuinely believe that it is the best IDE for web development. These days I am coding more in python and my interest has shifted towards python IDE's such as Pycharm and Sublime text.

Pycharm is the OG python IDE and it has all the features that you might want. But, it's a bit bulky and takes a lot of resources.

In some cases, I just want to quickly get up and going with as little friction as possible and Sublime text is the perfect answer for those scenarios.

Why open Sublime from cmd?

As I mentioned above, one of my favourite features of VS Code is that it can be opened from any directory using the command code . and VS code will open with all the files in that directory. This simple step has made me more productive.

In this article, I will show how to do the same thing using Sublime Text in windows.

1 search for environment variables.png

STEP - 2: Select the environment variable option

2 select environment variables.png

STEP - 3: Click on the path and then edit

3 Click edit.png

STEP - 4: Add path to your sublime installation

usually, it will be at C:\Program Files\Sublime Text 3.

After doing this click ok and exit.

4 Add path to your sublime installation.png

STEP - 4: Open sublime from any location

Just go to your desired directory and open a command prompt and input this command.

subl .

5 Open sublime.png

That's it!! Thanks for reading.

Check out my website for more useful articles.

Share this