LoginSignup
0
1

More than 1 year has passed since last update.

WSL環境構築メモ

Last updated at Posted at 2021-11-10

はじめに

Ubuntuをぶっ壊したのでUSBデバイスのセットアップまでやってしまおうかなと思ってやってみます。

注意: 下記コマンドは危険

C:\Users\user>wsl --unregister Ubuntu-20.04
登録を解除しています...

環境

  • Windows10
  • WSL
C:\Users\user>wsl --status
既定のバージョン: 2

Linux 用 Windows サブシステムの最終更新日: 2021/11/05
WSL の自動更新が有効になっています。

カーネル バージョン: 5.10.60.1

WSLのインストール

管理者権限でターミナル(cmdなど)を起動して、

wsl --install

または

wsl --install -d "Ubuntu-20.04"

dotfiles

dotfilesを実行!
以下その内容の一部。

aptのサーバー変更など

sudo perl -p -i.bak -e 's%https?://(?!security)[^ \t]+%http://ftp.jaist.ac.jp/pub/Linux/ubuntu/%g' /etc/apt/sources.list
sudo apt update
sudo apt upgrade

GUI環境を設定

参考: WSL上にXサーバをインストールしてGUIを実現する(VcXsrv編)

vim ~/.profile

上記で開いて、export DISPLAY=:0.0 を追記する

sudo apt install x11-apps
source ~/.bashrc
xeyes
グラフ表示
sudo apt install python3-tk
sudo apt install tk-dev

https://matplotlib.org/2.0.2/faq/usage_faq.html#what-is-a-backend
https://ai-gaminglife.hatenablog.com/entry/2019/04/29/204841
https://www.itmedia.co.jp/help/tips/linux/l0450.html

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