As I am developing Ruby on Rails on a Windows machine, I need to use cygwin to emulate the Unix command prompt. The problem now is that every time when I open the cygwin termina
mount -f "$USERPROFILE" ~
mount -m > /etc/fstab
Related
Safely change home directory
I was able to change mine by simply setting the HOME environment variable in Windows to C:\Users\MyUsername
. When I start Cygwin, now it looks there. This has the added benefit of causing Emacs on regular Win32 (i.e., not via Cygwin) to start in the right place instead of in C:\Users\MyUsername\AppData\Roaming
(and thus looking for .emacs and .emacs.d there)
According to Cygwin documentation you can edit /etc/nsswitch.conf
and change de db_home parameter.
Here is the content of my /etc/nsswitch.conf to create a home
directory into each user directory
# /etc/nsswitch.conf
#
# This file is read once by the first process in a Cygwin process tree.
# To pick up changes, restart all Cygwin processes. For a description
# see https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-mapping-nsswitch
# Defaults:
# passwd: files db
# group: files db
# db_enum: cache builtin
# db_home: /home/%U <------ This was the default setting
db_home: /%H/home # db_home: /home/%U <- This was the default setting
# db_shell: /bin/bash
# db_gecos: <empty>
Restart any Cygwin process