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

WSL2を自動起動する設定

Posted at

Windows 再起動後に WSL2 を自動起動させるための設定手順。

タスクスケジューラに登録して自動起動する。

WSL2 自動起動設定

タスクスケジューラの設定手順

  • タスクスケジューラを起動する
    • スタートメニュー -> Windowsツール -> コンピュータの管理 -> タスクスケジューラ
  • 「タスクの作成」を実行し、以下を設定する
    • 「名前」を入力(名前は任意)
      • WSL2 start on boot
    • 「全般」タブ
      • 「ユーザーがログオンしているかどうかにかかわらず実行する」を選択
      • 「パスワードを保存しない」をチェック
        スクリーンショット 2025-09-13 150745.png
    • 「トリガー」タブ
      • 「新規」
      • 「タスクの開始」->「スタートアップ時」
        スクリーンショット 2025-09-13 151430.png
    • 「操作」タブ
      • 「新規」
      • 「操作」->「プログラムの開始」
      • 「プログラム/スクリプト」: C:\Windows\System32\wsl.exe
      • 「引数の追加」: -u root sleep infinity
        スクリーンショット 2025-09-13 151454.png
        スクリーンショット 2025-09-13 151502.png
    • OKで追加
  • Windows を再起動する

参考情報

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