GNU Bash shell startup files
"Jamenson Espindula" ([email protected] via blfs-dev Mailing List) <[email protected]> Fri, 16 Jan 2026 09:51:49 -0300
| Newsgroups | gmane.linux.lfs.beyond.devel |
|---|---|
| Message-ID | <CAOW_YO=SdAV_M3QYikM_bVTXTc3J0Z=2S3xJjhd7DbGBTch=tw@mail.gmail.com> |
Hi all. I had an idea of include (in every startup file of the GNU Bash - version 5.3.0) an "echo" line as the last command to be executed. Below is the output of that "echo" commands: Successful login read file '/etc/profile' read file '/etc/bashrc' read file '/root/.bashrc' read file '/root/.bash_profile' su --login read file '/etc/profile' read file '/etc/bashrc' read file '/root/.bashrc' read file '/root/.bash_profile' su read file '/etc/bashrc' read file '/root/.bashrc' Some conclusions: Conclusion one: regardless it be 'login shell' or a 'non login shell', the '/etc/bashrc' and the '$HOME/.bashrc' files _always are read_ and in that order. Conclusion two: the '/etc/.bash_profile' is the _last file read_ after a successful login using the program '/usr/bin/login'. Conclusion three: the '$HOME/.profile' file is _not read_ at all (considering the defaults of the Beyond Linux From Scratch). Conclusion four: the '/etc/bashrc' file, which already is always read, is sourced again in the '$HOME/.bashrc' file (again, considering the defaults of the Beyond Linux From Scratch). Meanwhile, inside the GNU Screen (which fits into the 'non login shell' category), the 'completions' of the GNU Bash are not working (considering the 'stock' files). My best guess is: no longer source the '/etc/bashrc', as it already is read by bash and source the '$HOME/.profile' (which should contain the proper source commands of the bash completions). That is it. Jamenson Ferreira Espindula de Almeida Melo Jaboatão dos Guararapes, Pernambuco, Brazil GNU/Linux user #166197; LFS ID 24492 Key fingerprint: 234D 1914 4224 7C53 BD13 6855 2AE0 25C0 08A8 6180 -- http://lists.linuxfromscratch.org/sympa/info/blfs-dev Unsubscribe: See the above information page