stevo01 / doc.wsl

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tips and tricks for wsl

Windows Subsystem for Linux (Wsl) is a feature that allows you to run linux in a virtual machine. You can manage the machine from PowerShell with the command "wsl".

helpful commands in windows power shell

update wsl

wsl --update

list machines

wsl --list

shutdown machine

wsl --shutdown

show status

wsl --status

helpful commands / configs in ubuntu

update software packages

apt update
apt full-upgrade

enable systemd

Create a file /etc/wsl.conf and place following lines into that file.

[boot]
systemd=true

install smartgit

sudo apt install libgtk-3-0 git
mkdir ~/tools
cd tools
wget https://www.syntevo.com/downloads/smartgit/smartgit-linux-23_1_1.tar.gz
tar xzf smartgit-linux-23_1_1.tar.gz
rm smartgit-linux-23_1_1.tar.gz
~/tools/smartgit/bin/smartgit.sh

USB

Installation on windows

see Install Procedure for details

Install the USBIP tools and hardware database in Linux

sudo apt install linux-tools-generic hwdata
sudo update-alternatives --install /usr/local/bin/usbip usbip /usr/lib/linux-tools/*-generic/usbip 20

manage usb devices in windows powershell

attach usb devices

usbipd list
usbipd bind --busid 2-13
usbipd attach --busid 2-13 -w Ubuntu

detach usb devices

usbipd list
usbipd bind --busid 2-13
usbipd detach  --busid 2-13 -w Ubuntu
Note
you can check if usb device is available inside wsl2 machine by command "lsusb".

About