Learning and Sharing
  • Home
  • Blog
  • Linux
  • macOS
  • Virtualization
    • VMware
    • VirtualBox
  • Windows
    • Windows 11
    • Windows 10
    • Windows Server
  • Series
    • Symantec
    • Intune
    • Microsoft Azure
    • Powershell
    • VirtualBox
    • VMware
    • PowerShell Learning
    • Microsoft Graph
  • More
    • Auto Installation
    • AEC Installation
  • Contact
No Result
View All Result
  • Home
  • Blog
  • Linux
  • macOS
  • Virtualization
    • VMware
    • VirtualBox
  • Windows
    • Windows 11
    • Windows 10
    • Windows Server
  • Series
    • Symantec
    • Intune
    • Microsoft Azure
    • Powershell
    • VirtualBox
    • VMware
    • PowerShell Learning
    • Microsoft Graph
  • More
    • Auto Installation
    • AEC Installation
  • Contact
No Result
View All Result
No Result
View All Result

How to Install Ubuntu 23.10 on WSL

July 21, 2024
in A, Blog, WSL
0
ADVERTISEMENT

Table of Contents

Windows Subsystem for Linux

The Windows Subsystem for Linux (WSL) lets developers run a GNU/Linux environment — including most command-line tools, utilities, and applications — directly on Windows, unmodified, without the overhead of a traditional virtual machine or dual boot setup. Below is the list of Linux distributions that supported by WSL for auto installation.

PS C:\> wsl -l -o
The following is a list of valid distributions that can be installed.
Install using 'wsl.exe --install <Distro>'.

NAME                                   FRIENDLY NAME
Ubuntu                                 Ubuntu
Debian                                 Debian GNU/Linux
kali-linux                             Kali Linux Rolling
Ubuntu-18.04                           Ubuntu 18.04 LTS
Ubuntu-20.04                           Ubuntu 20.04 LTS
Ubuntu-22.04                           Ubuntu 22.04 LTS
OracleLinux_7_9                        Oracle Linux 7.9
OracleLinux_8_7                        Oracle Linux 8.7
OracleLinux_9_1                        Oracle Linux 9.1
openSUSE-Leap-15.5                     openSUSE Leap 15.5
SUSE-Linux-Enterprise-Server-15-SP4    SUSE Linux Enterprise Server 15 SP4
SUSE-Linux-Enterprise-15-SP5           SUSE Linux Enterprise 15 SP5
openSUSE-Tumbleweed                    openSUSE Tumbleweed

At this moment, WSL doesn’t support Ubuntu 23.10 officially. So, we need to install it manually. Below is a quick snapshot about the manual process.

  • Install an Ubuntu 22.10 instance on WSL.
  • Install Docker on the Ubuntu instance.
  • Pull the Ubuntu 23.10 image from Docker Hub.
  • Create a container from Ubuntu 23.10 image.
  • Export the container to a .tar file.
  • Import the exported .tar file to an instance on WSL.

Before you begin

To install Ubuntu 23.10 on WSL, make sure you have:

  • Enabled WSL on your Windows 10/11.

Install the Ubuntu Instance

By default, when enabling WSL on Windows 10/11. The Ubuntu 22.10 is being installed automatically. If it not, you can install it using the below command.

wsl --install ubuntu

To get this list of the installed instances on your system, run wsl -l -v.

PS C:\> wsl -l -v
  NAME      STATE           VERSION
* Ubuntu    Stopped         2
  Debian    Running         2

To start the Ubuntu instance, run wsl -d ubuntu. One the instance starts, you would navigate to the bash of the Ubuntu instance automatically.

PS C:\Users\admin> wsl -d ubuntu
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

