Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.bashrc in Cygwin 1.7

Tags:

cygwin

I'm running Cygwin 1.7.17 on Windows Server 2012. My user account is "Administrator". Where should I put a .bashrc file for the Cygwin bash to pick it up?

I've tried the "c:\users\Administrator" folder, which seems to be the HOME in Cygwin 1.7. Tryed c:\cygwin\home\Administrator also.

like image 924
Eliezer Kohen Avatar asked Feb 19 '13 17:02

Eliezer Kohen


People also ask

Where is bashrc file in Cygwin?

bashrc files from the /etc/skel folder to get you started.

Where .bashrc is located?

In most cases, the bashrc is a hidden file that lives in your home directory, its path is ~/. bashrc or {USER}/. bashrc with {USER} being the login currently in use.

How do I open .bashrc in terminal?

From a login or other node on the cluster, type nano ~/. bashrc to open the file in the nano editor. My . bashrc has already been added to, so you'll see additional definitions below the # User specific aliases and functions section.


1 Answers

Start a shell instance and run the command echo $HOME to see what your home path is set to. That's where all your user config files will be read from. It might not be one of the paths you tried.

Once you know where it is, just copy the template .bash_profile and .bashrc files from the /etc/skel folder to get you started.

If you don't like the path that's currently being used as your home, you can change it by editing /etc/passwd. Here's more info on that... Safely change home directory

like image 151
Costa Avatar answered Oct 22 '22 11:10

Costa