Find the bash configuration file

Is there a way to find the name of the bash configuration file that is currently being used. I was looking for a .profile or .bashrc file but could not find them. However, I can still print some of the variables env ie $ HOME, $ PATH

+5
source share
3 answers

If you use one of these sudo su -, bash --login, ssh user@host,
they are considered a login shell,
then you can try

  • / etc / profile
  • ~ / .bash_profile
  • ~ / .bash_login
  • ~ / .profile
+8
source

Environment variables are stored in each process. $ HOME and $ PATH are stored in the bash process itself.

, bash. ps, . ,

 cat /proc/your_bash_process_id/environ

, .

+2

.

$ HOME / .profile

$ HOME / .bashrc

0
source

All Articles