Setting default path with Cygwin
14,811
Solution 1
In your ~/.bashrc
, You can either change your [tried and it didn't work] add a $HOME
to that directory, or you cancd
to that directory at the end of the file.
Solution 2
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
).
Author by
Puppy
Updated on June 19, 2022Comments
-
Puppy almost 2 years
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?
-
Puppy over 12 yearsWhere and what the hell is a
~/.bashrc
? Edit: The whole file appears to be a gigantic comment. -
Kevin over 12 years
~
is a shortcut for your home directory, which is where you log in. It's usually/home/username
whereusername
is your actual username..bashrc
is a file that bash reads when you log in to set up the environment the way you want it.