如何使babun/cygwin主目录等于Windows主目录? [英] How to make babun/cygwin home directory equal windows home directory?

查看:172
本文介绍了如何使babun/cygwin主目录等于Windows主目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚安装了Cybwin的变种babun.我希望cygwin用户主目录等于我的Windows主目录. 因此,很明显,我不想将cygwin主目录添加为C:\Users作为新用户,我希望它与我当前的Windows主目录相同.

I just installed babun, a variant of Cygwin. I want the cygwin user home directory to equal my windows home directory. So, to be clear, I don't want to add the cygwin home to the C:\Users as a new user, I want it to be the same as my current windows home directory.

现在,根据这篇文章,如何安装后要更改Cygwin主文件夹吗?,有一种巧妙的方法可以使cygwin主目录指向Windows主目录. 您打开文件/etc/nsswitch.conf,并确保其具有db_home: windows行.但是,重新启动计算机后,echo $HOME仍然显示/home/chiel.tenbrinke,这不是应该的.它应该说类似/cygdrive/c/Users/Chiel.tenBrinke.

Now, according to this post, How can I change my Cygwin home folder after installation?, there is a neat way to make the cygwin home directory point to your windows home directory. You open the file /etc/nsswitch.conf and make sure is has a line db_home: windows. However, after restarting my pc, echo $HOME still says /home/chiel.tenbrinke, which is not what is should be. It should say something like /cygdrive/c/Users/Chiel.tenBrinke.

为什么这不起作用?

我的cygwin版本是CYGWIN_NT-6.1-WOW IM-Chiel-2015 1.7.35(0.287/5/3) 2015-03-04 12:07 i686 Cygwin.

My cygwin version is CYGWIN_NT-6.1-WOW IM-Chiel-2015 1.7.35(0.287/5/3) 2015-03-04 12:07 i686 Cygwin.

推荐答案

Babun有一个非常好的常见问题解答. FAQ中的最后一个条目是如何将Windows主目录用作Babun的主目录?

Babun has a surprisingly good FAQ. The last entry in the FAQ is How to Use the Windows home directory as Babun's home directory?

对我来说,归结为:

  1. 通过Win + R sysdm.cpl为$ HOME =/Users/my_account_name创建一个环境变量.
  2. 运行mkpasswd -l -p "$(cygpath -H)" > /etc/passwd
  3. 运行babun install
  1. Create an env var for $HOME = /Users/my_account_name via Win+R sysdm.cpl
  2. Run mkpasswd -l -p "$(cygpath -H)" > /etc/passwd
  3. Run babun install

我不确定为什么Babun不能识别/etc/nsswitch.conf中的标准cygwin设置,我有点惊讶,在Cygwin FAQ中没有提到此设置.我有点担心,尽管Babun的收藏非常丰富,但如果维护不当,它可能会很快与Cygwin失去同步.

I'm not sure why Babun doesn't recognize the standard cygwin setting in /etc/nsswitch.conf, and I'm a bit surprised there was no mention of this setting in the Cygwin FAQ. I'm a bit concerned that in spite of what a great collection Babun is, it may fall out of sync with Cygwin quickly if not properly maintained.

这篇关于如何使babun/cygwin主目录等于Windows主目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