Ubuntu: not command 'subl' found, trying to open ~/.bash_profile with it



Question:

NEWBIE QUESTION!!

Hi guys,

I'm trying to open the ~/.bash_profile file I just created with 'subl' command, I created the ~/.bash_profile file using the touch command, as follow:

touch ~/.bash_profile  

it did created it.

now I have to open it like this

subl ~/.bash_profile  

and I get this following error

not command 'subl' found, did you mean:    command 'subs' from package 'libsubtitles-perl' (universe)    command 'publ' from package 'atfs' (universe)  subl: command not found  

can you please advise in what to do? I'm really new on this and I haven't found any helpful answer around.


Solution:1

If you really need your beloved subl command in Linux >;) and you trust me, than use the three lines below, … If not, you should ignore them.

printf "%s\n\t%s\n%s\n" "subl() {" "gedit \"\$@\"" "}" >> .bashrc  source ~/.bashrc  subl ~/.bash_profile  

Wise decision, you could also use gedit or nano instead, both pre-installed on your system. Or install Sublime 3 or my favorite Atom.

Install Atom

sudo add-apt-repository ppa:webupd8team/atom  sudo apt-get update  sudo apt-get install atom  

Install Sublime 3

  • 64-bit

    wget http://c758482.r82.cf2.rackcdn.com/sublime-text_build-3083_amd64.deb  sudo dpkg -i sublime-text_build-3083_amd64.deb  
  • 32-bit

    wget http://c758482.r82.cf2.rackcdn.com/sublime-text_build-3083_i386.deb  sudo dpkg -i sublime-text_build-3083_i386.deb  


Solution:2

subl is a command in OSX, not Linux.

I would suggest using the simple text editor nano for editing files. The correct command would be:

nano ~/.bash_profile  

If you really need to use sublime-text there's a guide to installing it here. If it's already installed you'd have to make alias files, or symlinks, to use subl, which is described near the bottom of the linked article.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »