0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

WSL の起動ディレクトリを Windows の ホームディレクトリにする

0
Last updated at Posted at 2018-06-19

wsl.exe の引数でカレントディレクトリが変えられるか調べてみたけどわからなかったので、起動後に強制的に変更。

既定では、.bash_profile がなかったので作って、そこで cd してみた。
ただ、.bash_profile があると、.profile が読まれないので、冒頭で source している。

~/.bash_profile
source ~/.profile
cd /mnt/c/Users/${USER}

ぶっちゃけ、.bashrc, .bash_profile, .profile の使い分けがわかっていないので、コメント求む。

むしろ、引数オプションで出来たらうれしいので、そっちの方が知りたい。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?