Cygwin home location

I've been using cygwin for longer than I care to mention. Never had a problem with it really as it suits me to use it for certain things that Windows truly sucks at.

However, there are a number of issues and I've tried trawling through the cygwin mailing lists which is a laborious task due to their poor web interface design.

I've reinstalled Cygwin as the 64bit version now, which aside from anything has meant that the x86 installed version is not longer needed. Deleting cygwin is reasonably easy except for the dev folder which contain nul which you can't delete. So how can I delete this?

Also as a result of the upgrade, the installation is using C:\Users\myaccountame\ for its home which means when I log in I get:

/cygdrive/c/Users/myaccountname

This is not what I want or what used to be there. In older versions it used to create a home folder in the cygwin folder structure and then make that the home. Now all the bash history is in my Windows folder and the bashrc is also there.

How can I get Cygwin to set the home folder back where it used to be?
LVL 25
Lee SavidgeAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

pklucasCommented:
for the directory issues try:

putting "cd (your directory path)" in the last line of your .bash_profile (or .profile)
0
Lee SavidgeAuthor Commented:
I don't want to change the directory in the bashrc, I want the home directory moved back to where cygwin used to have it inside c:\cygwin\home\myaccountname
0
pklucasCommented:
Try rerunning setup.exe with the -R argument (it specifies the root directory) it is supposed to update as well as install the program.
0
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

Lee SavidgeAuthor Commented:
Hi.

Thanks. The root directory is already c:\cygwin64 and that is where it installs to. That is fine. That is where I want it. Once installed cygwin USED to have a folder called home in its root directory and in there was the folder where bash ran from.

Now, instead of that, when I run cygwin it is using my folder in the Users folder in Windows as the home directory.

It seems to be picking $HOME up from the environment variables which points to %USERPROFILE% in Windows which is:

C:\Users\myaccountname\

I could change $HOME in Windows to point to C:\Cygwin64\home\myaccountname but Windows has this environment variable set. Cygwin also seems to be using %USERPROFILE% as it's home and I don't want this. I want it back as it used to be so that when I'm in cygwin and I type cd ~ I end up in my home directory which as far as Windows is concerned C:\cygwin64\home\myaccountname
0
Lee SavidgeAuthor Commented:
Removed the HOME envirnonment variable in Windows. Recreated the launch shortcut after deleting my custom one and things started working again.

Help came from the cygwin mailing list in the end.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Lee SavidgeAuthor Commented:
Went to the cygwin mailing list for help in the end. After a few attempts at different things, I got the answer.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Software

From novice to tech pro — start learning today.