Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [windows-subsystem-for-linux]

Windows Subsystem for Linux (WSL) is a compatibility layer that allows Linux ELF64 binaries to run natively on Windows 10

89
votes
5answers
135k views

How can I SSH into “Bash on Ubuntu on Windows 10”?

I have Windows 10 Anniversary Edition with "Bash on Ubuntu on Windows" installed and working. I'd like to be able to SSH into this Ubuntu instance, but although I have openssh-server installed and ...
14
votes
4answers
7k views

Where is the Linux Subsystem's filesystem located in Windows 10?

It's pretty clear that Windows' 10 "host" filesystem is mounted at /mnt/c/ from "Linux" perspective of view. But is it possible to get an access to "Linux" filesystem from Windows? If so, where it is?
113
votes
2answers
61k views

How to remove/reset Windows Subsystem for Linux on Windows Insider Build 14316

I installed the Windows Subsystem for Linux on Windows 10 Insider Preview build 14316. Now I would like to remove it or, better, revert to its factory defaults i.e. as it was when just installed. I ...
13
votes
6answers
11k views

Update Linux Subsystem on Windows (Ubuntu) to 16.04

Is there any possibility to update LXSS on Windows from 14.04 to 16.04? sudo do-release-upgrade does not work.
33
votes
4answers
26k views

Is there a way of installing Windows Subsystem for Linux on Win10 (v1709) without using the Store?

The Microsoft Store app is disabled by Group Policy by my university. I have administrator rights on my computer and I was wondering if there was a way of installing Windows Subsystem for Linux (WSL) ...
69
votes
4answers
63k views

Windows Linux Subsystem - Accessing Files outside of Ubuntu

Why, when I create a file from within Windows for example, can I not see it under the Linux sub system in Windows 10 (bash.exe) The screenshot should explain. Folder: OMG was created from within ...
89
votes
2answers
107k views

How to access Windows folders from Bash on Ubuntu on Windows

On the Bash on Ubuntu on Windows app, I only have root@localhost:~# ls -a .bash_history .bashrc .profile How do I access all of the Windows folders like Documents, Downloads, etc.?
28
votes
2answers
4k views

Where is the Ubuntu console on Windows10? [duplicate]

I updated my Windows 10 system to the 1607 "Anniversary Update" version and I can't find the Ubuntu Bash console. So... Where is it?
14
votes
2answers
6k views

How to backup (WSL) Linux Subsystem for Windows 10, before system reset or reinstall?

My problem is that I have to reset or reinstall windows because of some problems but I spent a lot of time to configure WSL for development and don't want to lose it. Is there any way of backing up ...
21
votes
2answers
13k views

sudo on Windows 10 Linux subsystem cannot resolve local machine name

I installed Windows 10 Anniversary update and the Linux subsystem. When running anything with sudo it takes ages and then I get this error message: sudo: unable to resolve host MYMACHINE How to ...
5
votes
3answers
7k views

Internet access not working in Windows Subsystem for Linux

I tried sudo apt-get update in the new Windows Subsystem for Linux, but I get the following error: The most relevant parts seem to be the "could not resolve" lines about Ubuntu servers, like: Could ...
2
votes
1answer
6k views

Running Win32 program from Bash for Windows 10

I got the latest update from Windows that adds bash, and I was trying to script the execution of an Android emulator through this; however the Path variables of Windows are not taken into account for ...
33
votes
3answers
26k views

Accessing removable media in Bash on Windows

Is there a way to access removable media (e.g. thumb drives or SD cards) from within Bash on Windows? Bash on Windows uses DriveFs to mount fixed drives in the /mnt folder, but it doesn't ...
18
votes
3answers
25k views

How to run Ubuntu service on Windows (at startup)?

I want to launch an SSH server on Linux subsystem (Bash on Ubuntu on Windows) at windows startup. The problem is that all Linux processes are terminated when Bash window is closed. Is there a way to ...
34
votes
3answers
29k views

How to access network mounted drive on Windows Linux Subsystem?

I have a samba drive which is mounted on my local windows computer. I have a "/mnt/c" drive in WLS ("Windows 10 bash"), but no "/mnt/z". Is there a way to access it somehow? Can I remount it in WLS?
40
votes
6answers
37k views

How to access linux/Ubuntu files from Windows 10 WSL?

This question answers how to access Windows files from Ubuntu Bash, but how can I do the opposite? Specifically, I need to access my SSH key from Windows which is located at /home/mark/.ssh/id_rsa ...
4
votes
4answers
2k views

Associate SH scripts to Windows bash

