Questions tagged [windows-subsystem-for-linux]

Use this tag for questions about the Windows Subsystem for Linux, including Bash on Ubuntu on Windows and other distributions running under WSL.

Filter by
Sorted by
Tagged with
0 votes
0 answers
16 views

Connect to docker registry through SSH tunnel with WSL and Docker Desktop

I want to connect to a custom docker registry. I can reach the server only though an SSH tunnel. I establish the tunnel like this: ssh -N -L 5000:docker-server:443 user@ssh-server Then I use the ...
0 votes
0 answers
27 views

yum install : Loaded plugins: fastestmirror, ovl => docker build stops

I have this Dockerfile I try to use to docker build : FROM X/centos/python-38-centos7 USER root WORKDIR /dump_generator_api # Install the repository RPM: RUN yum install -y https://download.postgresql....
  • 101
0 votes
0 answers
44 views

Surrounding line with quotes using sed in WSL2 Ubuntu not working as expected

The command: sed -e 's/.*/\"&\",/' I tested the regex at https://sed.js.org/ and it worked correctly, so if I had input like this: George Washington, 1789-1797 John Adams, 1797-1801 ...
0 votes
1 answer
30 views

How is DISPLAY variable defined for X access on WSL?

My WSL defines the DISPLAY variable for x windows on the .profile, checking the IPs I have on the resolv.conf. Why ? If I am not wrong, resolv.conf is only used for define the DNS to use, and the ...
  • 23
-1 votes
0 answers
48 views

"systemctl start" vs "service start"

I was setting up a vsftpd server on Ubuntu running on WSL. When I used "systemctl start vsftpd" everything was working as expected. I did the same configuration on another machine which has ...
3 votes
2 answers
398 views

What is the system distribution in the Windows Subsystem for Linux (WSL)?

wsl.exe help (shown by wsl.exe --help) talks about "the system distribution": Options: ... --system Launches a shell for the system distribution. What is it? Searching in WSL ...
-4 votes
1 answer
58 views

Nohup doesn't work with my Windows syntax from WSL2

I am running Tiddlywiki as portable from OneDrive, following this tutorial. I am running this from WSL2: cd /mnt/c/Users/mobil/OneDrive/node && nohup cmd.exe /c tiddlywiki.cmd mynewwiki --...
0 votes
1 answer
40 views

Use sed to uncomments line in c++ file

I have the following lines in a file on WSL // title // ( // "line" // ) // SomeOtherTitle // ( // "otherLine" // ) I would like to use the sed command to uncomment the ...
2 votes
0 answers
50 views

Tmux display problems on WSL: panes bleed into each other on newlines

I'm trying to use tmux version 3.1c on my Windows Subsystem for Linux version 2 (WSL2) based Debian 11 container running in Docker (version 20.10.12). I build a new tmux session, but when I attach to ...
  • 21
0 votes
1 answer
132 views

Running AppImage on WSL: How to resolve error requiring FUSE?

I downloaded WSL (Windows Subsystem for Linux) and tried to run an AppImage, but received an error message that said AppImage needs FUSE to run When I tried the --appimage-extract and --appimage-...
0 votes
0 answers
54 views

NOPASSWD keeps asking for a password for a specific command

I am using win-kex on WSL2 trying to use the GUI, but I have a known connection problem, so I need to run this command before to successfully connect: sudo mount -o remount rw /tmp/.X11-unix I added ...
-3 votes
1 answer
77 views

How to set up local Windows directory in WSL correctly?

I ran this script in Windows Subsystem for Linux at the command line. I wanted to search for the latest files but I got the error message "no such file or directory", and so I wonder how do ...
0 votes
0 answers
14 views

Issue with installing mirco8ks on wsl 2

Good evening, I'm currently stuck on trying to figure out why vagrant cannot startup arrikto/minikf Here are the commands I used so far: $ vagrant init arrikto/minikf $ vagrant up However, I receive ...
0 votes
0 answers
72 views

Why is this awk program not giving me any output

I was planning on solving the first question of aoc2022, using awk, inspired by someone's idea from GitHub. I need to find the sum of elements between the blank spaces. Here's the awk program, #!/usr/...
  • 1
2 votes
0 answers
72 views

WSL2 Ubuntu won't let me grep recursively?

I can't seem to recursively search with grep for some reason in WSL2. me@SOMEHOST:~$ grep -r -e "DATASTORE_BAKs" --exclude=SOMEHOST-2\.viminfo * grep: SOMEHOST-2.viminfo: invalid context ...
  • 4,363
0 votes
3 answers
162 views

How to install and run docker with nix

I'm using Debian on WSL. Nix is already install. I install docker with this command: nix-env -iA nixpkgs.docker I want to start the daemon : systemctl start docker Failed to connect to bus: No such ...
1 vote
1 answer
81 views

