WSL Windows Subsystem for Linux

From Torben's Wiki
Jump to navigationJump to search

Install

see https://docs.microsoft.com/en-us/windows/wsl/install-win10

in case access to MS Store is not working, the Linux images can be found at https://docs.microsoft.com/en-us/windows/wsl/install-manual


linux drive image location:

%LOCALAPPDATA%\Packages\CanonicalGroupLimited.UbuntuonWindows_{__CODE__}\LocalState

suggested packages

sudo apt update
sudo apt dist-upgrade
sudo apt install rsnapshot
sudo apt install python3-pip

Tipps

open current folder in windows explorer

explorer.exe .

Backup /home/ to Windows drive

I suggest using rsnapshop (check that page for install and general info). Additionally you need to set in /etc/rsnapshot.conf:

snapshot_root   /mnt/c/<your backup folder>
link_dest       1
exclude         .vscode-server
rsync_long_args --no-links

Full Snapshot

in PowerShell

wsl -l
wsl --export Ubuntu-20.04 ubuntu_backup.tar.gz