I’m running Windows 11 Pro Version 23H2 (OS Build 22631.4169). My goal is to have local offline AI running on Ubuntu 24.04. Here’s how I’ve started:
The first order of business is in Control Panel > Turn Windows features on or off, you need to have Virtual Machine Platform and Windows Subsystem for Linux turned on. Then you need to open an elevated Powershell terminal. If you want to install Linux on a drive other than C:, use
set-location X: (where X is your preferred drive). Then type
wsl –install
—Update WSL from https://learn.microsoft.com/en-us/windows/wsl/install-manual#step-4—download-the-linux-kernel-update-package. In your browser, download the .msi package and install it in Windows. Then, back in Powershell
—Set the WSL default to Version 2
wsl –set-default-version 2
—Still in Powershell, download Linux app package.
curl.exe -L -o Linux.appx https://wslstorestorage.blob.core.windows.net/wslblob/Ubuntu2404-240425.AppxBundle
—Install the package. Still in Powershell
Add-AppxPackage .\Linux.appx
—In Windows, double-click the .appx file to install Linux. A Linux terminal will come on screen. You will be asked for a username, and a password (twice on a new installation). Note that when typing in a password, the curser does not move or indicate any input with *.
—From this point on, you’re in Linux, not Powershell (the Powershell console is still open, unless you close it). Update Linux after the installation.
sudo apt update (you’ll be asked for your password)
sudo apt full-upgrade -y
—Once installed, the Linux App (I installed Ubuntu) can be moved from the C: drive. First, exit the Linux terminal, then in an elevated Powershell, shutdown WSL
wsl –shutdown
—With WSL shutdown, moving Linux will also move the vhdx virtual file, so it won’t be slowly growing on your C: drive and eating up your drive free space.
—Go to Settings > Apps > Installed Apps and scroll down to the Linux App. On the right side is the options icon (three stacked dots). Click that, and one of the options is Move. Select Move, and a dropdown will show the available drives. The move may fail the first time; if so, just try it again in a minute or two.
—Moving Linux also makes it much easier to cleanup mistakes by making drive images of the installation partition at each successful step in installing additional software. If something goes awry, just restore the known-good image (which I’ve already done a number of times).
—Your installation of Linux will appear in the Apps menu. That’s where you can launch it. To install Docker in Linux (Ubuntu) run this script in the Linux terminal:
# Add Docker’s official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
# Add the repository to Apt sources:
echo \
“deb [arch=$(dpkg –print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo “$VERSION_CODENAME”) stable” | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
—Next,
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
—Under WSL, the iptables in Linux need to be changed to “legacy”.
sudo update-alternatives –config iptables
—Select “1” and then Enter. That will get Docker to run. I have a partition image of my Ubuntu installation at this point of success.
- This topic was modified 7 months, 2 weeks ago by .
- This topic was modified 7 months, 2 weeks ago by .
- This topic was modified 7 months, 2 weeks ago by .
- This topic was modified 7 months, 2 weeks ago by .
- This topic was modified 7 months, 2 weeks ago by .
- This topic was modified 7 months, 2 weeks ago by .