Skip to main content

If your system has strace then you can list the files opened by the shell, for example using

echo exit | strace bash -li |& grep '^open[a-z]*''^open'

(-li means login shell interactive; use only -i for an interactive non-login shell.)

This will show a list of files which the shell opened or tried to open. On my system, they are as follows:

  1. /etc/profile
  2. /etc/profile.d/* (various scripts in /etc/profile.d/)
  3. /home/<username>/.bash_profile (this fails, I have no such file)
  4. /home/<username>/.bash_login (this fails, I have no such file)
  5. /home/<username>/.profile
  6. /home/<username>/.bashrc
  7. /home/<username>/.bash_history (history of command lines; this is not a script)
  8. /usr/share/bash-completion/bash_completion
  9. /etc/bash_completion.d/* (various scripts providing autocompletion functionality)
  10. /etc/inputrc (defines key bindings; this is not a script)

Use man strace for more information.

If your system has strace then you can list the files opened by the shell, for example using

echo exit | strace bash -li |& grep '^open[a-z]*'

(-li means login shell interactive; use only -i for an interactive non-login shell.)

This will show a list of files which the shell opened or tried to open. On my system, they are as follows:

  1. /etc/profile
  2. /etc/profile.d/* (various scripts in /etc/profile.d/)
  3. /home/<username>/.bash_profile (this fails, I have no such file)
  4. /home/<username>/.bash_login (this fails, I have no such file)
  5. /home/<username>/.profile
  6. /home/<username>/.bashrc
  7. /home/<username>/.bash_history (history of command lines; this is not a script)
  8. /usr/share/bash-completion/bash_completion
  9. /etc/bash_completion.d/* (various scripts providing autocompletion functionality)
  10. /etc/inputrc (defines key bindings; this is not a script)

Use man strace for more information.

If your system has strace then you can list the files opened by the shell, for example using

echo exit | strace bash -li |& grep '^open'

(-li means login shell interactive; use only -i for an interactive non-login shell.)

This will show a list of files which the shell opened or tried to open. On my system, they are as follows:

  1. /etc/profile
  2. /etc/profile.d/* (various scripts in /etc/profile.d/)
  3. /home/<username>/.bash_profile (this fails, I have no such file)
  4. /home/<username>/.bash_login (this fails, I have no such file)
  5. /home/<username>/.profile
  6. /home/<username>/.bashrc
  7. /home/<username>/.bash_history (history of command lines; this is not a script)
  8. /usr/share/bash-completion/bash_completion
  9. /etc/bash_completion.d/* (various scripts providing autocompletion functionality)
  10. /etc/inputrc (defines key bindings; this is not a script)

Use man strace for more information.

No less
Source Link
AlexP
  • 10.8k
  • 36
  • 44

If your system has strace then you can list the files opened by the shell, for example using

echo exit | strace bash -li |& less | grep '^open''^open[a-z]*'

(-li means login shell interactive; use only -i for an interactive non-login shell.)

This will show a list of files which the shell opened or tried to open. On my system, they are as follows:

  1. /etc/profile
  2. /etc/profile.d/* (various scripts in /etc/profile.d/)
  3. /home/<username>/.bash_profile (this fails, I have no such file)
  4. /home/<username>/.bash_login (this fails, I have no such file)
  5. /home/<username>/.profile
  6. /home/<username>/.bashrc
  7. /home/<username>/.bash_history (history of command lines; this is not a script)
  8. /usr/share/bash-completion/bash_completion
  9. /etc/bash_completion.d/* (various scripts providing autocompletion functionality)
  10. /etc/inputrc (defines key bindings; this is not a script)

Use man strace for more information.

If your system has strace then you can list the files opened by the shell, for example using

echo exit | strace bash -li |& less | grep '^open'

(-li means login shell interactive; use only -i for an interactive non-login shell.)

This will show a list of files which the shell opened or tried to open. On my system, they are as follows:

  1. /etc/profile
  2. /etc/profile.d/* (various scripts in /etc/profile.d/)
  3. /home/<username>/.bash_profile (this fails, I have no such file)
  4. /home/<username>/.bash_login (this fails, I have no such file)
  5. /home/<username>/.profile
  6. /home/<username>/.bashrc
  7. /home/<username>/.bash_history (history of command lines; this is not a script)
  8. /usr/share/bash-completion/bash_completion
  9. /etc/bash_completion.d/* (various scripts providing autocompletion functionality)
  10. /etc/inputrc (defines key bindings; this is not a script)

Use man strace for more information.

If your system has strace then you can list the files opened by the shell, for example using

echo exit | strace bash -li |& grep '^open[a-z]*'

(-li means login shell interactive; use only -i for an interactive non-login shell.)

This will show a list of files which the shell opened or tried to open. On my system, they are as follows:

  1. /etc/profile
  2. /etc/profile.d/* (various scripts in /etc/profile.d/)
  3. /home/<username>/.bash_profile (this fails, I have no such file)
  4. /home/<username>/.bash_login (this fails, I have no such file)
  5. /home/<username>/.profile
  6. /home/<username>/.bashrc
  7. /home/<username>/.bash_history (history of command lines; this is not a script)
  8. /usr/share/bash-completion/bash_completion
  9. /etc/bash_completion.d/* (various scripts providing autocompletion functionality)
  10. /etc/inputrc (defines key bindings; this is not a script)

Use man strace for more information.

Source Link
AlexP
  • 10.8k
  • 36
  • 44

If your system has strace then you can list the files opened by the shell, for example using

echo exit | strace bash -li |& less | grep '^open'

(-li means login shell interactive; use only -i for an interactive non-login shell.)

This will show a list of files which the shell opened or tried to open. On my system, they are as follows:

  1. /etc/profile
  2. /etc/profile.d/* (various scripts in /etc/profile.d/)
  3. /home/<username>/.bash_profile (this fails, I have no such file)
  4. /home/<username>/.bash_login (this fails, I have no such file)
  5. /home/<username>/.profile
  6. /home/<username>/.bashrc
  7. /home/<username>/.bash_history (history of command lines; this is not a script)
  8. /usr/share/bash-completion/bash_completion
  9. /etc/bash_completion.d/* (various scripts providing autocompletion functionality)
  10. /etc/inputrc (defines key bindings; this is not a script)

Use man strace for more information.