Terminal command ‘edit’ unknown (OSX 10.8.1) : -bash: edit: command not found

Posted on


When I want to edit a file from within a terminal window, the edit command is not recognised.
I want it to open my editor (sublime text editor 2) and took the following steps:

Created a symbolic link on my path:

ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" ~/bin/subl

specified it as my default editor:

export EDITOR='subl -w'

The command subl starts the editor up, so that worked fine. I can also see that the environment variable is set correctly.

But I stil get the “-bash: edit: command not found” error when trying to edit a file by entering edit ~/.bashrc for example.


Edit is not a bash built-in command.

This means that the shell searches for a binary called edit in your PATH or an alias or a function called edit.

Leave a Reply

Your email address will not be published. Required fields are marked *