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
-3 votes
2 answers
59 views

Is there a way to emulate Windows in Linux like WSL?

My question is: Is there something like LSW (Linux subsystem for Windows) for Linux? If yes, which and how do I install it? Please avoid comments like "Why would you want to do this?" ...
  • 1
0 votes
0 answers
29 views

Recovering deleted data from Debian WSL2 after rm -r ~

I have accidentally deleted all my data from WSL2 using rm -r ~ is there any way I can recover it? Any help would be very appreciated!
0 votes
0 answers
46 views

Cant ping WSL network interface gw from one container through another one acting as router

I'll try to keep simple for the sake of demostrating the issue. Scenario Docker compose (2 services) + WSL2 Ubuntu 20.04 Service A wants to act like "Router". Has an internal network & ...
  • 29
0 votes
1 answer
55 views

Can't override a systemd unit's ConditionVirtualization on Archlinux on Distrod on WSL

I'm trying to start systemd-timesyncd on Archlinux that was installed via Distrod on top of WSL. By default systemd-timesyncd's unit file prevents it from starting up on virtualized environment, the ...
  • 143
0 votes
2 answers
74 views

How to find missing files from sequential numbering in a folder

I have folders containing DPX images and I'd like to be able to check that the the file naming is sequential. The file names can range from: Frame 0000000.dpx to Frame 9999999.dpx Folders will not ...
1 vote
1 answer
97 views

How to use custom keyboard layout in Windows and Ubuntu (WSL)?

I created a custom keyboard layout with Microsoft Keyboard Layout Creator (MSKLC) for my Windows 10 machine. The custom keyboard layout is based on the Swiss German Layout and the numbers are swapped ...
  • 133
-2 votes
2 answers
60 views

Understand PS1 environment variable

On Stackoverflow, I just saw a question concerning the PS1 environment variable, which is responsible for the Linux terminal prompt. My prompt looks as follows: username@PORT-usr:/dir username is the ...
  • 131
1 vote
1 answer
69 views

WSL2 Ubuntu - wall command

I'm trying to setup a simple script to run on a cron job that runs in the background and notifies any open terminals of the outcome using the wall command. However when testing, I don't get any output ...
1 vote
1 answer
63 views

Ubuntu on Windows Terminal Hanging After Creating an Alias for Starship Prompt

Distro: Ubuntu-18.04 (running on Windows 10 WSL2) My terminal for any new Ubuntu instance is completely frozen with the message "Vim: Warning: Output is not to a terminal" This happened ...
0 votes
0 answers
71 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
116 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
49 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
54 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
3 votes
2 answers
480 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
71 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
50 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
118 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
347 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
72 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
95 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
27 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
77 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
74 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,413
0 votes
3 answers
313 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
110 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
581 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
298 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
531 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
223 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
133 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'...
4 votes
3 answers
14k 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 ...
  • 189
0 votes
1 answer
529 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
57 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
338 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
58 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
162 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
50 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
116 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
167 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 /...
  • 215
2 votes
0 answers
271 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
106 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
87 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
1k 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
834 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 ...
  • 133
3 votes
1 answer
1k 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
482 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
550 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
443 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

1
2 3 4 5
8