Professional Documents
Culture Documents
Swupd Bundle-Add Clearlinux-On-Wsl2
Swupd Bundle-Add Clearlinux-On-Wsl2
Swupd Bundle-Add Clearlinux-On-Wsl2
org/t/tutorial-clearlinux-on-wsl2/1835/print
Description
Prerequisites
Configuration: Windows side
Configuration: Linux side
Conclusion
Description
Welcome to this first tutorial talking about Clear Linux on WSL2.
This tutorial will describe how to install Clear Linux on WSL2 from the (Windows) console and few
configuration tips that will make the Linux feeling even more authentic.
So if you want to test it out just for curiosity, or because you simply love Clear Linux and need to run Windows
for work or specific tasks, then this tutorial is definitively for you.
NOTE: WSL2 is only available in the Windows 10 Insider Fast ring (read: beta).
This means that, while is quite stable, it is not suited, yet, for production environments.
Prerequisites
In order to have the best experience while reading this tutorial, the following prerequisites need to be checked:
1 of 6 11/8/2021, 9:53 AM
[Tutorial] Clearlinux on WSL2 - Tutorials and Guides - Clear Linux OS ... https://community.clearlinux.org/t/tutorial-clearlinux-on-wsl2/1835/print
Now that all prerequisites are gathered, it’s time to start the configuration.
In order to keep everything ordered, the first task will be to create a directory “structure”. This will help when
very specific configurations need to be done (read: custom kernel):
Start a new Powershell session. TIP: press the keyboard keys WINDOWS+R to show the run popup and type
powershell
Create one sub-directory to store the inital rootfs: PS> mkdir /mywsldistros/sources
Copy (or move) the rootfs to the sources directory: PS> cp -v $HOME/Downloads
/Clear_Linux_Server_WSL_rootfs_clean.tar.gz /mywsldistros/sources/
2 of 6 11/8/2021, 9:53 AM
[Tutorial] Clearlinux on WSL2 - Tutorials and Guides - Clear Linux OS ... https://community.clearlinux.org/t/tutorial-clearlinux-on-wsl2/1835/print
Register Clear Linux as a new WSL2 distro: wsl.exe --import clearlinux /mywsldistros
/clearlinux /mywsldistros/sources/Clear_Linux_Server_WSL_rootfs_clean.tar.gz
--version 2
TIP: if the --version flag is omitted, the distro can be migrated using wsl.exe --set-version
clearlinux 2
With that said, here is the 4 main tasks that should be performed after the first login:
3 of 6 11/8/2021, 9:53 AM
[Tutorial] Clearlinux on WSL2 - Tutorials and Guides - Clear Linux OS ... https://community.clearlinux.org/t/tutorial-clearlinux-on-wsl2/1835/print
The sudoers config has 2 predifined groups, add the user created to one of them as follow:
vi /etc/wsl.conf
[automount]
4 of 6 11/8/2021, 9:53 AM
[Tutorial] Clearlinux on WSL2 - Tutorials and Guides - Clear Linux OS ... https://community.clearlinux.org/t/tutorial-clearlinux-on-wsl2/1835/print
enabled = true
options = "metadata,uid=1000,gid=1000,umask=22,fmask=11,case=off"
mountFsTab = true
crossDistro = true
[network]
generateHosts = true
generateResolvConf = true
[interop]
enabled = true
appendWindowsPath = true
[user]
default = clearuser
At this point, the initial configuration is finalised. Close the session, shutdown the WSL VM and start a new
Clear Linux session:
exit
PS> wsl.exe --shutdown
PS> wsl.exe -d clearlinux
sudo swupd update
5 of 6 11/8/2021, 9:53 AM
[Tutorial] Clearlinux on WSL2 - Tutorials and Guides - Clear Linux OS ... https://community.clearlinux.org/t/tutorial-clearlinux-on-wsl2/1835/print
configuring-wsl/
Conclusion
Congratulations, a new Clear Linux WSL distro is now up and running.
As seen during the system update or when adding new packages, there’s some errors. Do not sweat, these are
not blocking the system.
Now you can enjoy all the incredible blog posts out there on how to use to the best WSL while running the
distro we like the most, Clear Linux.
15 Likes
It took me 3 hours and 3 separate executions of swupd to fully update the OS, and I always get a warning from
curl:
Warning: Curl - Unable to create a thread pool - downloading files synchronously
6 of 6 11/8/2021, 9:53 AM