Search code examples
macosbashalias

Bash alias: command not found


I'm trying to setup a simple alias to move me into my Developer folder on my machine. However, after setting it up, I get a weird error:

-bash: dv: command not found

I setup my alias in .bashrc like so:

alias dv='cd Developer/'

I use it by just typing dv, and then get that error. Does anyone see any syntax errors or something I'm missing here for aliases?


Solution

  • Run bash and then try the command.

    Alternatively, put it in ~/.bash_profile which should be loaded automatically.