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:

  1. .bashrc
  2. .cshrc
  3. .tcsh
  4. ...

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

Popular posts from this blog

download - Firefox cannot save files (most of the time), how to solve? - Super User

windows - "-2146893807 NTE_NOT_FOUND" when repair certificate store - Super User