Mudanças entre as edições de "Bash"

De WikiLICC
Ir para: navegação, pesquisa
m (/etc/profile)
m (/etc/profile)
Linha 26: Linha 26:
  
 
==/etc/profile==
 
==/etc/profile==
ccache.sh
+
Alguns arquivos importantes:
  colorls.sh
+
  colorls.sh  % ls colorido
cvs.sh
+
  lang.sh     % definicoes do charset usado, LANG, LC_CTYPE
devkit-disks-bash-completion.sh
+
  mpich2.sh   % module load mpich2-x86_64
glib2.sh
+
  vim.sh     % para o vi
  gnome-ssh-askpass.sh
 
kde.sh
 
kmix_pulseaudio_disable.sh
 
krb5-devel.sh
 
krb5-workstation.sh
 
  lang.sh
 
  less.sh
 
modules.sh
 
mpich2.sh
 
qt.sh
 
  vim.sh
 
which2.sh
 

Edição das 14h00min de 30 de abril 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