Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

PHP Laravel 4 Basics Getting Started with Laravel Installing Laravel Homestead

i keep getting an error with subl . it says 'subl' is not a recognized as an internal or external command, operable prog

i keep getting an error with subl . it says 'subl' is not a recognized as an internal or external command, operable program or batch file.

I am on windows... Thoughts on how to fix this?

1 Answer

Bob Sutherton
Bob Sutherton
20,160 Points

It's been a while since I did this but I'll try to walk you through it. I'm assuming you're using Windows 10. Basically we tell Windows where to find the program. Here's how.

Step one: First, find out the path to that subl.exe thing. For me it looks like this:

C:/Program Files/Sublime Text 3

Step two: In the Cortana "Ask me anything" bar, search for environment variables. It's in the control panel somewhere. Then open that up.

There are two sets of environment variables. The first is for the user and the second is for the system. I actually have this added for both boxes, so I'm not sure which one is better but I'm guessing it doesn't matter a whole lot unless someone else is going to use your computer and need access to the subl command while logged in as a different user.

Click on new. A window will pop up asking for a variable name and a variable value. I just have the variable name as SUBLIME in all caps. I don't know how much the variable name really matters. For the variable value, add the path from step one.

Click ok. Hopefully, it's working now!

Note: Add the path to the folder only, as I did in step one. This won't work.

C:/Program Files/Sublime Text 3/subl.exe