Comment changer the language of the Linux subsystem dans Windows 10 (WSL)?

After installing Bash in Windows 10 I noted that it is using Swedish in the linux applications. My Windows 10 installation is in English.

J’ai tried to reinstall bash after changing the default input language to english using

lxrun /uninstall /full

lxrun /install

But it is still using swedish texts in the linux apps, e.g. in nano.

So how can I force the Linux subsystem to install with english language?


Source : Super User.)

The Windows Subsystem for Linux (WSL) installation should automatically set the Ubuntu locale to match the locale of your Windows install. Vous pouvez change the Ubuntu locale manually using the shell.

Run this command in bash.exe to change the language to US English:

sudo update-locale LANG=en_US.UTF8

If you get a sudo: unable to resolve host error whenever you run sudo,

Verify that you have a hostname set (with the hostname command).

  • If it isn’t set, add it to the /etc/hostname file.

  • Ensure that /etc/hostname contains only the hostname.

Edit the file with sudoedit /etc/hostname
(assuming vous pouvez get that to work); see this.

  • Ensure that your /etc/hosts file contains entries
    for your actual hostname (spelled exactly the same) and/or localhost.
    Again, use sudoedit.

See Error message when I run sudo: unable to resolve host
for more information.

  • Relaunch the bash.exe for the changes to take effect.

If that doesn’t fix it, try restarting the service:

sc stop  lxssmanager
sc start lxssmanager

Si vous voulez to learn more about the bash in WSL,
vous pouvez read the FAQ by Microsoft.