• Latest
  • Trending
  • All
  • BUSINESS
  • ENTERTAINMENT
  • POLITICAL
  • TECHNOLOGY

November 12, 2024
Indices: Already not extreme fear

Indices: Already not extreme fear

April 24, 2025
Eurozone: Tariff reversal is some relief, but no game changer – ABN AMRO

Eurozone: Tariff reversal is some relief, but no game changer – ABN AMRO

April 24, 2025
US: The US has already lost the trade war – ABN AMRO

US: The US has already lost the trade war – ABN AMRO

April 24, 2025
Predictive Analytics Promise the End of ‘Gut Feelings’ in Construction

Predictive Analytics Promise the End of ‘Gut Feelings’ in Construction

April 24, 2025
First Border Wall Contracts of Second Trump Term Awarded in Texas, San Diego

First Border Wall Contracts of Second Trump Term Awarded in Texas, San Diego

April 24, 2025
Construction Economics for April 28, 2025

Construction Economics for April 28, 2025

April 24, 2025
AI startups backed to boost construction productivity

AI startups backed to boost construction productivity

April 24, 2025
Why is building safety litigation on the rise?

Why is building safety litigation on the rise?

April 24, 2025
Severfield to cut 6 per cent of staff despite ‘solid’ order book

Severfield to cut 6 per cent of staff despite ‘solid’ order book

April 24, 2025
Bovis promotes operations head to board

Bovis promotes operations head to board

April 24, 2025
China expresses condolences over death of Pope Francis, World News

China expresses condolences over death of Pope Francis, World News

April 24, 2025
Pope Francis’ body taken in procession to St Peter’s for lying in state, World News

Pope Francis’ body taken in procession to St Peter’s for lying in state, World News

April 24, 2025
  • About
  • Advertise
  • Privacy & Policy
  • Contact
Friday, May 9, 2025
No Result
View All Result
  • HOME
  • BUSINESS
  • ENTERTAINMENT
  • POLITICAL
  • TECHNOLOGY
  • ABOUT US
  • Login
  • Register
  • HOME
  • BUSINESS
  • ENTERTAINMENT
  • POLITICAL
  • TECHNOLOGY
  • ABOUT US
No Result
View All Result
Huewire
No Result
View All Result
Home TECHNOLOGY

by huewire
November 12, 2024
in TECHNOLOGY
0
494
SHARES
1.4k
VIEWS
Share on FacebookShare on Twitter

Skip to content

WSL - So aktualisieren Sie den Kernel

Image: IDG

There are many open source programs (aka code that’s accessible to the public) out there for both Linux and Windows. For programs and tools where that’s not the case, WSL (Windows Subsystem for Linux) is the ideal solution for using Linux programs on Windows computers. This means that you don’t have to start Linux first and can use the Linux program in the currently active Windows.

Programs in WSL run slower than under native Linux, but it’s not always noticeable. Microsoft is also continuing to work on improvements that will be incorporated into the Linux kernel. A newer kernel can therefore speed up WSL.

WSL kernel and virtualization

In WSL 2, the Linux kernel runs on a hypervisor (Hyper-V), similar to its Linux counterpart KVM/Qemu. The kernel offers functions to ensure communication between the guest and host systems. This concerns, for example, the shared use of the main memory and CPU management. The program code for this comes primarily from Microsoft.

For Linux users, newer kernels offer support for newer hardware and performance optimizations. Microsoft also regularly optimizes the Hyper-V code in the kernel, but the hardware drivers hardly play a role in WSL because the virtual hardware always remains the same. However, there are drivers that are required for certain applications such as network block devices (nbd), which can be used to mount virtual hard disks in VHD format, for example.

Install WSL and check the version

Powershell, Command Prompt, and WSL can be used conveniently in the Windows terminal. It’s available by default in Windows 11, but Windows 10 users need to install it via the Microsoft Store.

In Powershell, install WSL with the following code:

wsl --install -d Ubuntu-24.04

