Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

As the title says, I'm trying to create a sym link for my Sublime_text launcher, I did:

sudo ln -s /path/to/sublime_text /usr/bin/subl

and when I ls /usr/bin the blue subl link is there. Then I restarted my terminal, and ran ./subl and also subl --- I get the error:

bash: subl: command not found

I'm not sure what I did wrong, my echo $PATH is:

/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/bin/core_perl
share|improve this question
    
What happens when you run /path/to/sublime_text? Is this the correct target file for the symlink? –  Daniel Beck May 8 '13 at 17:37
add comment

2 Answers

if /usr/bin is in your path (as you point out), you should be able to just type subl anywhere from the command line. So this is without the ./

./ means "from the current directory". That would only make sense if you were in /usr/bin.

share|improve this answer
    
The error message shown (bash: subl: command not found) only occurs when not typing ./. –  Daniel Beck May 11 '13 at 7:15
    
"Then I restarted my terminal, and ran ./subl and also subl --- I get the error" > seems like het gets the error message regardless of whether he uses ./ –  Vincent May 11 '13 at 18:52
    
In the first case, it'll probably say bash: ./subl: No such file or directory. In any case, this answer won't solve his problem, as he tired both with and without ./. –  Daniel Beck May 11 '13 at 19:23
add comment

I realize this is old, but I thought I'd put in my input if anyone else wander in here, as I had the same problem.

In my case it was a silly mistake of having my command look like:

ln -s "/home/username/Sublime\ Text\ 2/sublime_text" sublime

As opposed to without \ or without " Bash isn't very helpful in telling you that your link is bad if you're linking to a file as opposed to a directory.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.