A conflict between Cygwin bash and Ubuntu bash

1

0

I am working on Windows 10. I usually use bash from Cygwin but I decided to give a try to the Ubuntu bash available as the windows subsystem for Linux in Windows 10.

The problem I have is that now when I open cmd and type bash is the bash from Ubuntu the one the opens, but sometimes is bash from Cygwin what I need.

I appreciate any help on this.

AJaramillo

Posted 2018-06-01T13:14:20.837

Reputation: 11

Have noticed if there is a correlation on which bash opens and if the cmd has admin permissions? Also check your set output in cmd and tell us about the Path – dmb – 2018-06-01T13:37:34.530

instead of executing bash.exe you should be executing ubuntu.exe provided you are running 1709+ – Ramhound – 2018-06-01T13:49:15.987

@dmb I checked the path but both C:\WINDOWS\system32 and C:\cygwin64\bin; are in it. system32 is where bash.exe that opens ubuntu is located and cygwin64\bin is where cygwin bash is located. The system prioritizes system32 as expected. – AJaramillo – 2018-06-01T13:59:00.163

@Ramhound I got this message " 'ubuntu.exe' is not recognized as an internal or external command, operable program or batch file. " – AJaramillo – 2018-06-01T14:00:40.767

You have Windows 10 Version 1709 installed? The executable would be located in ..\AppData\Local\Microsoft\WindowsApps\ubuntu.exe If it still does not work you should uninstall and reinstall the Ubuntu WSL instance. Be sure you are using the Windows Store version not the legacy version if you are running 1709+. I already have an answer which describes this documentation though

– Ramhound – 2018-06-01T14:04:53.903

you could try by typing "Enviromental variables(variables de entorno)" in your Start Menu and edit the Path variable. Take out the system32 entry and try again. Yet this might break things, but you could solve it by adding it again. – dmb – 2018-06-01T14:06:22.330

The correct executable might be wsl.exe I am not at 1709+ workstation today. – Ramhound – 2018-06-01T14:10:35.773

Answers

1

When you need cygwin bash run it from Mintty aka Windows Terminal. Do not use CMD as it is anyway a not adequate Unix terminal for Cygwin process.

https://cygwin.com/cygwin-ug-net/setup-net.html#setup-icons

matzeri

Posted 2018-06-01T13:14:20.837

Reputation: 1 662