In response to what Mike Easter <Mi...@ster.invalid> wrote :
Hi Mike,
Ooooooh. Nice! <
https://wiki.ubuntu.com/WSL>
"The recommended way to install Ubuntu on WSL
is through the Microsoft Store... [but for those who don't
want to further erode their privacy to M$]... Ubuntu WSL
distribution rootfs daily builds are available for download"
<
https://cloud-images.ubuntu.com/focal/current/>
THANK YOU for pointing to a _potential_ answer to the question of how to
install Ubuntu 20.04 as a WSL _without_ having to log into M$.
I haven't looked in a while, but when I last looked, NOBODY wrote how to do
this with PRIVACY, which, as you're well aware over the past few decades,
is ALWAYS my goal.
Unfortunately, this web page is about as confusing as it can get:
<
https://cloud-images.ubuntu.com/focal/current/>
Which file is the download for the Ubuntu 20.04 WSL release, for example?
>
https://wiki.ubuntu.com/WSL
Thanks for that link which will be useful for writing up how to install
Windows Subsystem for Linux on Windows 10 _without_ needing to log into
M$ (logging into M$ is just the wrong way to do anything, IMHO). :)
It's not as easy as just reading what's on that web page though...
o At least not yet... so I'm testing out the new commands for now...
I just tested that "wsl" command, which is a nice test of _not_ having it!
C:\> wsl
Windows Subsystem for Linux has no installed distributions.
Distributions can be installed by visiting the Microsoft Store:
https://aka.ms/wslstore
See also:
o <
https://docs.microsoft.com/en-us/windows/wsl/reference>
They seem to have two methods of installing Ubuntu 20.04 as a WSL:
1. C:\> wsl --import Focal C:\app\os\wsl\focal <FileName>
(Where I can't yet figure out the "filename" for the Focal release.)
<
https://cloud-images.ubuntu.com/focal/current/> (but what file?)
2. Installing Ubuntu on WSL by sideloading the .appx
(Where, unfortunately, the 20.04 release doesn't appear to exist)
C:\> Add-AppxPackage .\CanonicalGroupLimited.Ubuntu18.04onWindows_1804.2018.817.0_x64__79rhkp1fndgsc.Appx
<
https://wsldownload.azureedge.net/CanonicalGroupLimited.Ubuntu18.04onWindows_1804.2018.817.0_x64__79rhkp1fndgsc.Appx>
> You could also 'sign in' to the MS one w/ just giving a throwaway email,
> not a phone or skype.
Sigh. I must have (oh, I'd better not estimate as the psychopaths like
Dan Purgert & Cybe(r) Wizard will pin me down to a number), _lots_ of
throwaway email addresses - with and without accompanying VPN - but I'd
really just want to find a good download so that I don't have to log into
M$ just to get Linux. :)
Anyway, here's a quick summary:
a. I downloaded the dual-boot Ubuntu 20.04 but you told me afterward
that this non-WSL Ubuntu ISO won't work for Windows 10 WSL:
<
https://mirrors.lug.mtu.edu/ubuntu-releases/20.04/ubuntu-20.04-desktop-amd64.iso>
Name: ubuntu-20.04-desktop-amd64.iso
Size: 2715254784 bytes (2589 MiB)
SHA256: E5B72E9CFE20988991C9CD87BDE43C0B691E3B67B01F76D23F8150615883CE11
b. I _wanted_ to get the WSL 20.04 using "wsl", but the page they reference
to obtain the ISO is so chock full of "stuff", I can't even _find_ it.
<
https://cloud-images.ubuntu.com/focal/current/>
c. So I ended up getting the _older_ WSL Ubuntu because I could _find_ it!
<
https://wsldownload.azureedge.net/CanonicalGroupLimited.Ubuntu18.04onWindows_1804.2018.817.0_x64__79rhkp1fndgsc.Appx>
Name: CanonicalGroupLimited.Ubuntu18.04onWindows_1804.2018.817.0_x64__79rhkp1fndgsc.Appx
Size: 224629284 bytes (214 MiB)
SHA256: 96E4E3E336F08DDE1DF81FA9C266C5C7750BA92729857E92BDE36BF84A1DB002
With "sideloading" already enabled in Win10, I doubleclicked on the "appx"
file, but it just popped up a question "How do you want to open this file".
o "Look for another app on this PC..."
Hmmmmmmm.... what the heck app am I supposed to open it with?
o C:\Program Files\WindowsPowerShell\Modules (but which executable?)
Looking up how to install an "appx" file on Windows 10, there's this
mystery "graphical installer" which didn't show up for me:
<
https://www.howtogeek.com/285410/how-to-install-.appx-or-.appxbundle-software-on-windows-10/>
I'm a little leery of the PowerShell method as I _always_ put software
where it belongs, so I have to specify where I want it, which is
gonna be something logical, like:
o C:\app\os\wsl\focal, or,
o C:\app\os\wsl\ubuntu20.04, or,
o C:\app\os\wsl\20.04
etc.
Hell, let's try it:
1. Start > Run > powershell
2. PS> Start-Process powershell -verb runAs <== optionally run as admin
3. PS> Add-AppxPackage -Path "C:\software\iso\ubuntu\CanonicalGroupLimited.Ubuntu18.04onWindows_1804.2018.817.0_x64__79rhkp1fndgsc.Appx"
Crap. I was hoping (beyond hope) it would ask me _where_ I wanted it to go.
o Let's dig a bit to find out _where_ the heck M$ put it...
<
https://docs.microsoft.com/en-us/powershell/module/appx/add-appxpackage>
o OK. At least I can move it to where it belongs, which I'll do later.
<
https://docs.microsoft.com/en-us/powershell/module/appx/move-appxpackage>
Without even knowing _where_ M$ put it, I will try to test it out:
1. Start > Run > cmd{control+shift+enter}
2. C:\> wsl
Windows Subsystem for Linux has no installed distributions.
Distributions can be installed by visiting the Microsoft Store:
https://aka.ms/wslstore
3. C:\> ubuntu1804.exe
Installing, this may take a few minutes... \
Please create a default UNIX user account.
The username does not need to match your Windows username.
For more information visit:
https://aka.ms/wslusers
Enter new UNIX username: {enter any desired uname}
Enter new UNIX password: {enter any desired passwd}
Retype new UNIX password: {re-enter that same passwd}
passwd: password updated successfully
Installation successful!
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.
4. Run some "linux" commands at the "uname@pcname:~$" prompt:
$ whoami
uname
$ pwd
/home/uname
$ mkdir foo
$ touch foo/bar.txt
$ cd foo
$ ls
$ vim bar.txt
$ vipw
vipw: Permission denied.
vipw: Couldn't lock file: Permission denied
vipw: /etc/passwd is unchanged
$ sudo vipw
[sudo] password for x: {enter password for uname}
Select an editor. To change later, run 'select-editor'.
1. /bin/nano <---- easiest
2. /usr/bin/vim.basic
3. /usr/bin/vim.tiny
4. /bin/ed
2
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
bin:x:2:2:bin:/bin:/usr/sbin/nologin
etc.
$ firefox
Command 'firefox' not found, but can be installed with:
sudo apt install firefox
$ sudo apt-get install firefox
Need to get 58.6 MB of archives.
After this operation, 237 MB of additional disk space will be used.
Do you want to continue? [Y/n]
$ exit
5. Test it out to see if you can get it back! :)
Start > Run > cmd
C:\> wsl
Now the default prompt changes to:
uname@pcname:/mnt/c/Users/uname$
This proof of concept is getting long so I'll stop documenting here,
as I need to figure out where the heck it _put_ this stuff.
Do you know _where_ the heck it put the Ubuntu file system?
--
Usenet is a wondrously rich public helpdesk to politely discuss solutions.