Bye Bye Moore

PoCソルジャーな零細事業主が作業メモを残すブログ

Cygwinのホームディレクトリを変更

WindowsでUnixごっこが出来る素敵ツールCygwinですが、デフォルトのホームディレクトリはMydocumewnt等々から離れており非常に面倒です。
インストール終了し終わり次第、さっさと変更してしまいましょう。

まずはCygwinが立ち上がっていないことを確認します。
次に環境変数に、以下の記述を追加します。

変数名 HOME
内容  /cygdrive/c/Users/UserName

として、保存します。

無事変更されていれば、Cygwin起動時に以下のメッセージが表示されます

Copying skeleton files.
These files are for the users to personalise their cygwin experience.

They will never be overwritten nor automatically updated.

`./.bashrc' -> `/cygdrive/c/Users/UserName///.bashrc'
`./.bash_profile' -> `/cygdrive/c/Users/UserName///.bash_profile'
`./.inputrc' -> `/cygdrive/c/Users/UserName///.inputrc'
`./.profile' -> `/cygdrive/c/Users/UserName///.profile'

UserName /cygdrive/c/Users/UserName
$

これで目出度くホームディレクトリが変更されます。