Bash
De WikiLICC
Verificar quais shell são disponíveis no sistema
[user]$ more /etc/shells /bin/sh /bin/bash /sbin/nologin /bin/zsh
/bin/bash
The program /bin/bash uses a set of startup files in /etc or an equivalent file in your home directory.
- Interactive login shell: /bin/login
- after reading /etc/passwd file
- reads /etc/profile
- reads ~/.bash_profile
- Interactive non-login shell: at the command-line using a shell program (e.g., [prompt]$/bin/bash) or by the /bin/su command. An interactive non-login shell is also started with a terminal program such as xterm or konsole from within a graphical environment.
- Normally copies the parent environment
- reads ~/.bashrc
- Non-interactive shell: usually present when a shell script is running. Only the environment inherited from the parent shell is used.
- ~/.bash_logout: read and executed when a user exits from an interactive login shell.
- /etc/bashrc : for system wide initialization of non-login shells. This file is usually called from the user's ~/.bashrc file and is not built directly into bash itself. This convention is followed in this section.