Welcome to Ubuntu 22.04.2 LTS (GNU/Linux 5.15.90.4-microsoft-standard-WSL2 x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

This message is shown once a day. To disable it please create the
/home/bonben/.hushlogin file.
bonben@DESKTOP-K34B7Q9:/mnt/c/Users/admin$

Install Docker on Ubuntu instance

1. You can install Docker on the Ubuntu 22.04 instance following the Docker’s documentation from this link. Or you can simply run the below script to install it automatically.

Note Note: You must run the script in the Ubuntu shell instead of the PowerShell in Windows host.
sudo wget -qO - https://bonguides.com/docker | bash

When the installation finishes, you can see the docker service is running.

● docker.service - Docker Application Container Engine
     Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2023-09-21 13:47:33 +07; 319ms ago
TriggeredBy: ● docker.socket
       Docs: https://docs.docker.com
   Main PID: 1863 (dockerd)
      Tasks: 12
     Memory: 30.8M
     CGroup: /system.slice/docker.service
             └─1863 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock

2. Pull the Ubuntu 23.10 image from Docker Hub

sudo docker pull ubuntu:mantic
#Output
mantic: Pulling from library/ubuntu
d1cf823cf1f0: Pull complete
Digest: sha256:4c32aacd0f7d1d3a29e82bee76f892ba9bb6a63f17f9327ca0d97c3d39b9b0ee
Status: Downloaded newer image for ubuntu:mantic
docker.io/library/ubuntu:mantic

3. Get the list of your docker images.

sudo docker images
#Output
REPOSITORY   TAG              IMAGE ID       CREATED       SIZE
ubuntu       mantic           fe7a3960a97e   3 weeks ago   71.2MB

Create and export a docker container

Once you have the image of Ubuntu 23.10. In the next steps, you can create a docker container from it then export the container for WSL.

1. From the Linux shell, run the below command to create a container from the Ubuntu 23.10 image then go to the shell of the container.

sudo docker run -it --name ubuntu23 ubuntu:lunar

2. As you can see below, when the container is created, the prompt change from the Linux shell (on WSL) to the container shell (on docker). From here, you can check the version of the Ubuntu container.

bonben@DESKTOP-K34B7Q9:/mnt/c/Users/admin$ sudo docker run -it --name ubuntu23 ubuntu:mantic
root@4dbae163af51:/# cat /etc/os-release
PRETTY_NAME="Ubuntu 23.10"
NAME="Ubuntu"
VERSION_ID="23.10"
VERSION="23.10 (Mantic Minotaur)"
VERSION_CODENAME=mantic
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=mantic
LOGO=ubuntu-logo

3. Type exit then hit Enter to exit the shell of the container to go back to the shell of the Linux instance (on WSL). See below for details.

root@4dbae163af51:/# exit
exit
bonben@DESKTOP-K34B7Q9:/mnt/c/Users/admin$

4. Now, run docker ps -a on the Linux instance to get the list of the docker containers. You should see the container that created in the step 2.

sudo docker ps -a
#Output
CONTAINER ID   IMAGE          COMMAND       CREATED         STATUS                          PORTS     NAMES
4dbae163af51   ubuntu:mantic   "/bin/bash"   4 minutes ago   Exited (0) About a minute ago             ubuntu23

5. This is time for exporting the Ubuntu 23.10 container to a .tar file. Below command will export the container named ubuntu23 to /tmp/ubuntu23.tar.

sudo docker export ubuntu23 > /tmp/ubuntu23.tar

You can check the file has been exported by the ls command.

bonben@DESKTOP-K34B7Q9:/mnt/c/Users/admin$ ls -l /tmp/
total 71084
drwx------ 2 root   root       4096 Sep 21 13:35 snap-private-tmp
-rw-r--r-- 1 bonben bonben 72775168 Sep 21 14:17 ubuntu23.tar

6. From the Windows host, you can see the exported file using the Windows Explorer as below. Everything is ready, you can continue to the last section.

MnxNmyRQip8Fi4kAicRwX0c7cyHWdERaqqUBnYvoc4PsuJesEOA8RmI4mgxh

Import .tar file as a WSL instance

We’re nearly done, in the next steps we need to:

1. Create some new folders for the WSL instance. You can create the folders manually using File Explorer or you can open a new PowerShell window then run the below command.

New-Item D:\WSL, D:\WSL\temp, D:\WSL\ubuntu23 -Type Directory

2. In the Windows host, copy the exported file (Linux\Ubuntu\temp\ubuntu23.tar) from the Ubuntu instance to the folder D:\WSL\temp.

shVdR2CGZHXrHQJDT4Ld1pQfqgtc7G2vUQiUJ8vAA6t4JhdpFAe2cLspMfrg

3. From Windows PowerShell (not the Linux shell), run the following command to import the .tar file as a WSL instance.

wsl --import ubuntu23 'D:\WSL\ubuntu23' 'D:\WSL\temp\ubuntu23.tar'
uw4m948ZQ3NIbYdcqZrlJNKIyOY3ozItFqQDsICqf1bE6mDDOctcNPq04pTj

4. Run wsl -l -v in PowerShell to verify the instance has been created.

PS C:\> wsl -l -v
  NAME        STATE           VERSION
* Debian      Stopped         2
  ubuntu23    Stopped         2
  Ubuntu      Running         2

5. Run the Ubuntu 23.10 instance with wsl -d ubuntu23 command.

PS C:\> wsl -d ubuntu23

root@DESKTOP-K34B7Q9:/mnt/c# cat /etc/os-release

PRETTY_NAME="Ubuntu 23.10"
NAME="Ubuntu"
VERSION_ID="23.10"
VERSION="23.10 (Mantic Minotaur)"
VERSION_CODENAME=mantic
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=mantic
LOGO=ubuntu-logo

The virtual disk of the instance should be created in D:\WSL\ubuntu23.

ny6apHI787eJW7GLtsbZmaSzMnSIZzODHclbIjPSaRhSsJMwEBrdSjtFWcJk

Conclusion

This post shows the way to create an unsupported Linux distribution on WSL using docker. Using this method, you can create any Linux distributions on WSL if they’re supported by Docker.

ADVERTISEMENT

Not a reader? Watch this related video tutorial:

5/5 - (2 votes)
Previous Post

How to Install Ubuntu 23.04 on WSL

Next Post

How to Add Drivers into USB Boot Device to Install Windows

Related Posts

Images Hidden Due To Mature Content Settings In CivitAI

August 31, 2024

Azure OpenAI vs Azure AI Hub, How to Choose the Right One for Your Needs

August 20, 2024

Running Hyper-V and VMware Workstation on The Same Machine

August 15, 2024

How to Uninstall All Autodesk Products At Once Silently

July 29, 2024
Ftr5

How to Uninstall the Autodesk Genuine Service on Windows

July 29, 2024

How to Remove The Test Mode Watermark Without Disabling Test Mode

July 28, 2024

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • How To Turn On uBlock Origin Extension in Chrome (2025)
  • Images Hidden Due To Mature Content Settings In CivitAI
  • Azure OpenAI vs Azure AI Hub, How to Choose the Right One for Your Needs

Categories

Stay in Touch

Discord Server

Join the Discord server with the site members for all questions and discussions.

Telegram Community

Jump in Telegram server. Ask questions and discuss everything with the site members.

Youtube Channel

Watch more videos, learning and sharing with Leo ❤❤❤. Sharing to be better.

Newsletter

Join the movement and receive our weekly Tech related newsletter. It’s Free.

General

Microsoft Windows

Microsoft Office

VMware

VirtualBox

Technology

PowerShell

Microsoft 365

Microsoft Teams

Email Servers

Copyright 2025 © All rights Reserved. Design by Leo with ❤

No Result
View All Result
  • Home
  • Linux
  • Intune
  • macOS
  • VMware
  • VirtualBox
  • Powershell
  • Windows 10
  • Windows 11
  • Microsoft 365
  • Microsoft Azure
  • Microsoft Office
  • Active Directory

No Result
View All Result
  • Home
  • Linux
  • Intune
  • macOS
  • VMware
  • VirtualBox
  • Powershell
  • Windows 10
  • Windows 11
  • Microsoft 365
  • Microsoft Azure
  • Microsoft Office
  • Active Directory