I know a few similar questions have been asked, but none seemed to help me so here it goes. I am trying to get sublime to run when I use 'subl' in the Linux terminal but I just cannot get it to work. I tried
sudo ln -s /Applications/Sublime\ Text\ 2/sublime_text usr/bin/subl
and that did create the file correctly so it seems, but then when I use the subl command it says 'No command 'subl' found.' Now I have rvm installed, so that may make a difference. I also tried 'usr/local/bin/subl' and the result was the same. I even used the rvmsudo afterward with the above command and it said file already created, and yet the subl command still does not work. What am I missing here? Keep in mind that I am a)new to linux b)new to sublime. Running ubuntu 12.10 if it matters
Brotherman, you have to update your path. It's probably easier than mucking around with
ln -s
softlinks. Go into your~/.bashrc
and at the bottom somewhere addexport PATH=$PATH:/path/to/your/binary
.Then all you should have to do is
. ~/.bashrc
and voila!I think you had a typo. It should be
Notice the
/
beforeusr
. If you tell terminalusr/bin/subl
, it'll take it as a relative path and create it in reference to the directory you were on when you executed this command.I'm using Linux Mint 13, but should be similar for you.
cd
into /usr/bin. There should a file called sublime-text-2. Copy that file and name subl. Thensubl
command should be usable in the terminal.Just in case, here is the contents of the file: