This is my alias configuration in Ubuntu 16.04.2 LTS
root@Ubuntu:/# cat /etc/.bash_aliases
alias i='ifconfig | grep eth -A 1'
alias l='ls -lh'
root@Ubuntu:/#
root@Ubuntu:/# cat /etc/bash.bashrc
### *output truncated* ###
if [ -f /etc/.bash_aliases ]; then
. /etc/.bash_aliases
fi
root@Ubuntu:/#
However, when I test it, only alias i='ifconfig | grep eth -A 1' is working as expected.
root@Ubuntu:/# i
eth0 Link encap:Ethernet HWaddr AA:AA:AA:AA:AA:AA
inet addr:10.0.0.1 Bcast:10.0.0.255 Mask:255.255.255.0
root@Ubuntu:/#
root@Ubuntu:/# alias i
alias i='ifconfig | grep eth -A 1'
root@Ubuntu:/#
Another alias alias l='ls -lh' does not work as expected.
root@Ubuntu:/# l
bin/ dev/ home/
root@Ubuntu:/#
The output should be like this:
root@Ubuntu:/# ls -lh
total 80K
drwxr-xr-x 2 root root 4.0K Jul 21 14:37 bin
drwxr-xr-x 3 root root 4.0K Jul 21 14:52 boot
drwxr-xr-x 15 root root 3.8K Nov 3 12:22 dev
root@Ubuntu:/#
It turns out that l does not follow my alias config.
root@Ubuntu:/# alias l
alias l='ls -CF'
root@Ubuntu:/#
I guess alias l='ls -CF' must be configured at somewhere else.
The question is how to find out the location of alias l='ls -CF' config file?