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
25 votes
8 answers
56k views

WSL - DNS not working when connected to VPN

I've used WSL Bash/Ubuntu for several years, but for some reason this problem recently appeared. DNS is unable to resolve any names, both internal and external. The first time I re-installed WSL I ...
  • 391
25 votes
2 answers
24k views

How can I access UNC paths using the Windows Subsystem for Linux?

I have downloaded BASH for Windows 10. How would I navigate to a network address as I would in a Windows environment? I have seen SAMBA mentioned and have downloaded smbclient. I have tried: ...
22 votes
6 answers
37k views

WSL 2 does not have /lib/modules/

I have the source code of a hello world kernel module that works in Ubuntu 20 in a laptop. Now I am trying to compile the same code in Ubuntu 20 but inside WSL2. For that I am using this: make -C /sys/...
16 votes
3 answers
12k views

rsync hangs after a few transferred files (Bash for Windows to FreeBSD)

I'm using "Bash on Ubuntu on Windows", from a Windows 10 Pro PC, to backup my media library to a FreeBSD server that acts as my NAS (it runs NAS4Free). This used to work perfectly but it recently ...
  • 263
14 votes
3 answers
5k views

Use shift-Insert to paste in WSL

# When I do just Shift-Insert, I get ~$ 2~ # When I do Ctrl-V, then Shift-Insert, I get ~$ ^[[2;2~ Shift-insert works well in other situations, like Windows CMD or Git-Bash In wsl, I can use Ctrl-...
  • 1,205
13 votes
2 answers
9k views

Passing command to bash from cmd.exe (WSL) not working

I'm on a Windows 10 machine with Windows Subsystem for Linux enabled/configured (Ubuntu). To explain my problem let me present you with two scenarios: Scenario 1: I start a cmd.exe prompt I run bash ...
  • 351
11 votes
2 answers
3k views

/dev/random EXTREMELY slow in Ubuntu for Windows 10 (WSL)

I am using Ubuntu 20.04 for Windows 10 (WSL2) on a Haswell laptop and I am getting about 0.6 bytes per second. As in 6 bytes total after 10 seconds of waiting. This is unacceptable. What is the ...
  • 248
11 votes
1 answer
6k views

I edited a Linux file with a Windows program while using the Windows Subsystem for Linux, and now I can't access it any more

I'm using Bash on Ubuntu on Windows or another Linux distribution within the Windows Subsystem for Linux and I've edited a Linux file inside the lxss directory with a Windows editor. Now whenever I ...
11 votes
2 answers
27k views

Docker service not starting on new WSL2

Im trying to start docker in the brand new WSL2 with the following command : sudo service docker start then: sudo service docker status result : * Docker is running BUT on running the test ...
11 votes
3 answers
730 views

Shell dropping every other character of input

I manage software on a bunch of RHEL 6.10 VMs, typically either as a service account or root using sudo -i. Periodically, my shell starts dropping every other character. For example, if I type cd /usr/...
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
10 votes
4 answers
2k views

How do I make a shortcut to a path using two tilde characters '~~' (or similar) in WSL/Ubuntu/Bash? [duplicate]

I'm a newbie to Ubuntu/Linux world, so don't be hard on me. I'm using Ubuntu on Windows with WSL2 and the bash shell. Sometimes I want to copy files from Windows to Ubuntu or the other way around. I ...
  • 203
9 votes
1 answer
2k views

How do I make my pc speaker beep in WSL?

How can I make ring the bell from command line using WSL (2)? I tried: beep echo -ne '\007' echo -e "\a" I have set bellstyle none in /etc/inputrc. Using Ubuntu 18.04 image.
  • 240
8 votes
8 answers
6k views

Windows subsystem for linux - share ssh-agent?

I am running Ubuntu 16.04 within a Windows Subsystem for Linux (WSL) shell on Windows 10. From within a terminal I can start ssh-agent and use it many times over the life of that terminal. I can see ...
  • 181
7 votes
7 answers
4k views

How to run windows executables from terminal without the explicitly specifying the .exe extension?

As the title says most of the question, how can we run windows executables without specifying the explicit .exe suffix at the end. For example reducing the call like explorer.exe . to explorer ., or ...
7 votes
1 answer
22k views

Permission denied when trying to 'mv' a directory [closed]

Situation: I am using Bash with Linux subsystem for Windows(10); I am logged in as root. All folders and files in my current directory have rwxrwxrwx, and the same is true for descendant files and ...
  • 73
6 votes
2 answers
40k views

How do I access my Windows Desktop directory from inside Windows Subsystem for Linux? [closed]

I am using Ubuntu for my terminal. I am unable to access my Desktop and when I type "ls" nothing shows up. How do I log in via desktop environment in order to access my desktop files? huque@RNB:~$ ...
user avatar
6 votes
7 answers
29k views

Not able to initialize GUI for kali linux in wsl 2?

This error message is being displayed: TigerVNC Viewer 32-bit v1.10.80 Built on: 2020-06-15 22:33 Copyright (C) 1999-2020 TigerVNC Team and many others (see README.rst) See https://www.tigervnc.org ...
6 votes
1 answer
10k views

site-packages directory not found after installing pip3 with apt-get in Ubuntu WSL

I installed python 3 and pip into in Windows System for Linux shell, but it appears I have to find and specify site-packages directory manually if I want to run any python package executables. The ...
  • 171
6 votes
1 answer
5k views

Ubuntu for Windows -- Can't open PDF files via xdg-open

My default application for opening PDF files is Adobe Acrobat XI Pro. I would like to be able to open PDF files using this program via the Windows Subsystem for Linux. Currently when I run xdg-open ...
  • 161
5 votes
3 answers
3k views

Very slow auto-completion in Linux for Windows

For some reason auto-completion is very slow for me in WSL, it always takes several seconds display the result of, for example ll ~/Te<tab> (which would, after 2-3 seconds, print ll ~/Temp). I'...
  • 1,798
5 votes
1 answer
785 views

Is it possible to mount associated path to WSL?

I used subst R: . for a faster way to access a folder. Is it possible to mount the R: "drive" to WSL? When I try running sudo mkdir /mnt/r then sudo mount -t ntfs R: /mnt/r, I am met with ...
5 votes
1 answer
666 views

Attempting to run a regular tunnel in Debian version 9.5 Linux

I entered the following line in the modules.conf file under the /etc/modules-load.d/modules.conf path: alias char-major-10-200 tun And then I typed the following command from the Debian 9.5 Linux ...
user avatar
5 votes
0 answers
652 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
5 votes
3 answers
6k views

sudo not working on Kali running under WSL

I've installed WSL 2 and used Kali (previously had version 1.0). In both versions I have an issue - I cannot use sudo. As soon as I execute it, I get: Sorry, try again. Sorry, try again. sudo: 3 ...
4 votes
2 answers
1k views

Match Exec failing to execute anything

Testing out the SSH Match Exec feature. I have this minimal ~/.ssh/config: Match Exec echo ServerAliveInterval 60 and I am running ssh localhost I get Unable to execute 'echo': No such file ...
  • 281
4 votes
3 answers
14k views

How am I supposed to use Bash on Ubuntu on Windows environment?

I've used Ubuntu on VirtualBox for a while. Since I've upgraded to Windows 10, I thought it could be a good occasion to simplify my work and use the Ubuntu on Windows (the Unix command) you can ...
4 votes
3 answers
6k views

`ls` Attemptes to list nonexisting symbolic links on WSL

I have clean installed windows 10 (build 1803). I have installed Ubuntu from the Microsoft Store and enabled Linux subsystem. I have done this several times in the past, and never have I had the ...
  • 205
4 votes
1 answer
788 views

SSH linux subsystem windows 10

I can ssh the linux inside my windows 10, I usually use securecrt and I configured port 9999 , however once close the bash terminal, the SSH terminated and I get The remote system refused the ...
  • 67
4 votes
3 answers
8k views

lsmod gives error: "could not get list of modules" on Debian running on WSL

When I run lsmod or sudo lsmod, I get an error that says: libkmod: ERROR ../libkmod/libkmod-module.c:1655 kmod_module_new_from_loaded: could not open /proc/modules: No such file or directory Error: ...
4 votes
1 answer
5k views

modprobe: FATAL: Module cifs not found in directory /lib/modules/4.4.0-19041-Microsoft

I experienced the following error while running sudo mount -t cifs //xx.xx.x.xx/shares /xxx -o guest in Windows Subsystem for Linux. mount error: cifs filesystem not supported by the system mount ...
  • 149
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
4 votes
1 answer
2k views

