Open a PowerShell in administrator mosde by clicking with the right button and select “execute as administrator”
We can list the available distributions :
PS C:\WINDOWS\system32> wsl.exe --list --online Voici la liste des distributions valides qui peuvent être installées. Installez à l’aide de 'wsl.exe --install <Distro>'. NAME FRIENDLY NAME Ubuntu Ubuntu Ubuntu-26.04 Ubuntu 26.04 LTS Ubuntu-24.04 Ubuntu 24.04 LTS Ubuntu-22.04 Ubuntu 22.04 LTS openSUSE-Tumbleweed openSUSE Tumbleweed openSUSE-Leap-16.0 openSUSE Leap 16.0 SUSE-Linux-Enterprise-15-SP7 SUSE Linux Enterprise 15 SP7 SUSE-Linux-Enterprise-16.0 SUSE Linux Enterprise 16.0 kali-linux Kali Linux Rolling Debian Debian GNU/Linux AlmaLinux-8 AlmaLinux OS 8 AlmaLinux-9 AlmaLinux OS 9 AlmaLinux-Kitten-10 AlmaLinux OS Kitten 10 AlmaLinux-10 AlmaLinux OS 10 archlinux Arch Linux FedoraLinux-44 Fedora Linux 44 FedoraLinux-43 Fedora Linux 43 eLxr eLxr 12.12.0.0 GNU/Linux OracleLinux_7_9 Oracle Linux 7.9 OracleLinux_8_10 Oracle Linux 8.10 OracleLinux_9_5 Oracle Linux 9.5 SUSE-Linux-Enterprise-15-SP6 SUSE Linux Enterprise 15 SP6
To install a specific distribution, we use the following command:
wsl.exe --install -d [Distro]
For example to install Archlinux :
wsl.exe --install -d archlinux
Without '-d' option, the Ubuntu distribution in its last release will be installed.
PS C:\WINDOWS\system32> wsl --install
Téléchargement en cours : Sous-système Windows pour Linux 2.7.11
Installation en cours : Sous-système Windows pour Linux 2.7.11
Sous-système Windows pour Linux 2.7.11 a été installé.
Installation du composant facultatif Windows : VirtualMachinePlatform
Outil Gestion et maintenance des images de déploiement
Version : 10.0.26100.8521
Version de l’image : 10.0.26200.8655
Activation de la ou des fonctionnalités
[==========================100.0%==========================]
L’opération a réussi.
L’opération demandée est réussie. Les modifications ne seront pas effectives avant que le système ne soit réamorcé.
Téléchargement : Ubuntu
Installation : Ubuntu
La distribution a été installée. Il peut être lancé via 'wsl.exe -d Ubuntu'
Lancement : Ubuntu...
Provisioning the new WSL instance Ubuntu
This might take a while...
Create a default Unix user account: yann
Create a default Unix user account: yann
New password:
Retype new password:
passwd: password updated successfully
usermod: no changes
Help improve Ubuntu!
Help us improve Ubuntu features and compatibility by sharing system reports with Canonical.
Reports are sent anonymously and do not contain any personal data.
For legal details, please visit: https://ubuntu.com/legal/systems-information-notice
We will save your answer to Windows and will only ask you once.
Would you like to opt-in to platform metrics collection (Y/n)? To see an example of the data collected, enter 'e'.
e
{
"insightsVersion": "0.9.3ubuntu",
"collectionTime": 1786024928,
"systemInfo": {
"hardware": {
"cpu": {
"name": "13th Gen Intel(R) Core(TM) i7-13850HX",
"vendor": "GenuineIntel",
"architecture": "x86_64",
"cpus": 28,
"sockets": 1,
"coresPerSocket": 14,
"threadsPerCore": 2
},
"memory": {
"size": 15816
},
"disks": [
{
"size": 356,
"type": "disk"
},
{
"size": 159,
"type": "disk"
},
{
"size": 4096,
"type": "disk"
},
{
"size": 1048576,
"type": "disk"
}
]
},
"software": {
"os": {
"family": "linux",
"distribution": "Ubuntu",
"version": "26.04"
},
"timezone": "CEST",
"language": "C"
},
"platform": {
"wsl": {
"subsystemVersion": 2,
"systemd": "used",
"interop": "enabled",
"version": "2.7.11.0",
"kernelVersion": "6.18.33.2-microsoft-standard-WSL2"
}
}
}
}
Would you like to opt-in to platform metrics collection (Y/n)? To see an example of the data collected, enter 'e'.
[Y/n/e]: y
yann@lcom-is-m-maif2:/mnt/c/WINDOWS/system32$
Search for wsl in the search barre :
and click on “Open/Run” you should get the following window:
Now we update the system:
yann@lcom-is-m-maif2:~$ sudo apt update yann@lcom-is-m-maif2:~$ sudo apt upgrade
yann@lcom-is-m-maif2:~$ sudo apt install build-essential dos2unix tree gitk gedit yann@lcom-is-m-maif2:~$ sudo apt install git git-lfs
Zone.Identifier files in WSL are sidecar metadata files created when you copy or move a file downloaded from the internet on Windows into your Windows Subsystem for Linux (WSL) filesystem.
Windows natively tracks downloaded files using a security feature called Mark of the Web (MOTW). Because Linux filesystems do not support this specific Windows feature, WSL extracts that hidden data and saves it as a separate visible file.
Zone.Identifier files are a security metadata mechanism introduced by Windows to mark files downloaded from untrusted locations, like the internet. On Windows NTFS drives, this data is hidden inside an Alternate Data Stream (ADS). However, when you move or copy these files into a Linux filesystem via the Windows Subsystem for Linux (WSL), Linux treats this stream as a separate, visible file. These files often clutter directories and can break Linux scripts due to the colons in their filenames.You can safely delete existing identifier files, prevent Windows from creating them, or force your Git repository to ignore them.
To clean up clutter in your current WSL directory, you can safely scan and remove them using the Linux find command:
find . -name "*:Zone.Identifier" -type f -delete
alias purge-zone='find . -name "*:Zone.Identifier" -type f -delete'
to your ~/.bashrc file.
You can stop Windows from generating this data globally so that future file transfers do not create new identifier files:
gpedit.msc, and press Enter.User Configuration > Administrative Templates > Windows Components > Attachment Manager.Enabled, click Apply, and select OK.If you are using Windows Home edition and lack the Group Policy Editor, you can use the Registry Editor to achieve the same result:
regedit, and press Enter.HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\AttachmentsNote: If the Attachments key does not exist, right-click Policies, select New > Key, and name it Attachments.New > DWORD (32-bit) Value, and name it SaveZoneInformation.SaveZoneInformation and change its value data to 1.If these files frequently pop up in your project work and you want to prevent them from being committed to Git, add them to your tracking block:
.gitignore file: text*:Zone.IdentifierThis error occurs because your shell script has Windows line endings (CRLF) instead of Linux line endings (LF). Linux reads the hidden carriage return character (\r, shown as ^M) as part of the path, making it look for an interpreter named /bin/bash\r, which does not exist.
Here are the quickest ways to fix your script:
Run this command directly in your WSL terminal to strip out the Windows carriage returns:
sed -i 's/\r$//' your_script.sh
If you have dos2unix installed (or want to install it via sudo apt install dos2unix), it fixes the file instantly:
dos2unix your_script.sh
If you are editing the file in Windows using VS Code:
If you use Git, you can configure it to automatically handle line endings properly across Windows and WSL by running:
git config --global core.autocrlf false
source : https://www.conventionalcommits.org/en/v1.0.0/
A conventional commit message follows the strict structure <type>[optional scope]: <description>, aligning with the Conventional Commits specification.
It uses standard types like feat (feature) and fix (bug fix) to create a clean, automated, and machine-readable project history.
Core Structure
<type>(<scope>): <description> (Required)Common Commit Types
Quick Rules to Follow
To use git directly with windows, you need to install it from https://git-scm.com/install/windows
Inside windows explorer you can access git using a gui or a shell bash as viewed in this courses :