After start the cygwin shell, it just locate in a wrong home dir:
[email protected] ~
$ pwd
/cygdrive/c/Users/xfire
But it used to be /home/xfire
[email protected] /etc
$ cat passwd | grep xfire
xfire:unused:22773:10513:U-CORP\xfire,S-1-5-21-527237240-725345543-682003330-12773:/home/xfire:/bin/bash
And the .bashrc in the /home/xfire was not executed, even I copy it to the /cygdrive/c/Users/xfire, it also doesn't work!
bashrc files from the /etc/skel folder to get you started. bash: cd: /etc/skel: No such file or directory -> Turns out, you have to run cygpath -w /etc/skel as administrator.
bashrc File from the beginning, you can do so by pressing Ctrl+Alt+T or opening a new terminal tab, making it all more accessible. At each launch, Bash runs the contents of the . bashrc file to load your preferences. You can find this shell script in the home directory of users.
Just type notepad ~/. bashrc from the bash prompt and notepad will be launched with this file opened or will ask to create it, if it doesn't exist. If you're comfortable to vim, just type vim ~/. bashrc .
On cygwin, I add this to my ~/.bash_profile
:
. ~/.bashrc
Some program add an "HOME" environment in windows registry and set the value to "C:\Users\xfire", that's why cygwin take that directory as the home. cygwin.com/faq-nochunks.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With