LoginSignup
4
1

More than 3 years have passed since last update.

[Windows Terminal] WSL端末起動時の初期ディレクトリをホーム(~)にする

Last updated at Posted at 2020-07-17

前提

  • Windows 10 バージョン 1903 以降

結論

設定(settings.json)の対象WSLディストリビューションのプロファイルで、開始ディレクトリ(プロパティ名:startingDirectory)にホームパスを指定する。

例えば、"Ubuntu-18.04" のディストリビューションなら次のようになる。

{
    "name": "Ubuntu-18.04",
    "commandline" : "wsl -d Ubuntu-18.04",
    "startingDirectory" : "//wsl$/Ubuntu-18.04/home/<Your Ubuntu Username>",
}

というか、公式のトラブルシュート資料にそのまんま答え(下記参考)がある。

参考

4
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
4
1