Baratha Aberathne
Baratha Aberathne

Reputation: 33

subl . command not working on terminal

I was trying to open my first app on ionic on sublime text using sublime text. It gave me a "command not found" error. How to fix?

I tried those commands:

  1. sudo rm -rf /usr/local/bin/subl
  2. sudo ln -s /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl /usr/local/bin

Upvotes: 3

Views: 2078

Answers (1)

Cara McCormack
Cara McCormack

Reputation: 402

Try copying the binary rather than symlinking it.

cp /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl

You can verify that it's been installed by running which subl - the output should be /usr/local/bin/subl.

Upvotes: 2

Related Questions