Safely change home directory

前端 未结 12 2326
南旧
南旧 2020-12-12 10:22

I\'m trying to safely update the home directory as specified in /etc/passwd, but the standard Linux utils - usermod and vipw - for doing so aren\'t provided by

12条回答
  •  温柔的废话
    2020-12-12 11:18

    I only needed to be in C:\Users\username when I start cygwin. So, I just added to .bashrc and .profile

    cd ${HOMEPATH}
    

    If you prefer to use ~/. instead of $HOMEPATH, you can also add the following:

    export HOME=${HOMEPATH}
    

    This way I don't disturb the cygwin installation.

提交回复
热议问题