Hi, You can't also access USB devices. Though some where able to use USB over IP. Greetings, Simon Am 17.10.2020 um 01:43 schrieb Jason White via Blind-sysadmins:
Thank you - there are useful details here that I didn't know.
I also discovered from experience (and later found out it's a documented limitation) that you can't access IPv6 addresses from a WSL 2 Linux instance.
-----Original Message----- From: Simon Eigeldinger <simon.eigeldinger@vol.at> Sent: Friday, October 16, 2020 5:35 PM To: Blind sysadmins list <blind-sysadmins@lists.hodgsonfamily.org> Subject: [Blind-sysadmins] Enabling and updating WSL2 and installing a distro on Windows 10 64 Bit
Enabling and updating WSL2 and installing a distro on Windows 10 64 Bit
This is a quick and dirty guide how to enable WSL2 and how to install a distro like Ubuntu. I don't use the Windows Store. This often has older Root FS images and you can't define where to install the disk image later. It just works on Windows 10 64 bit. I heard it also seems to work on ARM64 as well. But then you might need some other instructions. Works on Home, Pro and Enterprise.
Enabling and updating WSL1
First we will enable WSL1. This is the old version of WSL and is on by default. So we hit win+r to open the run dialog. then we enter optionalfeatures and hit enter. then we select the checkboxes platform for virtual computers and windows subsystem for linux. then we hit the ok button and the restart button to reboot the computer. Windows then sets up the needed components.
After we are in Windows again we download and install the wsl update. That updates the linux kernel for WSL and that it supports WSL2.
https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi
Enabling WSL2
After we installed above stuff we open a terminal as Administrator. cmd or windows terminal can be used.
Then we type wsl --set-default-version 2 to activate WSL2 as default for all new virtual machines.
Useful options for the wsl command are for example also: wsl -t distro to terminate and shutdown distributions. wsl --shutdown to shut down the wsl vm server.
wsl --help gives much more help to more commands.
Downloading and installing Ubuntu 20.04 LTS
First let's get WSLDL. This is a 3rd party distro launcher and installer.
Latest releases can be found here: https://github.com/yuk7/wsldl/releases/ get the latest launcher.exe.
Then we also need a Root filesystem for Ubuntu. This can be found over here: https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64-ws...
Ubuntu 20.10 can be found here. there are already some daily builds available. though they seem to have not all packages available on apt: https://cloud-images.ubuntu.com/groovy/current/groovy-server-cloudimg-amd64-...
After that we are going to put all things together.
First create a directory on a drive where you have enough space. I created a wsl directory on my e drive because i have a lot of space there. On my computer in the office i created that directory on the c drive. then you create a ubuntu directory in the wsl directory. then you copy the launcher.exe into the ubuntu directory and rename it to ubuntu.exe. So your distro name in wsl will be called ubuntu. you can also rename it to ubuntu-20.04.exe. so your distro name will be ubuntu-20.04. Then rename the .tar.gz file you have downloaded to rootfs.tar.gz and copy it as well into the ubuntu directory. Then execute the exe file as admin. a terminal opens and it says installing... then it displays that you need to hit a key and it installed successfully.
you then have a ext4.vhdx file in the directory. This is your disk image. you can delete the rootfs.tar.gz if you want. Though i often keep then so if i want to kill the os i can reinstall it.
Starting Ubuntu
I often create a desktop icon to the exe and enable start as admin in the compatibility tab of the properties. When hitting enter ubuntu starts. Use your standard terminal navigation keys.
Note that you have no window menu with alt+space. Maybe ms will enable that again. Would be much nicer to select the whole terminal buffer.
Though you can paste things when enabling ctrl+shift keys in the standard settings of the terminal. using cmd you can do it the following way. open a terminal using cmd. then hit alt+space and select standard values. select the use ctrl+shift+c and ctrl+shift+v for copying and pasting checkbox. then you should be able to paste content with ctrl+shift+v.
Accessing files in the Ubuntu disk image
You can enter \\wsl$\ubuntu\ in explorer to access all the files of the virtual hard disk.
Uninstalling Ubuntu
Open up a terminal and enter the ubuntu directory. run ubuntu clean to clean the distro using WSLDL.
Backing up Ubuntu
To create a backup and to also share your distro with some people you can create a backup. That will be a .tar.gz which someone also can import. Like we did above.
Open up a terminal and go into the ubuntu directory. Then execute wsl -t ubuntu to terminate ubuntu Then type ubuntu backup --tgz then a backup.tar.gz will be created which you can share or backup.
I hope i haven't forgotten anything. _______________________________________________ Blind-sysadmins mailing list -- blind-sysadmins@lists.hodgsonfamily.org To unsubscribe send an email to blind-sysadmins-leave@lists.hodgsonfamily.org _______________________________________________ Blind-sysadmins mailing list -- blind-sysadmins@lists.hodgsonfamily.org To unsubscribe send an email to blind-sysadmins-leave@lists.hodgsonfamily.org