Alias in .bashrc

Whenever I use command ls, I use it with the -l option and sometimes also the --human-readable option.

Typing ls -l -h in every instant is not too much for me. The problem is with my memory and remembering stuff. So usually I use ls alone and then remember to use ls -l -h

To fix this,
Edit the user .bashrc file (~/.bashrc) to add an alias: alias lc="ls --color=always". Then give the command: source .bashrc. That will reload .bashrc.

Lc is just an example. Make it whatever you want.

Comments

Popular Posts