Questions tagged as ['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.
Score: 1
Ilia Manjavidze avatar
how to move ubuntu in WSL
kr flag

When I started developing in WSL I don't know why, but I installed Ubuntu-20.04 app from Microsoft store instead of just Ubuntu. I know that only difference is that Ubuntu-20.04 will not get automatically updated when new Ubuntu version will be released. All I want to do is to make Ubuntu just like Ubuntu-20.04 without reconfiguring it. I thought of moving all files from Ubuntu-20.04 to Ubuntu, b ...

Score: 1
John Rennie avatar
who command produces no output on WSL2
it flag

I am using Ubuntu 20.04 in the Windows subsystem for Linux on Windows 10. When I type the who command I get no output:

renniej@ratitch:~$ whoami
renniej@ratitch:~$ who

I have tried various things like sudo who and who -a but still I get no output. who --version gives:

who (GNU coreutils) 8.30
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or ...
Score: 0
Mateoglzc avatar
Upgrade gcc version in Ubuntu 18,04
in flag

I'm running Ubuntu 18.04 in WSL, which I use to compile my c++ programs.

I need to write a program that gets the name of all the files in a certain directory and adds them into a vector of strings. Browsing the internet I found that I can use the "filesystem" library to do this in a simple and easy way.

The problem is that whenever I try using this answer I get the error 'filesystem' has not been declar ...

Score: 0
J.Todd avatar
Trying to use sudo in WSL but my Microsoft account (which I'm logged into as Admin on Windows 10) password won't work. How can I fix it?
kr flag

When I look into what my admin password is on Windows 10, everything seems to point to it being linked to the Microsoft account I have connected.

I validated this, it seems to be the case that I am not currently using a local account:

enter image description here

But the same password I'm able to use to log into this Microsoft account with does not work when I attempt to run sudo in WSL. There is only one account on my PC.

Wh ...

Score: 0
Che Goranov avatar
Understanding WSL 2 & Ubuntu in NTFS
in flag

I am trying to understand the File System for Windows with WSL 2 and Ubuntu distro. When looking at the root '/" of the file system, Ubuntu operating system is installed in the /mnt directory. However, the my user for Ubuntu is in the "/home" directory. Why is this and how does this work? Also where is WSL2 located? Is WSL2 its' own directory?

Sorry, I am new to the software engineering world and ...

Score: 1
LightJack05 avatar
DNS not working on WSL
us flag

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. (Pinging an IP address directly works.)

I tracked this problem down to the file: /etc/resolv.conf

It includes the DNS server address.

The default is:

However, this one doesn't work.

If I change it to  ...

Score: 2
Luuk  avatar
'gnome-session' command does not start up GUI anymore after updating Ubuntu, returns GLXBadFBConfig error
mp flag

I am using Ubuntu on Windows with WSL. After updating Ubuntu to the latest version (20.04.3 LTS I believe) I am not able to run the gnome-session command anymore, which would usually allow me to access a GUI on VcXsrv. When I run the command it simply returns without starting up the GUI. This has happened before, however restarting Windows once usually resolved the issue. Running gnome-session --d ...

Score: 0
Reynald Lamury avatar
zsh plugin -- zsh-syntax-highlighting cannot be installed
pk flag

I have installed zsh, git, and oh-my-zsh, but i got an error like this: enter image description here

I'm running Ubuntu 20.04 LTS

I have .zshrc and ./oh-my-zsh located in $HOME

I've googled around for this but nothing worked for me:

  • it might have something to do with lf mode, i've also tried dos2unix to convert to unix file but still didn't work
  • i've tried to reinstall oh-my-zsh but same problem
  •  ...
Score: 0
How to limit CPU utilization for a process in ubuntu vm
tc flag

I am using ubuntu 20.04 VM for a course. For an assignment, I need to run a command that creates some thread and two processes happen simultaneously. However as soon I run the command ubuntu slows down and the CPU utilization goes to 200% for that process. I allotted 8GB/16GB RAM to oracle VM and 6/12 CPUs (Oracle forbids to allocate beyond 6 CPUs).

A screenshot of situation is attached:enter image description here

Is there some way ...

Score: 1
a11 avatar
Understanding disk space using WSL2
no flag

Complete novice here, so please tell me if this should be posted in a different forum. If the answer is already available online, I haven't been able to find it in my searches.

I set up Ubuntu 20.04 using WSL2 per the official Windows instructions. I did this because I needed to build and run a Docker container, and the instructions recommended following the WSL2 link.

After doing this, I see in the Ubun ...

Score: 0
J R avatar
Temporary failure in name resolution in ssh command
in flag

I haven't used my Ubuntu WSL in about 4 months, today I opened it up to use ssh to connect to a server for one of my classes and I get the following error. I've tried the other solutions that I've found here on stack exchange etc with no success. As well I need a permanent solution as this is going to be used on a daily basis. I don't quite understand what happened for it to now suddenly not work and wo ...

Score: 1
Wisely avatar
Error on realpath() on '/var/lib/mysql-files' (Error 2 - No such file or directory) - "mysql-files" directory doesn't exist
ge flag

I am using Ubuntu to configure Wordpress on WSL. Currently, I am trying to install MySQL as part of the LAMP Stack using the following as per this tutorial:

sudo usermod -d /var/lib/mysql/ mysql
sudo service mysql start

When I run the second command, I see "fail" in red appear (ie. mysql won't start). Here is what the Error Log looks like:

2021-09-05T08:17:59.936284Z mysqld_safe Logging to '/var/log ...
Score: 1
SCossano avatar
Windows Subsystem Linux cgroup issues with slurmd
id flag

I am trying to add my computer running Ubuntu WSL to a slurm cluster I have, made up of old laptops. And when I run
sudo service slurmd start
it comes back as failed. I checked the /var/log/slurmd.log I get the following output.

[2021-09-07T14:35:43.776] Message aggregation disabled
[2021-09-07T14:35:43.796] error: unable to mount freezer cgroup namespace: Invalid argument
[2021-09-07T14:35:43.7 ...
Score: 0
Y_sgard avatar
/var/log/auth.log in Ubuntu under WSL
in flag

Where do I find login information when running Ubuntu under Windows Subsystem for Linux (WSL)? I would normally expect it to be in /var/log/auth.log, but I don't see any login attempts there.

Output of my /var/log/auth.log:

Output of my /var/log/auth.log

Score: 0
How can I remove Windows Path from Ubuntu Path?
aw flag

How can I remove Windows Path from Ubuntu Path ?

~/.bashrc or other file does not contain it.

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Lxss = "AppendNtPath"=dword:00000000
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss{....} = "AppendNtPath"=dword:00000000

It has no effect.


Change flags fro ...

Score: 0
Yabesh avatar
while checking the ufw status for using nginx server in ubuntu app in windows, getting error. Can't get solved this issue?
vn flag
 yabesh@LAPTOP-DLAQ7R33:~$ sudo ufw status
 ERROR: problem running iptables: iptables v1.8.4 (legacy): can't initialize iptables table 
`filter': Table does not exist (do you need to insmod?)
 Perhaps iptables or your kernel needs to be upgraded.


I inst ...

Score: 2
Sam avatar
How to recursively convert all JPGs into one PDF in each folder using img2pdf?
us flag

I have three levels of folders like main, sub-1 and sub-2. my main folder has lot of sub-1 folders and sub-1 has lot of sub-2 folder with JPG images inside.

I copy JPG files from sub-2 to its parent sub-1 folder FROM main folder by using this command.

find . -type f -name "*.jpg" -exec sh -c 'for p; do
  cp "$p" "${p%/*/*}"
done' _ {} +

Now I have to convert all jpgs into one pdf file inside each sub-1 f ...

Score: 0
Dezo avatar
Why can I not run android emulator on wsl2 on Ubuntu 20.04.2?
in flag

I am using a HP 470 G8 laptop with an 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz processor and I have recently installed Ubuntu 20.04.2 within WSL2 on my Windows 10 Professional. After installing Android Studio on Ubuntu, I tried to set Android AVD Manager, but I get this error:

Your CPU does not support required features VT-x or SVM

Here is an image of my problem:

Virtual Device Configuration

I have enabled VT-x in BIOS ...

Score: 0
JΛYÐΞV avatar
Creating a new top level Admin User for Ubuntu on WSL
cn flag

Swapping standard Ubuntu for win-10 w/ "WSL Ubuntu"

For 5 years I booted to Ubuntu Distros with a GUI desktop, however; this year, my professor has forced me to add Windows to my machine. In the past I would dual boot the two, however, as I am sure most of you are likely to already know, several Linux distros have been made available for use by developers working in "Windows 10" environments", therefore, ...

Score: 0
nonayme avatar
openssl-1.1.1f-ubuntu2.8, what does 2.8 stand for regarding ubuntu?
hu flag

I have seen that openssl < 1.1.1l has a vulnerability so I wanted to upgrade it by running

sudo apt-get install openssl # upgrade didn't worked

And I get the following

openssl is already the newest version (1.1.1f-1ubuntu2.8).  

1.1.1f is the openssl library version. What does the 2.8 stand for?

It doesn't match my ubuntu version (20.04LTS) nor my kernel version (checked with uname -a)

Score: 0
sogu avatar
wsl2 jupyter lab URL to Chrome
vn flag


I want to connect Jupyter Lab with Windows 10 WSL 2 (Ubuntu 18.04) to my chrome


  1. Environemtn activate
  2. ```jupyter lab``
  3. ERROR:
JupyterLab application directory is /root/anaconda3/envs/rapids/share/jupyter/lab
Running as root is not recommended. Use --allow-root to bypas
  1. jupyter lab --allow-root terminal OUTPUT:
[I 15:00:04.091 LabApp] JupyterLab extension loaded from /root/anaconda3/e ...
Score: 0
Unable to upgrade to wsl 2
in flag

A while back I installed WSL by following the instructions here. I was under the impression that I was running WSL 2. However, when I launched code-insiders from the terminal (Ubuntu 20.04) today, I got a message saying that I'm running WSL 1 and strongly recommended that I upgrade. This was a surprise to me because I didn't think I was running WSL 1. Anyway, I opened a power shell (without admin) and ran ...

Score: 0
Jammy avatar
How to move a matched id of mat files in different folder
cn flag

I have Matlab (.mat) files in a particular folder. In a text document, I have some IDs list marked as 0 and 1. First I need to match the IDs and separate the mat files that are marked as '1'. For your reference, I detailed it below with a sample set.

For instance: Assume that I have these files in a folder

2424903_ (1)_crop_vampire_3.1.2.mat
1905302 (2)_crop_vampire_3.1.2.mat
1904802 (1)_crop_vampire_ ...
Score: 0
DocumentRoot wont change -Ubuntu 20 Apache2 on windows wsl2
ca flag

I'm at my wits end here. I've installed Ubuntu on windows with wsl2. I'm trying to setup apache2 to point to /mnt/my/windows/source/code

No matter what I do. DocumentRoot is always /var/www/html I've tried so much, I think I'm going insane.

This is in my apache2.conf *tried this out of desperation

<Directory /mnt/c/Users/me/Development/online-store/web>
    AllowOverride None
    Options Indexes Fo ...
Score: 2
Gazzubuteo avatar
Problem installing ImageMagick 7 using IMEI
bz flag

I tried to install ImageMagick 7 by IMEI from github:

but always had this answer:

   Signature verification failed!

 Please check /var/log/imei.log for details.

and in imei.log:

./ line 283: : No such file or directory
./ line 286: : No such file or directory
Can't open  for reading, No such file or directory
140131941683840:error:02001002:system l ...
Score: 1
Robert Smolders avatar
How to recover a deleted Ubuntu installation in Windows Subsystem for Linux
fo flag

I had both Ubuntu 18.04 and Ubuntu20.04 and wanted to delete Ubunto18.04. However, I deleted Ubuntu20.04 mistake. Is there a way for me to restore the files from Ubuntu 20.04?

Score: 0
user32882 avatar
Cannot access windows fonts after installing them on Ubuntu WSL
in flag

I am trying to get Microsoft Windows' Copperplate Gothic font on my Ubuntu subsystem using WSL. I followed the instructions in this link and the installation seemed to go fine. However, when I run fc-list | grep "Copperplate" I get no results. When I run fc-list | grep "New Roman" I also get no results.

How can I access my newly installed windows fonts on my Ubuntu subsystem via the command line?

Score: 0
Falio avatar
Nvidia Cuda installing error: dpkg locked
sj flag

I was downloading Cuda using my Linux (Ubuntu) terminal, it returned me with such message:

dpkg:error: dpkg fronted lock is locked by another process

Does anybody know the solution to this?

Here is a scree shot

Score: 0
oeuioeuipPEO avatar
Format or leave my ubuntu terminal WSL without any packages?
cn flag

It is obvious that when installing wsl, along with the Ubuntu distribution, it comes with pre-installed packages, such as git, curl, wget, etc., however I would like to have it like the classic ubuntu just installed, without these specific packages and ready to start installing the ones you need, I know that Ubuntu is not like other distributions that can arrive without any package completely at zero, bu ...

Score: 0
sourav roy avatar
npm command not found in wsl
gb flag

I had installed nodejs on windows10 & its path is also set to environment variable. It is working perfectly. As I switched to WSL I found npm commands were not working however I could run node.exe from within WSL. Do I need to install node for wsl separately? please help me I am really a newbie. I might be asking a silly question though. screenshot attached here