LoginSignup
0
0

More than 1 year has passed since last update.

WSL Ubuntu22.04LTSインストール

Last updated at Posted at 2022-10-13

1. WSL2のインストール

Powershellを管理者権限で起動し以下を実行

# Windows Subsystem for Linux を有効にする
C:\Windows\system32> dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart

# 仮想マシン プラットフォーム"のオプション コンポーネントを有効にする
C:\Windows\system32> dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all

# WSL2を既定のバージョンとして設定する
C:\Windows\system32> wsl --set-default-version 2

Ubuntu 22.04 LTS(WSL2)のインストール

上記実行後、マイクロソフトストアよりUbuntu 20.04 LTSをインストールする

WSL2を起動

$ cat /etc/os-release 
NAME="Ubuntu"
VERSION="20.04.2 LTS (Focal Fossa)"

2. 環境設定

$ sudo apt update			# パッケージを管理しているDBを最新の状態に更新
$ sudo apt dist-upgrade			# インストールされているパッケージを全更新。追加でパッケージが必要になった場合もインストールしてくれる

# LANG設定
$ sudo apt -y install language-pack-ja	# 日本語言語パックのインストール
$ sudo update-locale LANG=ja_JP.UTF8	# ロケールを日本語に設定
$ exit

# 再ログイン
$ date
2020年  4月  1日 水曜日 15:43:23 JST # 日本語表示を確認

3. ビープ音を消す

~/.inputrcに追記

set bell-style none

~/.vimrcに追記

set belloff=all
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