Moving a file from ROOT directory resulted in loss of data

Before moving, I checked the directory and it had all the contents in it. Then I moved it to a directory in my C drive (I'm using WSL) with this command: sudo mv c_dir/ mnt/c/Users/L570/Documents/...
  • 111
0 votes
1 answer
323 views

Win-Kex launch failure 'target machine actively refused it'

I'm not quite sure what's happening, but the title has the error message that pops up after running 'kex'. In the console it tells me to either try running 'kex kill' or 'kex start' neither of which ...
2 votes
0 answers
169 views

Why is my user manager not starting up correctly?

I am running Ubuntu 22.04 on WSL2 with systemd support enabled. My configuration worked fine until two days ago. I use TMUX and its plugins tmux-resurrect and tmux-continuum, the later one already ...
1 vote
1 answer
240 views

How do I install custom fonts like xfonts on WSL/WSLg for use in GUI apps?

I try to use GUI Apps on Windows 11 via WSL and WSLg. Unfortunately my GUI app needs some custom fonts (specifically xfonts-100dpi and xfonts-75dpi). Since WSLg does not include those fonts, my GUI ...
0 votes
1 answer
130 views

Windows 11 win-kex keymap failed to compile

I recently installed win-kex on my windows 11 machine. I was working perfectly on the first launch, but for whatever reason I began getting a fatal error. It didn't really provide much elaboration on ...
2 votes
2 answers
98 views

How can I get the volume label of a windows disk in a WSL shell?

Running Ubunutu 20.04 in WSL, windows disks are mounted as /mnt/c /mnt/d /mnt/e and so on. In the bash shell, how can I get the volume label of, say, the disk at /mnt/d ? lsblk and tune2fs /mnt/d don'...
2 votes
3 answers
6k views

Reboot WSL from the console

How do reboot the current WSL instance from the WSL console? The usual 'suspects' are not working: reboot shutdown -r They fail with the messages: System has not been booted with systemd as init ...
  • 169
0 votes
1 answer
355 views

Running a command from cmd.exe using WSL

I am facing the same issue here: Passing command to bash from cmd.exe (WSL) not working Except that for me the solutions there do not work either. I have WSL installed, and I am trying to run a ...
  • 3
0 votes
1 answer
42 views

How to fix error Code bin root/go/bin not a valid identifier?

Trying to install chainlink on my laptop I had to install go. Doing so i think i have done something wrong and now i having error message each time I open ubuntu terminal which contents the following: ...
  • 101
0 votes
2 answers
250 views

WSL2 Kali-Linux Win-KeX Stopped Working Without Root

I have been able to use win-kex for a long time until today. Now I am having an issue where running kex gives me the following error: However, I am able to run sudo kex and it works fine, minus that I ...
0 votes
0 answers
54 views

find: missing argument to `-exec error [duplicate]

I have a couple of commands that allow me to create a .tar archive and then extract the files from it. I am using WSL and both commands work just fine if I enter them directly, but not if I run them ...
0 votes
0 answers
121 views

Cannot resize window of desktop app on WSL2 through X server

Running a Qt desktop app on WSL2 through X server on Windows 10, I cannot drag, resize or maximize the window. I tested with VcXsrv, Xming and MobaXterm. I also tested with Ubuntu 20.04 and 22.04. The ...
2 votes
1 answer
45 views

Can updatedb keep localpaths for removable drives that aren't plugged in?

I run updatedb like this: updatedb --localpaths="/a /b" /a is a removable drive. /b is the local hard drive. Although /a's not always accessible to me, I frequently want to run locate to ...
0 votes
1 answer
86 views

How to separate Ctrl-i from TAB in WSL?

I am using bash on WSL2 with Ubuntu, and I want Crtl-i and TAB to send different keycodes so I can remap Ctrl-i on emacs while still using TAB for indentation. I tried following the answer in this ...
1 vote
1 answer
114 views

How to change root location for wslpath?

When I am pasting a Windows path into a WSL console window, it gets translated automatically to a WSL path, e.g. C:\Windows is pasted as /mnt/c/Windows. However, this does not reflect root setting in /...
  • 205
2 votes
0 answers
221 views

WSL service logging like journald

I am running a WSL instance on my machine which starts a bunch of services like atd. What I would like to have is to have an ability to lookup the logs of a specific service like I would do using ...
1 vote
0 answers
77 views

-bash: .: filename argument required and .: usage: . filename [arguments] whenever opening new shell window (Kali Linux Rolling @ WSL)

Version Microsoft Windows [Version 10.0.22621.382] WSL Version [X] WSL 2 [ ] WSL 1 Kernel Version 5.15.57.1 Distro Version Kali Linux Rolling Other Software No response Repro Steps On Windows ...
0 votes
1 answer
64 views

I can't open a pdf file on Windows 10 that I downloaded by wget by WSL

I want to download a pdf file from a password-protected website. To do so I use wget --auth-no-challenge --http-user="username" --http-password="password" "url_to_pdf". ...
1 vote
1 answer
814 views

WSL2: Issue installing new kernel

I will preface this by saying: I don't have a lot of experience in a Linux environment. I am trying to install ROCm on WSL2 running Ubuntu. I will be using PyTorch for a class and I want to use my GPU ...
1 vote
1 answer
585 views

Connect to host machine from WSL2

Problem Can't connect to Windows X Server (VcXsrv) from WSL2 due firewall rules (sometimes it works, but sometimes it doesnt; it's very strange). Changing the firewall rules is not possible. But any ...
  • 113
3 votes
1 answer
974 views

gpg: signing failed: No such file or directory

I've been using GPG on WSL2 Debian for some time now and everything worked perfectly, but yesterday I started receiving an error about gpg signs when using git. Trying to run echo "test" | ...
-1 votes
1 answer
409 views

How to change wsl 2 kali linux non-UNICODE terminal character encoding to UNICODE terminal character?

I am trying to use Airodump-ng in WSL 2 KALI LINUX and they give me the the following warninig: Warning: Detected you are using a non-UNICODE terminal character encoding when I type $locale charmap, I ...
10 votes
5 answers
3k views

What is involved in a WSL "distribution"?

WSL allows the user to use any distribution of their choice, and Ubuntu is installed by default. I don't really understand the relevance of the distribution in the WSL context. My understanding is ...
  • 211
0 votes
0 answers
471 views

tmux in WSL with Windows Terminal: Select with mouse without holding down shift

In WSL running in windows terminal, selection with mouse works normally. However, within a tmux session, in WSL running in windows terminal, to select with mouse, Shift key must be held down. How can ...
  • 101
0 votes
0 answers
19 views

chmod adding only write permission for user [duplicate]

I am new to linux. I learnt about chmod command, and was trying to do some practice. There is a file named "a". Initially this file has no permissions for user, group, and other user. I ...
0 votes
1 answer
348 views

How to setup LAMP on WSL2?

How to setup Linux, Apache, MySQL and PHP on WSL2 (Windows 11)? I understand I need to use a tool named Docker Desktop, but what do I do after installing it?
  • 23
0 votes
1 answer
266 views

How to install DDEV on Docker on WSL 2?

I wish to install a Drupal web application on DDEV on Docker on WSL 2 and I have found the following instructions overwhelming. Is there a simpler way? The instructions I have found 1) sudo apt-get ...
  • 1
1 vote
2 answers
591 views

How do I execute a simple "apt-get update and upgrade" script using a crontab job?

I created update.sh as following: #!/bin/bash sudo apt-get update sudo apt-get upgrade echo "Updated Successfully! and created the following crontab job to run this script ...
0 votes
1 answer
48 views

Weird LS output on WSL2

Using ls or exa I get a weird output on windows subsystem for linux : Can someone point out what's wrong? I have no funny aliases here. Just running ls.
  • 489
1 vote
1 answer
76 views

Running Ubuntu on Windows (WSL) leads to SystemOutdated Error when trying to install bun

I tried to install bun https://bun.sh/ on my windows machine and use Ubuntu 20.04 on WSL. After running curl https://bun.sh/install | bash and trying to run a command I get the following error: coding@...
0 votes
0 answers
32 views

Linux Docker container on Windows host: Device Mapper "snapshot" target is missing

Take a look at this: C:\> docker run --rm -it --privileged ubuntu:focal root@4c806ae5de55:/# apt-get update ... root@4c806ae5de55:/# apt-get install dmsetup ... root@4c806ae5de55:/# dmsetup targets ...
0 votes
0 answers
33 views

running graphical/GUI on Ubuntu

Please bear with me if you find this question naïve. I'm trying to run Linux apps on Windows 10 (1803 build 17134). So I installed from Microsoft store Ubuntu 20.04. Now I don't succeed to set DISPLAY ...
0 votes
1 answer
462 views

Mounting ext4 partition in wsl leaves me with a blank drive after reboot

Mount ext4 partition as per docs. wsl --mount \\.\PHYSICALDRIVE2 --partition 1 --type ext4 Create a file: cd /mnt/wsl touch testfile la Displays: resolv.conf testfile Reboot windows Open Ubuntu ...
  • 101
1 vote
0 answers
72 views

How to install GEMMA2 (gemma2lib) on GNU Guix over Ubuntu 22.04 running via WSL2?

I'm running Windows subsystem for Linux 2 (Ubuntu 22.04). I'd like to run GEMMA2 (gemma2lib): in the link it is said: ~/opt/guix/bin/guix package -i python python-toolz -p ~/opt/gemmalib . ~/opt/...
  • 111

1
2 3 4 5
8