Why alias names defined in .bashrc file are not working

aliasbashrc

I have give alias names in .bashrc file like below. But the alias names are not working. why?

alias c='clear'
alias l='ls -lt'
alias h='history'
alias d='ls -lt |grep "^d"'

export ORACLE_HOME=/ora11gr2/app/oracle/product/11.2.0/db2
export ORACLE_LIB=/ora11gr2/app/oracle/product/11.2.0/db2/lib
export PATH=$ORACLE_HOME/bin:/usr/vac/bin:/usr/vacpp/bin:.    
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:.

Best Answer

Did you source your .bashrc file after you changed it? Try:

. ~/.bashrc

Then your shell should see the changes. Alternatively, you can terminate and restart your shell.

p.s.

When you run from a script, load this first ref

shopt -s expand_aliases
Related Question