Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I always enter the computer in this directory:

/cygdrive/c/Program Files/ICW/var

How can I change that?

share|improve this question

1 Answer 1

What does echo ~ print after you have logged in?

I'm pretty sure that is your home directory, as defined in /etc/passwd inside your Cygwin environment.

So either:

  1. edit /etc/passwd and change the entry for your user to the directory you prefer (note that it might be overridden when you run mkpasswd)
  2. edit your shell configuration files to always do a cd automatically after logging in
    e.g. add cd <some other directory> to the bottom of your ~/.bashrc

One of those should do the trick.

If not, try this:

  • run env | find "var" and see which variables are printed
    perhaps %USERPROFILE% or %HOMEPATH% are set to that directory
    if so, Control Panel or net user /PROFILEPATH:<new dir> should help

or this:

  • run grep -R ICW /etc
    maybe something is hard-coded in /etc/profile or a similar startup script
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.