windows-subsystem-for-linux

Bash on Windows - alias for exe files

不问归期 提交于 2019-12-01 06:19:15
I am using the Bash on Ubuntu on Windows, the way to run bash on Windows 10. I have the Creators update installed and the Ubuntu version is 16.04. I was playing recently with things as npm, node.js and Docker and for docker I found it is possible to install it and run it in windows and just use the client part from bash, calling directly the docker.exe file from Windows's Program Files files folder. I just update my path variable to include the path to docker as PATH=$PATH:~/mnt/e/Program\ Files/Docker/ (put in .bashrc) and then I am able to run docker from bash calling docker.exe . But hey

Is Docker running within WSL or connecting back to Windows?

风格不统一 提交于 2019-11-30 19:46:07
After successfully installing Docker in WSL, if I run standard Docker commands, I get connection errors. Runing with sudo or not yields the same result in all examples. root@SUR002731165154:~# sudo docker info Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? root@SUR002731165154:~# sudo docker version Client: Version: 1.13.1 API version: 1.26 Go version: go1.7.5 Git commit: 092cba3 Built: Wed Feb 8 06:42:29 2017 OS/Arch: linux/amd64 Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? However, if I

System has not been booted with systemd as init system (PID 1). Can't operate

岁酱吖の 提交于 2019-11-30 11:18:34
问题 I'm trying to follow the Redis installation process as discuss in this article of digital occean, in WSL. The Ubuntu version installed is Ubuntu 18.04. Everything in redis installation is fine but when I tried to run this sudo systemctl start redis I got this message. System has not been booted with systemd as init system (PID 1). Can't operate. Any Idea on what should I do with that? 回答1: Instead, use: sudo service redis-server start I had the same problem, stopping/starting other services

Exec format error 32-bit executable Windows Subsystem for Linux?

大兔子大兔子 提交于 2019-11-30 05:53:46
问题 When I try to execute a 32-bit file compiled with gcc -m32 main.c -o main on Windows Subsystem for Linux , I get the following error: bash: ./main: cannot execute binary file: Exec format error . If I compile it without -m32 it runs. Any solution for running 32-bit executable on WSL ? 回答1: 32-bit ELF support isn't provided by WSL (yet). There doesn't seem to be any progress since the UserVoice was raised - you are out luck. See UserVoice: Please add 32 bit ELF support to the kernel and

Is Docker running within WSL or connecting back to Windows?

邮差的信 提交于 2019-11-30 03:52:36
问题 After successfully installing Docker in WSL, if I run standard Docker commands, I get connection errors. Runing with sudo or not yields the same result in all examples. root@SUR002731165154:~# sudo docker info Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? root@SUR002731165154:~# sudo docker version Client: Version: 1.13.1 API version: 1.26 Go version: go1.7.5 Git commit: 092cba3 Built: Wed Feb 8 06:42:29 2017 OS/Arch: linux/amd64 Cannot

Is usb supported on Bash on Ubuntu on Windows 10?

社会主义新天地 提交于 2019-11-29 21:37:15
I have no files or paths about usb on dev/ When I plug in a flash disk, nothing appears on dev/ or mnt/ or media/ about it. sudo lsusb returns: unable to initialize libusb: -99 What should i do to enable usb access on bash? Good news, it is now possible to mount USB media (including FAT formated) and network shares with drvfs on Windows 10: Mount removable media: (e.g. D:) $ sudo mkdir /mnt/d $ sudo mount -t drvfs D: /mnt/d To safely unmount $ sudo umount /mnt/d You can also mount network shares without smbfs: $ sudo mount -t drvfs '\\server\share' /mnt/share You need at least Build 16176 so

Show matplotlib plots in Ubuntu (Windows subsystem for Linux)

纵饮孤独 提交于 2019-11-29 20:08:22
So it seems on ubuntu for windows (windows subsystem for linux) people are suggesting we need to use Agg backend and just save images, not show plots. import matplotlib matplotlib.use('Agg') # no UI backend import matplotlib.pyplot as plt import numpy as np t = np.arange(0.0, 2.0, 0.01) s = 1 + np.sin(2*np.pi*t) plt.plot(t, s) plt.title('About as simple as it gets, folks') #plt.show() plt.savefig("matplotlib.png") #savefig, don't show How could we get it to where plt.show() would actually show us an image? My current option is to override plot.show() to instead just savefig a plot-148123456

Copy Paste in Bash on Ubuntu on Windows

青春壹個敷衍的年華 提交于 2019-11-29 19:42:08
How to execute a copy paste operation from Windows 10 to the Bash on Ubuntu on Windows environment? I tried the following: ctrl + shift + v right click to paste Any suggestions? Update 2019/04/16: It seems copy/paste is now officially supported in Windows build >= 17643. Take a look at Rich Turner's answer . This can be enabled through the same settings menu described below by clicking the checkbox next to "Use Ctrl+Shift+C/V as Copy/Paste". Another solution would be to enable "QuickEdit Mode" and then you can paste by right-clicking in the terminal. To enable QuickEdit Mode, right-click on

Visual Studio Code and Bash on Ubuntu on Windows (WSL) GCC/GDB integration

五迷三道 提交于 2019-11-29 16:53:51
Currently Visual Studio Code does not support debugging inside windows. How to setup vscode to use gcc/gdb from bash on windows? Here is the solution: With the release of Windows 10 Creators Update, you will now be able to use Visual Studio Code and the Microsoft C/C++ extension to debug your Windows Subsystem for Linux (WSL) Bash on Ubuntu projects. https://github.com/Microsoft/vscode-cpptools/blob/master/Documentation/Debugger/gdb/Windows%20Subsystem%20for%20Linux.md Not easily, and it might not work correctly. First, you have to get sshd running on port 2020. To do this, edit /etc/ssh/sshd

Valgrind does not work with WSL?

人走茶凉 提交于 2019-11-29 12:45:00
When I installed WSL for my computer I was very excited to have a more natively supported Linux system rather than using VirtualBox . However I get this error when I try to run it. Is there a reason why? I am happy to give more information as required. --4364:0:aspacem -1: ANON 0038000000-00383d5fff 4022272 r-x-- SmFixed d=0x000 i=25365 o=0 (0) m=0 /usr/lib/valgrind/memcheck-amd64-linux --4364:0:aspacem Valgrind: FATAL: aspacem assertion failed: --4364:0:aspacem segment_is_sane --4364:0:aspacem at m_aspacemgr/aspacemgr-linux.c:1502 (add_segment) --4364:0:aspacem Exiting now. It's definitely