dantedm
dantedm

Reputation: 31

Find and Locate Current .profile

How can I find and/or locate the file and directory of the currently loaded .profile in a bash shell. I made modifications to the current .profile on my machine, and would like to update it some more. I had created the current version in vi and couldn't tell where it was creating the file.

I am hoping that there is a command similar to "whoami"...

Upvotes: 1

Views: 11059

Answers (1)

mauro
mauro

Reputation: 5950

Bash executes startup scripts in the following order if you start a login shell:

  1. /etc/profile
  2. .bash_profile under you home directory
  3. .bash_login under you home directory
  4. .profile under you home directory

And .bashrc under your home dir in case of non-login shell.

So, probably, you just have to run vi ~/.profile

Upvotes: 6

Related Questions