It looks like the .bashrc in Ubuntu got rather complicated compared to other distros.
I added the ls alias but it does not work.
some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
alians ls="ls -lAxot --time-style="+%m-%d-%Y""
andy@7:~/Icons$ type ls
ls is aliased to `ls --color=auto'
I just added an alias (alias ll='echo "test"'
) to the bottom of .bashrc
, and it worked when I opened a new terminal.
You can also create the file .bash_aliases
and add them there if you want a simpler file to edit.
1 Like
Thanks.
A single file for just aliases is much easier.
elcste,
I think you left out that I needed to add this to my .bashrc.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
I left it out because it’s in Ubuntu’s default .bashrc
¹, but yes you are correct.
1: Here’s the section:
# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi