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
2 votes
1 answer
24 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
23 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
24 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
-1 votes
0 answers
31 views

How to access an SFTP in python in WSL?

I'm testing how to connect an sftp through python. import pysftp host = 'fnord' port = 22 username = 'fnord' password= 'fnord' try: conn = pysftp.Connection(host=host,port=port,username=username, ...
-4 votes
0 answers
38 views

Problem running Kali in WSL

I've stuck in this problem. I've just install kali linux app in windows 10 and try to run it. After the installation while upgrading it shows this problem plz help me.
1 vote
0 answers
30 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
30 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
27 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
104 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 ...
0 votes
0 answers
18 views

how to add wsl2 ubuntu distro in the context menu in the windows 10 [closed]

I am trying to use the wsl2 ubuntu distro in the context menu in windows 10. I tried some solutions but they opened the ubuntu in the installation folder. I want to use git in Ubuntu for my ...
1 vote
1 answer
31 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
0 votes
1 answer
154 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
84 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
114 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
61 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?
  • 13
0 votes
1 answer
77 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
0 votes
2 answers
98 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
41 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.
  • 459
1 vote
1 answer
51 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
17 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
29 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
55 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
50 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 vote
1 answer
306 views

Can't access WSL installation from LAN

I am running Ubuntu 20.04 through WSL2 (Linux version 5.10.16.3-microsoft-standard-WSL2). I am running a react-js application on the WSL installation, and I am able to view the webpage from Windows ...
0 votes
1 answer
30 views

tmux in docker not adjusting for changes in window size when launched via runuser

My dev environment is a docker instance running tmux 3.1c, usually from within a Windows Terminal. The launch script creates a new user account with the hostname $USER and matching uid/gid values so ...
  • 3,929
0 votes
0 answers
17 views

chmod 014 directory listing permissions [duplicate]

Say I login as root and create a directory > mkdir /mydir Now I create a group mygroup > groupadd mygroup Then I add a user someuser to the group mygroup > usermod -a -G mygroup someuser ...
0 votes
1 answer
302 views

Serial port to COM port - no output found

I am using Ubuntu WSL1 in Windows. I want to find my serial port which is currently connected on COM4 and I am running this command: dmesg | grep tty, dmesg | egrep tty, setserial commands, but ...
1 vote
0 answers
142 views

TAB completion not working for mounted partition

I'm used to mount a Windows partition (G) into my Windows Subsystem for Linux (running Ubuntu 20.04) by giving the following commands: sudo mkdir /mnt/g sudo mount -t drvfs G: /mnt/g Unfortunately, ...
1 vote
1 answer
149 views

Finding the 'tools' filesystem mounted on /init in WSL2

I have been using linux for a couple of years now, and thought I'd give WSL2 a try. Something that surprised me was how I could run Windows PE binaries (*.exe files) 'just so'. A bit of research led ...
5 votes
0 answers
226 views

Ubuntu ls doesn't show all the files, but when I "ls filename", it shows up? [closed]

I am using PHP 7.3 to move some files around, in a larger app. The PHP 7 is running on Ubuntu 20.04.4 in a wsl2 container in Windows 10. On reading through other questions, it seems this is probably ...
  • 51
3 votes
1 answer
519 views

Portable Linux emulator on Windows?

In a Windows computer where you don't have permission to install software, does Windows Linux subsystem, cygwin or any complete or partial Linux shell, utility or API emulator have portable versions? ...
  • 92.6k
0 votes
1 answer
975 views

Run Wireguard as a client on Win10 with WSL2

When attempting to run a Wireguard client in a Docker container or on WSL2 itself you will run into issues such as: 2022-04-27 17:15:45,035 DEBG 'start-script' stderr output: [#] ip -4 rule add table ...
0 votes
1 answer
2k views

usbip: error: Attach Request for <busid> failed - Device busy (exported)

I have attached and detached my USB webcam to/from Ubuntu 20.04 in WSL2 with usbipd-win using the instructions in Connect USB Devices. From PowerShell: usbipd wsl attach --busid 2-4 Once I'm done, I ...
2 votes
1 answer
98 views

How to avoid Bash printf error when printing certain hexa values: Input/output error

I'm using the command printf of bash on Ubuntu under WSL. I'm trying to use this documented syntax \xHH byte with hexadecimal value HH (1 to 2 digits) This works for printf "\x0A" (...
  • 335
1 vote
0 answers
661 views

why when i run filezilla i get this Error: Unable to initialize GTK+, is DISPLAY set properly? in Ubuntu terminal on windows 10

Am trying to upload some files from desktop into my digitalocean droplet account, but in other to transfer file i needed to install filezilla to make the file transfer, After installed the app on my ...
  • 111
0 votes
1 answer
151 views

How to run bash on Cryptomator volume on WSL

My PC's OS is Windows 10, where I am hosting a Cryptomator volume on E: . I want to run bash commands on the contents of that mounted volume, thus, I am trying to access its contents with WSL. It ...
  • 113
2 votes
2 answers
123 views

Environment variable with command substitution isn't getting set correctly

I'm using Windows 10 WSL (Ubuntu 20.04) and trying to get a command working but having trouble with setting an environment variable. I need to run: export ADB_SERVER_SOCKET=tcp:<variable ip here>...
1 vote
0 answers
128 views

Why does cat command only read from stdin?

I'm trying to figure out why my cat command refuses to acknowledge the file I provide. I know that cat ignores filenames when they are absent or a - is provided, but I am not doing either of those ...
0 votes
1 answer
2k views

Can't install anything using snap in ubuntu

So, I was trying to install VS Code: sudo snap install code --classic But I got the following error: error: cannot communicate with server: Post http://localhost/v2/snaps/code: dial unix /run/snapd....
0 votes
0 answers
383 views

How can I speed up my lftp uploads when I'm mirroring?

Here's my script: #! /usr/bin/bash set -xe local_path="${1-./}" lftp -u user,pass host << EOF set ftp:ssl-allow yes set ftp:ssl-protect-data yes set ftp:ssl-protect-list yes set ftp:...
4 votes
0 answers
197 views

execvp: /bin/bash: Argument list too long on Ubuntu 20.04 but OK on Ubuntu 18.04 (all using Windows 10 subsysem)

I bought a new windows 10 PC and installed WSL 2 using (as admin) wsl --install This installed WSL 2 with Ubuntu 20.04 LTS. I then copied my files from the old PC which was using same windows 10 pro ...
  • 779
1 vote
1 answer
140 views

New to WSL, trying to install Debian with GUI

I am a Linux old-timer, less familiar with Windows, although I've been using Windows since it was MS-DOS. I just bought a new Windows 11 computer and am trying to install Debian in the WSL with GUI ...
0 votes
0 answers
114 views

WSL sudo apt trying to use windows file paths

I have a few day old install of WSL using Ubuntu 20.04.4 LTS (Focal Fossa). I am trying to fix some package issues I was experiencing (specifically gradle) and I'm not finding that sudo apt --fix-...
  • 101
-3 votes
1 answer
215 views

If Microsoft is pushing systemd so hard, then why do I restart my services in Ubuntu 18.04 LTS WSL using System V? [closed]

I had to restart my apache2 server in WSL yesterday, and I was surprised that I couldn't use systemctl like I do on Ubuntu; instead having to revert to sudo /etc/init.d/apache2 restart. But I thought ...
  • 4,249
1 vote
1 answer
57 views

Videos and Images with proper extension

I recently imported my pictures (and videos) from iPhone to Windows 10. For some strange reason, a lot of the images and videos had their file extensions switched. i.e. 2022_001.mov is actually an ...
  • 39
-6 votes
1 answer
310 views

'/mnt/c$: No such file or directory' when running Kali with WSL [closed]

I'm running /mnt/c$ curl https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb > msfinstall && chmod 755 msfinstall ...
-1 votes
1 answer
50 views

WSL make multiple copies of a file

I want to make multiple copies of a file. I found a readily available solution and I tried. Surprisingly it did not work. Code: for i in {1,2,3,4}; do cp MainFile.asy 'CopyFile_$i.asy'; done Present ...
  • 103
0 votes
1 answer
66 views

In WSL console, how do you read and write to the clipboard?

How do you access the (windows) clipboard in WSL so that you can pipe it into commands, use it as stdin, etc.? There's more than enough answers about how to write to the clipboard. But I couldn't find ...

1
2 3 4 5
7