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?

WSLでAlmaLinux-8をCドライブ以外にインストールする方法

Posted at

WSLをDドライブにインストールする方法(毎回忘れるワテクシ向け)

🚨 問題

WSLのデフォルトインストール先(Cドライブ)の容量が100FULLに。。。

✅ 動作確認済みの方法

🔧 コマンドプロンプト版(管理者権限)

wsl --install AlmaLinux-8 --location D:\WSL\AlmaLinux-8

🔧 PowerShell版(管理者権限)

# フォルダ作成してからインストール(任意)
New-Item -Path "D:\WSL\AlmaLinux-8" -ItemType Directory -Force

# インストール実行
wsl --install AlmaLinux-8 --location D:\WSL\AlmaLinux-8

💡 既にインストール済みだが、同じものをインストールしたい場合

# エラー: ERROR_ALREADY_EXISTS が出た場合
wsl --unregister AlmaLinux-8  # 既存を削除(データも消えるので注意!)
wsl --install AlmaLinux-8 --location D:\WSL\AlmaLinux-8

📌 確認コマンド

# インストール済みディストリビューション確認
wsl --list --verbose

# 実際の保存場所確認
Get-ChildItem D:\WSL\AlmaLinux-8

✅ ポイント

管理者権限が必須(通常権限では--locationオプションが効かない)
PowerShell/コマンドプロンプトどちらでもOK
Dドライブに十分な空き容量を確保(最低10GB推奨)

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?