hostnamectl command causes Failed to create bus connection: No such file or directory

I'm following this guide and I'm running into issues. https://www.tecmint.com/initial-ubuntu-server-setup-guide/ I am trying to create a linux machine in Ubuntu in wsl2 and then rename it using ...
4 votes
5 answers
23k views

Editing text files in WSL with Notepad++

I use WSL (Windows Subsystem for Linux) with Debian, which provides a simple cmd interface. I'd like to open files in Notepad++, which is installed on the Windows side of this PC. is this possible? ...
4 votes
1 answer
3k views

Monitor SSH attempts in Windows Subsystem Linux

I am trying to look at failed SSH attempts, which I could do on a regular ubuntu machine by looking at /var/log/auth.log. I've taken a look at Debian - auth.log missing from /var/log and the WSL has ...
4 votes
3 answers
3k views

Open file behavior using Ranger in Windows Subsystem for Linux

I am using Microsoft Windows ([Version 10.0.15063]) subsystem for Linux and observe an unexpected behavior when opening files using Ranger file manager in bash. For example, I have ~/.config/rifle....
  • 141
4 votes
1 answer
1k views

Run existing OS from Dualboot as WSL

I have an existing Dualboot-Setup with Windows 11 and Arch Linux, managed by grub. Is it possible to use my Arch System as WSL in Windows? $ lsblk -f NAME FSTYPE FSVER LABEL UUID ...
  • 514
4 votes
1 answer
661 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 ...
  • 819
4 votes
1 answer
1k views

Way to bind ALT-F4 to exit in Bash (Bash on Ubuntu on Windows)

Really simple question. I know I can exit bash with "exit", CTRL-D, etc, and yes I know I'm using a Linux (sub)system, but when I'm on windows ALT-F4 is second nature. Naturally, I'm on windows when ...
3 votes
3 answers
4k views

Kali Linux on WSL break after upgrade

so my problem is as follows. I install Kali Linux from the wsl store with $wsl --install -d kali-linux. Following has been installed PRETTY_NAME="Kali GNU/Linux Rolling" NAME="Kali GNU/...
  • 33
3 votes
2 answers
487 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 ...
3 votes
1 answer
1k 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? ...
  • 95.8k
3 votes
1 answer
871 views

Why does my date output have "STD" as the time zone?

When I run date on my Ubuntu under WSL, it prints: Wed May 15 19:33:37 STD 2019 Why does this have the string STD in it? I can't find a timezone online with the abbreviation STD (for example here) ...
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" | ...
3 votes
1 answer
6k views

What is tar error message " Cannot open: Invalid argument"

I download xcrysden source package from here http://www.xcrysden.org/download/xcrysden-1.5.60.tar.gz Then I extract it using tar zxvf xcrysden-1.5.60.tar.gz However, I got several errors, as tar ...
  • 683
3 votes
3 answers
2k views

How to start a service in a WSL-based Fedora?

I have a Fedora 33 under Windows Subsystem for Linux 2. I want to run sshd. For that I tried $ sudo systemctl start sshd but I got the error message System has not been booted with systemd as init ...
  • 794
3 votes
2 answers
10k views

"modprobe fuse" on WSL?

Trying to use veracrypt (console) in WSL. I make a volume, seems to work OK... but when I try to mount it: Done: 100.000% Speed: 5.0 MiB/s Left: 0 s The VeraCrypt volume has been successfully ...
  • 1,072
3 votes
1 answer
1k views

Package manager says I have the latest version but there is a newer one

I'm trying to to install libgsf-1-114 package which according to the packages.ubuntu the latest version is 1.14.45-1. Currently I have version 1.14.36-1: apt list libgsf-1-114 Listing... Done libgsf-...
  • 287
3 votes
3 answers
2k views

How to set `$CHROME_EXECUTABLE` in WSL2 for windows chrome

I'm trying to use the Windows chrome executable through WSL2 (for reference, Flutter looks at $CHROME_EXECUTABLE to launch web apps in chrome). In my bashrc I have the following: export ...
3 votes
1 answer
6k views

"bind: Address already in use" when creating bridge on Linux for Windows

On Bash for Windows (WSL), I'm trying to create an SSH bridge, using the following command: ssh -l ubuntu -L 15555:<ip1>:22 <ip2> but I'm getting an error bind: Address already in use at ...
  • 1,798

1
2 3 4 5
8