locate my bash configuration file

Viewed 20629

Is there a way to find the name of the bash configuration file that is currently on use. I searched for the .profile or .bashrc but did not find them. However still I can print some of the env variables i.e $HOME, $PATH

4 Answers

As some people said, those files are in the home directory.

enter image description here

(Screenshot from Wiki article.)

I'll tell you here how to find it (the explanation here is for Windows 10 only), which is my system.

You can quickly find and open some of those locations with the following commands (using bash console):

  • cd ~ ← It will take you to your home directory.
  • ls -a ← It will display files and folders, both visible and hidden.
  • explorer . ← It will open the home folder in Windows Explorer, which can be really useful. Look for the file/folder you need. Move to it using:
  • cd folder-name or open the file in the text editor using notepad file-name. For your case, you should find and open notepad .bashrc
Related