Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting default path with Cygwin

I've got a Cygwin installation, and I'd like it to start Bash in a certain directory whenever I start up. How can I achieve this?

like image 514
Puppy Avatar asked Dec 15 '11 18:12

Puppy


2 Answers

In your ~/.bashrc, You can either change your $HOME to that directory, or you can [tried and it didn't work] add a cd to that directory at the end of the file.

like image 159
Kevin Avatar answered Nov 27 '22 01:11

Kevin


In your ~/.bash_profile you may simply write cd /cygdrive/c/path/to/where/you/want/cygwin/to/start. You will find this file in your cygwin installation folder, under <path_to_cygwin>\home\<user>\.bash_profile. (In my case: C:\cygwin64\home\User\.bash_profile).

like image 28
Marc-Antoine Dubé Avatar answered Nov 27 '22 00:11

Marc-Antoine Dubé