本文介绍了Cygwin shell不执行.bashrc的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

启动cygwin shell后,它只会位于错误的home目录中:

  [email protected]
$ pwd
/ cygdrive / c / Users / xfire

/ 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

并且.bashrc在/ home / xfire中没有执行,即使我将它复制到/ cygdrive / c /有些程序在Windows注册表中添加一个HOME环境,并将其设置为/ home /。值为C:\Users\xfire,这就是为什么cygwin将该目录作为家。 cygwin.com/faq-nochunks.html


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!

解决方案

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

这篇关于Cygwin shell不执行.bashrc的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-15 12:31