How can I associate all .sh files to new BASH included in Windows 10 Anniversary update? I have tried associating .sh file using default system prompt to C:\Windows\System32\bash.exe but it just ...
8
votes
3answers
5k views

How can I “open” a file from WSL with the default application?

Most systems provide an open command (alternately known as start, cygstart, xdg-open etc.) which opens a file in the desktop environment's "default" application, whatever that is. For example, from ...
2
votes
1answer
2k views

Can I drag and drop files to an .sh script using Bash on Ubuntu on Windows or Windows Subsystem for Linux (WSL)?

I want to pass multiple files as parameters of an .sh script in Windows 10 by simply dragging them over the script file; is this possible?
4
votes
1answer
3k views

How to change the default user name in WSL?

Many websites says I should use lxrun /setdefaultuser, but this command is deprecated: C:\WINDOWS\system32>lxrun /setdefaultuser foo Warning: lyrun.exe is only used to configure the legacy ...
2
votes
1answer
925 views

Arch on WSL: libQt5Core.so.5 not found, despite being installed

I was hit by some hardcore power-tripping forum mods on the Arch Linux forum, so here I am. I'm trying to run GUI apps on WSL, such as dolphin or kate. However, none of them can find libQt5Core.so.5, ...
6
votes
1answer
1k views

Can you install any other distros in Win10's “Windows Subsystem for Linux”?

In "Install the Linux Subsystem on Windows Server", Microsoft mentions three distributions that are officially provided: Debian, Kali, Ubuntu, OpenSUSE, and SLES. Since we have Debian-based and ...
4
votes
1answer
1k views

npm commands not working on WSL with zsh

I've recently started using WSL, I've installed zsh and done some config. I am however unable to use npm commands in the WSL bash window. I can happily use npm in Git Bash Cygwin, Command Prompt, etc....
3
votes
2answers
2k views

Adding Bash on Ubuntu on Windows 10 to Explorer Context Menu (Issues)

