WSL
WSL安装¶
安装编译器¶
arm-none-eabi-gcc¶
sudo apt-get update
sudo apt-get install gcc-arm-none-eabi
arm-none-eabi-gcc -v
mips-linux-gnu-gcc¶
sudo apt-get update
sudo apt-get install gcc-mips-linux-gnu
mips-linux-gnu-gcc -v
WSL2连接USB设备¶
安装usbipd¶
打开管理员终端,使用如下命令安装usbipd,安装完成后重启计算机。
powershell
winget install --interactive --exact dorssel.usbipd-win
WSL安装¶
linux shell
sudo apt update
sudo apt-get install usbutils hwdata linux-tools-generic
sudo update-alternatives --install /usr/local/bin/usbip usbip /usr/lib/linux-tools/*-generic/usbip 20
powershell
wsl --shutdown
wsl
window共享给WSL¶
powershell
usbipd list
usbipd bind -b <busid>
usbipd attach -b --wsl -b <busid>
linux shell
lsusb
powershell
usbipd detach --busid <busid>
usbipd unbind -b <busid>
shell自动输入密码方式¶
使用echo“密码”(管道符)
echo "11111111" | sudo apt-get update
重定向
sudo apt-get update <<EOF
11111111
EOF
重置wsl密码¶
-
管理员打开power shell
-
~~~ wsl.exe --user root passwd username ~~~