To call up the available distributions, enter the code below and then restart Windows:

wsl --list --online

After logging in, a Linux terminal will open and notify you when the installation is complete. You will then be asked to enter a user name and password for the Linux account. Update the Ubuntu system with:

sudo apt update && sudo apt upgrade

In the Windows terminal, start Linux via the menu that appears after clicking on the arrow button next to the tabs. In Powershell, determine the WSL version with:

wsl -l -v

If a 1 appears in the Version column for an older installation, update the version with these two lines:

wsl --set-default-version 2
wsl --set-default [Distribution]

Replace the placeholder [Distribution] with the name of the distribution.

Creating a new kernel for WSL 2

Step 1: Start Linux in WSL and install some developer packages with:

sudo apt install build-essential flex bison dwarves libssl-dev libelf-dev libncurses-dev git

Step 2: Create a working directory and download the source code (four lines):

mkdir kernel
cd kernel
git clone https://github.com/microsoft/WSL2-Linux-Kernel.git --depth=1 -b linux-msft-wsl-6.6.y
cd WSL2-Linux-Kernel

Adjust the kernel version if necessary.

Step 3: With the following line of code, you can give the kernel its own name:

scripts/config --file Microsoft/config-wsl --set-str LOCALVERSION "-custom-microsoft-standard-WSL2"

If you wish, you can use this line of code to call up the configuration editor and make your own customizations:

make menuconfig KCONFIG_CONFIG=Microsoft/config-wsl
WSL-Kernel konfigurieren: Über „menuconfig“ lässt sich die Kernel- Konfiguration bearbeiten. Die Angabe bei „Local version“ hilft dabei, Kernel-Versionen zu unterscheiden.

Configuring the WSL kernel: The kernel configuration can be edited via “menuconfig”. The entry for “Local version” helps to differentiate between kernel versions.

IDG

Step 4: Create the kernel with:

echo 'yes' | make -j $(nproc) KCONFIG_CONFIG=Microsoft/config-wsl

Install the modules with:

sudo make KCONFIG_CONFIG=Microsoft/config-wsl modules_install

Step 5: In Windows Explorer, call up the Linux environment via the entry below Linux in the navigation area. Copy the vmlinux file from your home directory to the Windows user profile in the WSL folder (C:Users[username]WSL).

Step 6: Under Windows, create the .wslconfig file in your profile folder. Enter these two lines into it:

[wsl2]
kernel=C:Users[username]WSLvmlinux

Replace the placeholder [username] with your user name.

In Powershell, terminate all running WSL instances with:

wsl --shutdown

If you start Linux in the Windows subsystem for Linux, the following command shows the version of the new kernel:

uname -a

This article originally appeared on our sister publication PC-WELT and was translated and localized from German.


Author: Thorsten Eggeling

Thorsten Eggeling schreibt seit gut 20 Jahren Artikel für die PC-WELT.

Read More

Share198Tweet124
huewire

huewire

Recent Comments

No comments to show.

Recent Posts

  • Indices: Already not extreme fear
  • Eurozone: Tariff reversal is some relief, but no game changer – ABN AMRO
  • US: The US has already lost the trade war – ABN AMRO
  • Predictive Analytics Promise the End of ‘Gut Feelings’ in Construction
  • First Border Wall Contracts of Second Trump Term Awarded in Texas, San Diego
Huewire

Copyrights © 2024 Huewire.com.

Navigate Site

  • About
  • Advertise
  • Privacy & Policy
  • Contact

Follow Us

Welcome Back!

Login to your account below

Forgotten Password? Sign Up

Create New Account!

Fill the forms below to register

All fields are required. Log In

Retrieve your password

Please enter your username or email address to reset your password.

Log In

Add New Playlist

No Result
View All Result
  • HOME
  • BUSINESS
  • ENTERTAINMENT
  • POLITICAL
  • TECHNOLOGY
  • ABOUT US

Copyrights © 2024 Huewire.com.