Fandom

How To Wiki

How to configure bash startup scripts

1,795pages on
this wiki
Add New Page
Talk0 Share

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.




When bash starts up, there is a sequence of scripts initialized

Configuration filesEdit

Bash LoginEdit

These are executed when logging in or starting a new terminal, such as xterm. Listed in the order they are executed.

  • /etc/profile
  • /etc/bash/bashrc
  • ~/.bash_profile
    if( ~/.bash_profile doesn't exists )
    ~/.bash_login
    if( ~/.bash_login doesn't exists )
    ~/.profile
  • ~/.bashrc
  • /etc/bashrc

Non-loginEdit

For a non-login terminal, like scripts. Listed in the order they are executed.

  • /etc/bash/bashrc
  • ~/.bashrc


logoutEdit

~/.bash_logout is executed when a login terminal is logging out


these can be programed just like any shell scripts.

See: Howto program shell scripts

SettingsEdit

Common things set in bash scripts aliases, environment variables, and

See AlsoEdit

Also on Fandom

Random Wiki