2
0

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.

WindowsTerminalでWSL上に構築されたArchLinuxを使う方法

Posted at

前提

Windows10 1903
ArchWSLをインストール済み(ここからインストールできます)
Windows Terminalをインストール済み(Version: 0.4.2382.0)
こんな記事見てる人はかなり詳しいと思うので細かい説明は省きます。

方法

 1: レジストリでArchWSLのGUIDを調べる

レジストリエディターを起動し、

HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss\

まで移動してください。
配下にいくつかのキーがあります。これがWSLの設定なので、DistributionNameの値でも見ながらArchWSLのキーを探してキーの名前をコピーしてください。

2: 設定ファイルに追記する

WindowsTerminalから設定ファイルを起動して、jsonのprofilesの最後に

        {
            "acrylicOpacity" : 0.5,
            "closeOnExit" : true,
            "colorScheme" : "Campbell",
            "commandline" : "wsl.exe -d Arch",
            "cursorColor" : "#FFFFFF",
            "cursorShape" : "bar",
            "fontFace" : "Consolas",
            "fontSize" : 10,
            "guid" : "ここにGUID",
            "historySize" : 9001,
            "icon" : "C:/Program Files/WindowsApps/yuk7.archwsl_19.7.2.0_x64__35zwpb4sx6e50/images/Square44x44Logo.scale-200.png",
            "name" : "ArchLinux",
            "padding" : "0, 0, 0, 0",
            "snapOnInput" : true,
            "useAcrylic" : false
        }

と追記してください。直前の}のあとに,を必ず入れてください。

あとは再起動すれば新しいタブリストにArchLinuxができるはずです。

3:デフォルトにする

PowerShellよりArchLinuxのbashが良いんだ!という方のためにデフォルトにする方法です。
設定ファイルの上の方にglobalsがあると思うので、defaultProfilesの値をArchWSLのGUIDに変更してください。

2
0
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
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?