Whenever I start cygwin, I need to cd several levels down to the only directory that I care about when using cygwin.

How can I get cygwin to start in this particular directory by default...i.e., each time I start Cygwin it will be in that directory already?

I found some things that may be it, or close, but I don't understand them, and there's really no results when I search for these (n00b) terms. Any help would be great!

link|improve this question

25% accept rate
feedback

3 Answers

Just add

cd /path/to/directory/you/care/about

to the bottom of your ~/.bashrc file.

link|improve this answer
feedback

in the last line of your .bash_profile (or .profile), put cd your/dirctory/here

link|improve this answer
feedback

Define "start cygwin"? You can run cygwin servers when you power your machine up, but I'm assuming that's not what you mean.

If you mean, end up in a specific folder every time you open a shell prompt, you can put that in your $HOME/.bashrc

Edit your $HOME/.bashrc using a cygwin editor (one that uses UNIX line endings), add a line

cd /whatever/directory/you/want

If you're constantly going to this directory, you're probably better off making an alias as well.

In your $HOME/.bashrc put:

alias GT='cd /whatever/directory/you/want'

Call it whatever you want; I just used GT for "go there", and I uppercase because it makes it easy to separate from builtin commands, which are never capitalized.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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