Mudanças entre as edições de "Bash"
De WikiLICC
m (→/etc/profile) |
m (→LInks) |
||
Linha 35: | Linha 35: | ||
− | == | + | ==Links== |
http://aurelio.net/shell/canivete.html | http://aurelio.net/shell/canivete.html |
Edição das 15h23min de 3 de maio de 2010
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.
/etc/profile
Alguns arquivos importantes:
colorls.sh % ls colorido lang.sh % definicoes do charset usado, LANG, LC_CTYPE mpich2.sh % module load mpich2-x86_64 vim.sh % para o vi shell-colors.sh % ADICIONADO. Contém atalhos para cores e o comando para mudar a cor do prompt % PS1="${BOLDYELLOW}\u${BOLDWHITE}@${BOLDGREEN}\h ${BOLDBLUE}\W \$ ${COLOR_RESET}"