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

Windows XP installation, no previous version of Windows NT - Super User

crash - Windows Rundll32 (child process of DllHost) is crashing. How can I even identify it? - Super User

16.04 - Errors were encountered while processing in python - Ask Ubuntu