Can't get aliases to work...

Digital_Mirage

Registered
Ok, this is pretty frustrating. I do know that on 10.6 I have bash.
Code:
$ echo $SHELL
/bin/bash
Now, when I look at my .bashrc file at /Users/<username>, I have this fun:
Code:
$ cat .bashrc
alias l='ls'
alias la='ls -a'
alias ll='ls -l'
alias lla='ls -la'
In theory, all should be well. However, when I restart the terminal and do ll, it says that the command is not found :( . Why? This _should_ work in my Linux box, but I have no clue what I'm doing wrong...

Any help is appreciated.
 
Are you sure you are using a bash shell? Try to launch it explicitly with the bash command, and it should work. Also check your .bashrc is in your home directory.
 
Are you sure you are using a bash shell? Try to launch it explicitly with the bash command, and it should work. Also check your .bashrc is in your home directory.
I think that I simply forgot you need to open another instance of the shell in order to start using my aliases :) .
 
The same thing happens to me. The aliases specified in .bashrc are ignored when I open a terminal window, even if Bash is the running shell. To make Bash read my .bashrc, I have to type the bash command again.

I have no idea why it behaves in this way...
 
If you make changes to your .bashrc file, you can perform the following command to cause those changes to be applied to the current Terminal session (so you don't have to close and re-open a Terminal window):
Code:
source .bashrc
Remember to perform this while the current working directory is your home folder.
 
Back
Top