Questions tagged [windows-subsystem-for-linux]
Use this tag for questions relating to Windows Subsystem for Linux, the compatibility layer developed by Canonical and Microsoft to run Ubuntu programs natively in newer versions of Windows.
1,366
questions
573
votes
6
answers
1.1m
views
Where is the Ubuntu file system root directory in Windows Subsystem for Linux and vice versa?
I have installed Ubuntu subsystem on Windows 10 (after enabling feature in settings), but where is the Ubuntu file system root directory located in the drive?
335
votes
7
answers
398k
views
Reset the password in Ubuntu / Linux Bash in Windows
I have installed Linux Bash on Windows 10 (available from Microsoft), but I've forgotten my password.
I've searched for a solution but I only find suggestions that involve doing something before the ...
216
votes
5
answers
377k
views
WSL: Am I running version 1 or version 2?
I have Windows Subsystem for Linux, but I don't know which version I have, and many things won't work in version 1. How do I check my version?
215
votes
3
answers
941k
views
System has not been booted with systemd as init system (PID 1). Can't operate
I use WSL2 on Windows 11. I want to run the systemctl command in Ubuntu 20.04, but it gives me the following error:
System has not been booted with systemd as init system (PID 1).
Can't operate. ...
144
votes
10
answers
311k
views
What's the easiest way to run GUI apps on Windows Subsystem for Linux?
I searched around, and currently there are two methods suggested; installing an enhancement for Windows Subsystem for Linux and installing an XServer.
I want to know which method is the most hassle-...
113
votes
5
answers
266k
views
Unable to change the root password in Windows 10 WSL
I have tried both commands
sudo passwd
and
sudo -u root /bin/bash
But as soon as I enter the new password twice, it says password has been updated. You close the shell and open a new instance, it ...
96
votes
9
answers
216k
views
How to change default user in WSL Ubuntu bash on Windows 10
I installed the WSL Bash on Windows 10 and set my user to e.g. 'abc' but now I want to change it to something else.
How can I change the user name of the user I'm logged in as?
When I open bash it ...
90
votes
4
answers
126k
views
WSL Ubuntu Distro | How to solve `Operation not permitted` on cloning repository
I am running Ubuntu 18.04, as a Subsystem for Windows. I have done this in mutliple PCs and never had this problem. I try to to git clone <repo>, and I get this:
Cloning into '<repo>'...
...
90
votes
6
answers
243k
views
How do I fix "$'\r': command not found" errors running Bash scripts in WSL?
I'm getting an error in WSL while trying to use junyanz/pytorch-CycleGAN-and-pix2pix.
I followed all the install steps successfully on Windows 10 x64 using the steps at PyTORCH on Windows 10: An ...
88
votes
6
answers
160k
views
Upgrade Ubuntu in WSL2 from 20.04 to 22.04
I'm new to WSL2-Ubuntu. My computer already had preisntalled the 20.04 version, but I saw there's already the 22.04 version, so I was wondering if it was worthy to have the new one. If so, how can I ...
71
votes
3
answers
109k
views
How can I send mobile text message from terminal?
I've just lost my phone. I know it's here in my house cause I used it last night and my bluetooth speakers will connect to it this morning.
How can I text my phone using bash? Then the phone ...
71
votes
2
answers
51k
views
What are the differences between Windows Bash and Cygwin?
What are the differences between Windows Bash and Cygwin?
The new update from Windows with "Linux" Bash is new, but what differences are there to Cygwin that might make you choose one over the other?
66
votes
9
answers
205k
views
/usr/bin/env: ‘python’: No such file or directory
I am trying to install Gitlab Development Kit on Windows Ubuntu Bash.
$python3 output
Python 3.5.2 (default, Nov 17 2016, 17:05:23)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" ...
60
votes
1
answer
246k
views
How to navigate to C drive in bash on WSL-Ubuntu? [duplicate]
I've installed bash on Ubuntu on Windows feature on Windows 10 and I want to change directory this path on my C:\ drive:
C:/wamp64/www
What should I do ?
59
votes
5
answers
107k
views
How do I reset my installation of Ubuntu on Windows?
I've installed Linux Subsystem for Windows on my machine. It works beautifully!
Since then, I've done unspeakable things to my install. Nothing works anymore. How do I start again from scratch?
57
votes
8
answers
321k
views
WSL 2 Won't Run Ubuntu - Error 0x80370102
Today, I decided to upgrade from WSL 1 to WSL 2. On WSL 1, I had no issues getting both Kali Linux or Ubuntu to function on WSL 1. When upgrading to WSL 2, both Kali and Ubuntu failed to upgrade to ...
54
votes
3
answers
116k
views
How can I access my USB drive from my Windows Subsystem for Linux -- Ubuntu distribution?
How can I access my system's USB drive in Windows Subsystem for Linux (WSL)? I'm using an Ubuntu distribution.
54
votes
1
answer
50k
views
Ubuntu 22.04 LTS on WSL: "Failed to retrieve available kernel versions"/"Failed to check for processor microcode upgrades" when installing packages
I just installed Ubuntu 22.04 LTS for Windows Subsystem for Linux, but I'm having some issues. Every time I install new packages using sudo apt install, I will get 2 messages saying that:
Failed to ...
53
votes
5
answers
114k
views
Multiple terminal windows in Windows Ubuntu?
I am using Ubuntu downloaded from the Windows Store in Windows 10. It doesn't seem to be possible to use multiple terminal windows. Is the only way then to install a GUI and use this with the X server....
46
votes
4
answers
18k
views
landscape-sysinfo.cache: Permission denied when I start Ubuntu 22.04 in WSL
I installed Ubuntu 22.04 on Windows 11 using WSL. I then moved it on another disk with the WSL commands (--export/--import).
After moving it, the default user was root, so I added the below lines in /...
45
votes
13
answers
118k
views
Temporary Failure in name resolution on WSL
Running Ubuntu on WSL and trying to push to github and download new python modules using pip and I get this error.
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after ...
45
votes
1
answer
21k
views
Broken APT on WSL 18.04
I am having problems with apt on my WSL installation of Ubuntu 18.04.
Whenever I try to install a package with apt I get this:
Reading package lists... Done
Building dependency tree
Reading state ...
43
votes
12
answers
58k
views
A better terminal experience for Windows Subsystem for Linux(WSL)?
The terminal for Windows Subsystem for Linux (WSL) is fairly minimal. I have not used the terminal on Windows very much - I generally use Ubuntu or OSX - but I am surprised that the default terminal ...
40
votes
1
answer
156k
views
Where is WSL located on my computer?
I am new to Windows and have installed WSL2 based on the instructions provided here.
It works fine, but I cannot locate where it has been installed on my computer. The output for pwd is home/nkp68.
...
39
votes
7
answers
202k
views
Can I change directory to a Windows drive in Ubuntu Bash on WSL?
I am a super newbie for Ubuntu and basically need Ubuntu for a Python package.
I would like to run a Python file in say e:/username/folder1/folder2/python.py. I tried every method online and the only ...
34
votes
3
answers
87k
views
Make /etc/resolv.conf changes permanent in WSL 2
On WSL 2, when I try to connect to a website, I get an issue:
$ ping www.google.com
ping: www.google.com: Temporary failure in name resolution
Now, to fix this, I had to add /etc/wsl.conf with this ...
33
votes
6
answers
30k
views
Windows Subsystem for Linux (WSL): what can't I do with the Ubuntu application for Microsoft Windows?
As most of you know, in the Microsoft Store, there are three versions of Ubuntu. This means that on Windows I can emulate Ubuntu and have the Ubuntu command line directly on Windows.
The question is ...
31
votes
11
answers
117k
views
DNS not working on WSL
I'm currently using an Insider build of Windows 11. (22458)
However, I had this problem a few times on other builds. (and wsl worked before)
When I start wsl, I'm not able to do a DNS request. (...
30
votes
2
answers
102k
views
New installation of Windows 10 and Ubuntu from Windows Store error
Please let me know if there is a more appropriate site to post this error. I have a brand new Dell i-7 Skylake laptop, brand new Samsung Pro 960 SSD, New Windows 10 build 16299 (Fall Creators Update ...
28
votes
4
answers
11k
views
How does the new "Bash on Windows 10" really work?
I read online that Ubuntu and Bash are coming to Windows 10. I also read that it's not an emulator or virtual machine running on top of Windows, but something else. So how exactly does it all come ...
27
votes
1
answer
46k
views
i am getting error on windows subsystem
when I switch to typing with bash on my windows laptop, it returns me an error like the one below, I searched a bit but couldn't find it and I'm very newbie, can you help me?
this error :
<3>WSL ...
27
votes
4
answers
30k
views
Ubuntu on Windows 10: Docker vs WSL
I understand that it is currently possible to run Ubuntu on Windows 10 in two different ways:
Using the Windows Subsystem for Linux (WSL).
Installing docker for Windows 10, and use a container with ...
26
votes
7
answers
107k
views
Can't restart/shutdown Ubuntu under WSL
I just got Ubuntu from Microsoft Store and tried some things with it. However when i try to restart or shut down the system using sudo reboot or sudo shutdown -h I got a prompt saying
"System has ...
24
votes
4
answers
144k
views
Enable SSH in WSL system
I am trying to enable SSH in my Ubuntu running in WSL2 system:
sudo systemctl status ssh
I get this error:
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to ...
23
votes
6
answers
26k
views
Win10 linux subsystem libGL error: No matching fbConfigs or visuals found libGL error: failed to load driver: swrast
I'm not really asking a question, but this ___ website won't allow me to do this any other way.
I ran into a problem today using GTK under Win10's Linux subsystem (specifically Ubuntu 18.04). The ...
23
votes
1
answer
27k
views
How to upgrade Ubuntu packages in WSL alongside Microsoft Store auto-update
I started using WSL2 and installed Ubuntu from the Microsoft Store (the one without a specific version number). My understanding is that it will automatically upgrade to the next major LTS release -- ...
22
votes
5
answers
29k
views
How can I get around using xclip in the Linux subsystem on Win 10?
On a Linux subsytem on Windows 10 you get an error when using xclip, ex:
cat some/file.txt | xclip
Error: Can't open display: (null)
There is no Desktop (UI), so of course there isn't a clipboard to ...
22
votes
3
answers
50k
views
Your system is unable to reach the snap store
I tried to upgrade my windows ubuntu subystem to 18.10 using this instruction:
https://linuxconfig.org/how-to-upgrade-ubuntu-to-18-10-cosmic-cuttlefish#h9-how-to-upgrade-ubuntu-the-debian-way
But ...
22
votes
3
answers
50k
views
How can I add ~/.local/bin to my PATH?
I'm just trying to follow this tutorial and set up my environment. My system is WSL Ubuntu 18.04. Here is already an answer on my question, but I as an absolute novice in Linux/UNIX don't know which ...
21
votes
5
answers
50k
views
WSL not working after update from Microsoft store
Version
Microsoft Windows [Version 10.0.19044.1586]
WSL Version
WSL 2
Kernel Version
5.10.16
Distro Version
Ubuntu20.04LTS
Other Software
Docker Desktop (Windows), version 4.6.1 (76265) Docker Engine ...
21
votes
2
answers
29k
views
How to start a specific service when Ubuntu is started on WSL2
I need to run sudo service postgresql start every time when I start Ubuntu on WSL2.
How can I make the service start automatically when I start Ubuntu?
WSL doesn't use systemd, so sudo systemctl ...
20
votes
8
answers
30k
views
sleep doesn't work on Ubuntu 20.04 (WSL)
After upgrading to 20.04 on WSL sleep doesn't work with an error:
sleep: cannot read realtime clock: Invalid argument
20
votes
4
answers
19k
views
Why does it take so much time to initialize mlocate database?
While I was trying to install xubuntu-desktop on wsl2(Ubuntu 20.04) on windows 10.
It got stuck at
Initializing mlocate database; this may take some time...
after waiting for a long time(left it for a ...
18
votes
4
answers
21k
views
Access Windows network shares from Ubuntu shell in WSL
I'm trying to migrate from Cygwin to WSL. In bash on Cygwin, I could do things like:
$ ls //servername/sharename
to access a Windows shared folder. I didn't need to mount it or anything first, it just ...
18
votes
1
answer
10k
views
Does WSL2 run Linux in a virtual machine or alongside the Windows kernel?
I've always wanted a Linux terminal in Windows and was fulfilled by WSL 1. But it was painfully slow as it was (I guess) a Hyper-V-managed virtual machine. With WSL 2, it's way faster relatively but I ...
17
votes
4
answers
12k
views
Running a simulation on pure Ubuntu vs on Ubuntu in Windows (WSL)
I would like to ask a question about testing a large CAE simulation on the same computer in the following two situations.
Pure Ubuntu system
Ubuntu system in Windows 10 (WSL)
Are the calculation ...
17
votes
3
answers
34k
views
Connect MySQL Workbench to WSL2
I have a brand new WSL2, running on the latest Windows 10 (2004) with Ubuntu 20.04, MySQL installed, I can access it from Bash and get the status --
mysql> status
--------------
mysql Ver 8.0.20-...
17
votes
3
answers
32k
views
How to disable IPv6 on Windows Subsystem for Linux?
I tried to disable IPv6 by adding in /etc/sysctl.conf:
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
and then running sudo sysctl -p to ...
17
votes
2
answers
37k
views
Windows 10 Bash "Cannot connect to display!"
I have recently installed Bash for Windows 10 (yay!). I need it to run my processing software called 'Seismic Unix' which installed fine. However, when I ran the command attached, it gave this error "...
17
votes
4
answers
49k
views
"Error: 0x80080005 Server execution failed" while installing Ubuntu on Windows
While installing Ubuntu app on Windows, I'm encountering this error:
Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80080005
Error: 0x80080005 Server ...