I think it is a neat way.
Scripts could be different based on your environment 😮
# My PC Environment
Processor:                  AMD Ryzen 5 5600H with Radeon Graphics
Powershell Version: 7.2.5| chown -R 1005:1005 /mnt/pve/dat/Download/ | |
| # uid map: from uid 0 map 1005 uids (in the ct) to the range starting 100000 (on the host), so 0..1004 (ct) → 100000..101004 (host) | |
| lxc.idmap = u 0 100000 1005 | |
| lxc.idmap = g 0 100000 1005 | |
| # we map 1 uid starting from uid 1005 onto 1005, so 1005 → 1005 | |
| lxc.idmap = u 1005 1005 1 | |
| lxc.idmap = g 1005 1005 1 | |
| # we map the rest of 65535 from 1006 upto 101006, so 1006..65535 → 101006..165535 | |
| lxc.idmap = u 1006 101006 64530 | |
| lxc.idmap = g 1006 101006 64530 | 
| # ref: https://askubuntu.com/questions/1414483/landscape-sysinfo-cache-permission-denied-when-i-start-ubuntu-22-04-in-wsl | |
| sudo apt remove landscape-common | |
| sudo apt autoremove # Optionally, but recommended | |
| rm ~/.motd_shown | 
| # restore_packages.R | |
| # | |
| # installs each package from the stored list of packages | |
| # source: http://hlplab.wordpress.com/2012/06/01/transferring-installed-packages-between-different-installations-of-r/ | |
| load("~/installed_packages.rda") | |
| for (count in 1:length(installedpackages)) { | |
| install.packages(installedpackages[count]) | |
| } |