22 votes

WSL typing by itself

After reading the issue commented by @Cpt.Whale and this doc from Microsoft (about_Character_Encoding) My solution to the problem was: Changing the default encoding value (see the link above) $...
user avatar
3 votes
Accepted

Shutdown Windows from WSL

WSL can run Windows tools directly from the WSL command line using the syntax of [tool-name].exe. In WSL, to shutdown use the shutdown command. For example, type the following command to gracefully ...
user avatar
  • 411k
2 votes
Accepted

WSL2 error 0x80370102 when trying to install ubuntu

To fix this I just had to perform the "Reset PC" that Windows provides. It is not an ideal answer but I have asked in multiple places and nobody had a clue.
user avatar
  • 101
2 votes
Accepted

Updating WSL 2 without Microsoft Store

wsl --update in Windows 10 only updates the WSL2 kernel, not WSL itself. That's not really going to add any new WSL "features" such as GUI support. The only new feature that is purely ...
user avatar
  • 8,651
2 votes

Is there a way to backup my WSL Ubuntu 20.04 environment and restore it on my Ubuntu 20.04 system?

It might not be a 1-1 match, but its a little easier on linux due to 'everything being a file'. I haven't quite gotten around to figuring out how to back up snap based software. I have an old answer ...
user avatar
  • 125k
2 votes
Accepted

Does WSL1 vs WSL2 make a difference if I were only to use it for SSH connection?

What a great question -- I'd honestly never considered the network speed difference between WSL1 and WSL2 before, nor really had the need personally. The answer, apparently, is yes, an SSH connection ...
user avatar
  • 8,651
2 votes
Accepted

Windows: How to make cygwin bash.exe to take precedence over wsl in command line?

When you say "command line", I'm going to assume you mean the CMD shell, although you could potentially mean PowerShell. For CMD, the easiest way to do this is probably with a doskey alias ...
user avatar
  • 8,651
1 vote

Can I install a Linux distro in WLS2 from a bootable USB stick?

Perhaps. It's difficult to say without being able to examine it myself, but here's my guess based on the contents you show. The full contents of the USB drive is My guess is that this isn't the ...
user avatar
  • 8,651
1 vote
Accepted

Is there a way to mount an external drive when it becomes available in WSL?

It looks to me like this will need two different approachs: First we need to handle the case when WSL starts up while the drive is already attached. And we also need to handle the case when the drive ...
user avatar
  • 8,651
1 vote
Accepted

How to install Docker in Ubuntu WSL?

My naive understanding is that this Ubuntu "app" is equivalent to a Linux development environment. It's actually more like running Ubuntu in a container, because it really is. When running ...
user avatar
  • 8,651
1 vote

Is there a way to backup my WSL Ubuntu 20.04 environment and restore it on my Ubuntu 20.04 system?

While (most) everything in @JourneymanGeek's answer is correct, I think I'd look at it a bit differently. I'd say it's worth a try, but you might need to make multiple attempts to 'get it just right.'...
user avatar
  • 8,651
1 vote

Cannot communicate with Windows localhost from WSL2

localhost/127.0.0.1/::1 networking is special. Every computer has its own localhost. You cannot connect to other computers’ localhost over the network. Virtual machines (like WSL 2) are considered ...
user avatar
  • 54.3k
1 vote

Move window to right on wsl not working

A few things are going on here: First, unfortunately, snap-to just isn't supported in WSLg. From the WSLg architecture overview: [WSLg] still uses server-side window movement and resizing, ...
user avatar
  • 8,651
1 vote

MySQL service status shows stopped after started

You appear to be running the command without sudo. The MySQL service will been shown as running only when sudo is used: sudo service mysql status
user avatar
1 vote

How do I get back unused disk space from ubuntu on wsl2?

When the command let optimize-vhd is not available in your system do the following: #Shutdown the wsl before managing its disk wsl --shutdown diskpart #Selects the wsl disk (Replace user name by yours ...
user avatar
1 vote

Is there any way to install WSL on non-C drive?

I really like @Wasif's answer, but I'll add some additional details that didn't seem appropriate for an edit: First, and most importantly, as noted in the comments, the <distribution>.exe ...
user avatar
  • 8,651
1 vote

Unable to resolve host name in WSL

check if there exists a resolv.conf symbolic link and file: cd /etc ls -lha stat resolv.conf you should see a symbolic link pointing to: File: resolv.conf -> ../run/resolvconf/resolv.conf ...
user avatar
  • 11

Only top scored, non community-wiki answers of a minimum length are eligible