I have successfully added the Bash on Ubuntu prompt to the context menu by adding the following registry keys [HKEY_CLASSES_ROOT\Directory\shell\bash] @="Bash Here" [HKEY_CLASSES_ROOT\Directory\shell\...
1
vote
1answer
219 views

Running dangerous linux commands in bash enviroment on Windows

What would happen if I ran sudo -rm -rf /* --no-preserve-root in the bash shell that you can enable on windows proof of shell:
30
votes
4answers
17k views

Can I upgrade my existing Ubuntu installation in WSL from 16.04 to 18.04?

I'm currently running Ubuntu 16.04 in WSL (Windows 10 v1709 or later), installed using lxrun. Can I upgrade it to 18.04? If so, how? If not, when?
30
votes
6answers
59k views

How do you change the color scheme in bash on Ubuntu for Windows?

I've tried to create color schemes with https://terminal.sexy and http://ciembor.github.io/4bit/ but I can't get any of their exports to work with bash on Ubuntu on Windows. What's the correct ...
49
votes
6answers
35k views

Windows 10 build 14316: Ctrl + v doesn't work on Bash on Ubuntu on Windows

On the new Windows 10 insider build 14316, I haven't been able to use Ctrl + V (shortcut for paste) on the new Bash on Ubunbu on Windows app. Has anybody else had this issue? Any solutions? I have ...
30
votes
4answers
13k views

How to disable Bash on Windows notification sound effect

When running 'Bash on Ubuntu on Windows' it often generates the Windows notification sound while typing. Common causes are when: I use auto-complete for commands (tab) and there are multiple command ...
30
votes
5answers
32k views

Rebooting Ubuntu on Windows without rebooting Windows?

Is it possible to reboot the Ubuntu sub-system without restarting my system? I tried to use the shutdown command after installing some updates, but that doesn't seem to be an option here.
11
votes
3answers
11k views

Windows 10 bash and mintty

I just installed the new Linux subsystem in Windows 10. It's really nice to have access to the Ubuntu repositories, but I absolutely HATE the default cmd program. Cygwin's MinTTY is really nice and ...
7
votes
3answers
17k views

How to sign into “root” account by default on Windows Subsystem for Linux Bash terminal

Windows 10's Anniversary Update just came out and I immediately installed the Windows Subsystem for Linux to see how it fares. I found only one major shortcoming so far: there was no obvious way to ...
3
votes
1answer
3k views

Installing mDNS resolver in Bash on Windows Subsystem for Linux

I am trying to connect to a PC over mDNS from a Bash script running on Windows. While I am able to ping the PC through its mDNS .local address in CMD, doing the same in an Ubuntu/Bash window fails due ...
2
votes
4answers
3k views

Windows Subsystem Linux - Make VIM use the clipboard?

To get this off the table now and avoid any confusion ... This is for Linux running in Windows 10(ubunutu), also known as WSL. Its not the same as cygwin and windows or stand alone linux. It is it's ...
39
votes
3answers
16k views

Where is the C drive in the WSL? [duplicate]

Whenever I try to login to bash using the Windows Subsystem for Linux, I try to cd into C:\Users\, but all I get is directory not found. Where is the C drive for the Windows Linux subsystem? Is it ...
15
votes
3answers
36k views

How to SSH into WSL

Long-time reader, first-time question-asker. I followed the instructions in this answer: How can I SSH into “Bash on Ubuntu on Windows 10”? I'm attempting to SSH from PuTTY in Windows on the same ...
9
votes
3answers
5k views

How to change default shell for Linux susbsystem for Windows

I've installed Linux subsystem for Windows 10. It works fine, but I want to change the default shell environment for the subsystem. I did sudo apt-get install fish and then chsh -s /usr/bin/fish. ...
1
vote
1answer
6k views

Associating linux shell (.sh) scripts on Windows 10 to Bash or WSL [duplicate]

If you ever tried to run an .sh linux script on Windows 10 by double-clicking it, after assigning it to bash.exe (Ubuntu Bash for Windows 10) by default, you most likely noticed it wouldn't open. Why ...
15
votes
4answers
14k views

Where is the Windows bash directory in Windows?

I've installed the Windows 10 Anniversary Update on my computer. I would like to know where the /root directory in Bash prompt is within Windows? I would like to be able to write files in Bash that ...
14
votes
2answers
15k views

Can't ping in Bash on Windows

When I try to run: ping www.google.com I get the following error: ping: icmp open socket: Permission denied Running with sudo doesn't make a difference.
5
votes
1answer
1k views

How can I access case-sensitive paths on Windows (created with Bash-on-Ubuntu-on-Windows)?

Bash-on-Ubuntu-on-Windows supports case-sensitive file paths. This means that I can create two files or directories with names only differing in capitalization. I have issues accessing those files, ...
5
votes
4answers
6k views

Ubuntu on Windows 10 - SSH “Permissions xxxx for private key are too open

I have .pem file located on local disk C "c/private-key.pem" And I have a soft link to it on Ubuntu subsystem "~/.ssh/private-key.pem -> /mnt/c/private-key.pem" And when I'm trying to shh some remote ...
3
votes
1answer
746 views

Why are WSL GUI apps rendered with blurry fonts with Xming?

When I try to use Xming with WSL to run GUI programs, I see fonts with grayscale anti-aliasing, like with Firefox as you can see here: This happens with every distro I've tried (Arch and Ubuntu), and ...
2
votes
1answer
2k views

Can I move the linux subsystem to a different drive?

My C: is a small solid state that's already filling up. I'd like to move WLS to my D: or E: drive. Is this possible? I imagine I'd have to uninstall then reinstall in order to move it. I'm ok with ...
2
votes
2answers
2k views

How to make WSL run services at startup

After searching this site and various Q, it is clear that services and systemd is not available for WSL. I need to run a program in WSL every time I start my PC so I read this page on how to use ...
2
votes
2answers
4k views

Bash doesn't work after Windows 10 update

Today I reset Windows 10. I first activated Windows a year ago. I recently created a bootable USB flash drive using Windows 10 Media Creation Tool (I have Windows 10 pro). After the installation I ...
0
votes
2answers
1k views

Open file with bash on Windows

I have neovim installed in the WSL. To access it, I open ConEmu, which is set up to use the WSL Bash by default as soon as it opens On Windows there are often times where I want to make some quick ...
0
votes
1answer
2k views

Windows Subsystem for Linux sources.list

Where is the sources.list file in Windows 10 version 1607 (Anniversary Update)? I can get it to it just fine from the cmd > bash > sudo nano /etc/apt/sources.list but I can't seem to find this file ...
4
votes
3answers
4k views

Unable to change file permissions on Ubuntu Bash for Windows 10

I was trying to use an ssh instance and I recieved this error: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: UNPROTECTED PRIVATE KEY FILE! @ @@@@@@@@@@@@@@@@@...
2
votes
1answer
695 views

Accessing Ubuntu data (like “/etc”) from Windows

I'm using Ubuntu from the Windows Store. When I use a terminal command like "find", I see that it also lists files from my Windows drive. So Ubuntu can access the Windows file system which is ...