configuration - where to define aliases: .cshrc or .bashrc ? - Ask Ubuntu
where should define aliases please? i.e., best practice (and why)? can think of following options:
- .bashrc
- .cshrc
- .tcsh
- ...
thank you
the options mention refer different shells. when user starts shell program, relevant rc
file in user's home directory read. if using bash (as when open terminal in ubuntu, unless have installed , selected different shell default user), should put aliases either in .bashrc
, or if prefer (for example can more see , edit aliases), in dedicated .bash_aliases
file. file not exist default, if created, sourced when bash started default .bashrc
:
$ grep -n '^[^#]*bash_alias' /etc/skel/.bashrc 104:if [ -f ~/.bash_aliases ]; 105: . ~/.bash_aliases
if using shell, use appropriate rc
shell.
Comments
Post a Comment