Windows 10 to add Linux shell. Ubuntu available at the Windows store.

Lucky Day

Daywatch
Joined
October 19, 2006
Messages
5,215
Location
The Uncanny Valley
This isn't as shocking as it seems

https://www.theverge.com/2016/3/30/11331014/microsoft-windows-linux-ubuntu-bash

https://www.microsoft.com/en-us/p/ubuntu/9nblggh4msv6?activetab=pivot:overviewtab

A number of years ago, rather than fighting the obvious at the high end server end, MS partnered with Novell and their SUSE for better communication. Thanks to that we have much better communication with the MS file systems.

Now as Docker and other VM like systems become more ubiquitous MS has been finding themselves running behind as their powershell does not seem to be catching on with users as even a bash shell. Heck, the Apple has been ahead of MS for years in this category since they imported Job's OS.

The other indicator is Mono/Xamarin and .Net Core as MS has been rewriting .Net from the ground up to not be so proprietary.
 
Joined
Oct 19, 2006
Messages
5,215
Location
The Uncanny Valley
That’s nice, I can use it on my work laptop. Being able to run bash natively is a boon.
At home I already have bash, as I am running Linux. The only motivation to start up Windows is for a game that doesn’t run on Linux or to sync my iPad.
 
Joined
Aug 30, 2006
Messages
11,223
Yeah, I've got to the point where I'm really not up to speed on how to do things in Windows anymore.
 
Joined
Nov 8, 2014
Messages
12,085
Installed it and it really is an actual headless version of Ubuntu. It has seamless integration with my keyboard, mouse, internet and windows drives. It acts the same as a terminal version of Ubuntu would in a virtual machine, except that it doesn't feel like a virtual machine.

Besides that, in a command window of Windows, you can type 'ubuntu' or 'bash' and it switches seamless to the ubuntu CLI in the same window. This allows you to switch back and forth between the two.

If all you need is the CLI of Ubuntu, this looks to be a much better option than using a VM.
 
Last edited:
Joined
Aug 30, 2006
Messages
11,223
Title of the thread is a bit misleading, WSL's been available for about 3 years now, and the article linked is from 2016. In the news this week has been the fact that there's a WSL v2 coming soon that's improved in a lot of ways.

Anyway, if you just want a bash shell and UNIX tools in Windows, Cygwin's been around for many more years than WSL and, for many purposes, is actually higher performance and better integrated with Windows than WSL is, since it's just a POSIX API implemented in Windows rather than a Linux kernel running within the Windows kernel. Both have their pros and cons though, depends on what you want to do.
 
Joined
Sep 26, 2007
Messages
3,469
They both allow to run Linux commands, but the two solutions are very different as you indicated. Cygwin can’t run Linux applications natively, but it allows to build a POSIX compliant application from source and run it as a Windows application. If that is what someone wants to do, it is the right choice.
WSL can’t do that, but it can run Linux applications natively and you can do Linux development with it, which is what I want to do, without the need for using a VM.
I would expect that WSL will not be as fast as Cygwin, but for what I tried now it looks to be fast enough.
 
Joined
Aug 30, 2006
Messages
11,223
I would argue that saying "Cygwin can’t run Linux applications natively" is a bit deceptive, though. The pre-req for running a Linux application is normally either (1) installing a package from your distro, or (2) building it from source. Cygwin provides packages for tons of open source software just like any Linux distro would, and you can typically build programs written for Linux and run them under Cygwin just as you would if you were running Linux. Sure, you can't literally run a Linux binary under Cygwin, but binaries usually break even when just moving between different Linux distros - it's assumed you'll rebuild from source, or download a package where someone's done it for you. In actual practice, the main difference is that if you have proprietary software written for Linux, where source code isn't available, you won't be able to run it under Cygwin.

On a separate note, it's also worth mentioning that you can run GUI programs in WSL too, it's not limited to just CLI. You just need to be running an X server on your Windows machine, like Xming or Cygwin's X server. I played with that a year or two ago, and I believe I used Xming.
 
Joined
Sep 26, 2007
Messages
3,469
Pity in some ways because linux gui is so much more powerful than MS; but at least you can use bash et all.
--
I wonder if part of this motivation to embrace linux is due to their cloud focus.Truth be told most cloud tools work a lot better under linux (or unix in general) than windows. Also a lot of the developers prefer to use linux api over windows api.

Installed it and it really is an actual headless version of Ubuntu. It has seamless integration with my keyboard, mouse, internet and windows drives. It acts the same as a terminal version of Ubuntu would in a virtual machine, except that it doesn't feel like a virtual machine.

Besides that, in a command window of Windows, you can type 'ubuntu' or 'bash' and it switches seamless to the ubuntu CLI in the same window. This allows you to switch back and forth between the two.

If all you need is the CLI of Ubuntu, this looks to be a much better option than using a VM.
 
Joined
Oct 20, 2006
Messages
7,758
Location
usa - no longer boston
The kernels api are not compatible. While there is a lot of overlap there are a swatch of incompatibility or differences between the api. While I prefer linux myself I will admit there are a few areas where MS has done a good or better job. Anyways a program that makes heavy usage of threads, sockets or some of the more exotic file system calls might run into compatibility issues.

I would argue that saying "Cygwin can’t run Linux applications natively" is a bit deceptive, though. The pre-req for running a Linux application is normally either (1) installing a package from your distro, or (2) building it from source. Cygwin provides packages for tons of open source software just like any Linux distro would, and you can typically build programs written for Linux and run them under Cygwin just as you would if you were running Linux. Sure, you can't literally run a Linux binary under Cygwin, but binaries usually break even when just moving between different Linux distros - it's assumed you'll rebuild from source, or download a package where someone's done it for you. In actual practice, the main difference is that if you have proprietary software written for Linux, where source code isn't available, you won't be able to run it under Cygwin.

On a separate note, it's also worth mentioning that you can run GUI programs in WSL too, it's not limited to just CLI. You just need to be running an X server on your Windows machine, like Xming or Cygwin's X server. I played with that a year or two ago, and I believe I used Xming.
 
Joined
Oct 20, 2006
Messages
7,758
Location
usa - no longer boston
I feel reminded of a certain practise / strategy of Microsoft : https://en.wikipedia.org/wiki/Embrace,_extend,_and_extinguish

Strategy

The strategy's three phases are:
1.Embrace: Development of software substantially compatible with a competing product, or implementing a public standard.

2.Extend: Addition and promotion of features not supported by the competing product or part of the standard, creating interoperability problems for customers who try to use the 'simple' standard.

3.Extinguish: When extensions become a de facto standard because of their dominant market share, they marginalize competitors that do not or cannot support the new extensions.

Microsoft claims that the original strategy is not anti-competitive, but rather an exercise of its discretion to implement features it believes customers want.[12]

This might be Phase 1 in this strategy.

And the interesting point is here the "dominant market share". It's not a breach of any standard, it is "merely" an domination.
 
Joined
Nov 5, 2006
Messages
21,955
Location
Old Europe
The kernels api are not compatible. While there is a lot of overlap there are a swatch of incompatibility or differences between the api. While I prefer linux myself I will admit there are a few areas where MS has done a good or better job. Anyways a program that makes heavy usage of threads, sockets or some of the more exotic file system calls might run into compatibility issues.
Of course, but I was only referring to the type of software an end user might want to run on his desktop/workstation/whatever. Cygwin isn't intended for server scenarios or out-of-the-ordinary low level stuff. Most of the software that a Linux end-user would normally use is already available as Cygwin packages, you don't even need to build them. Obviously, there are some exceptions in cases where it doesn't make sense. As an example, there's no reason to build the UNIX/Linux version of Firefox under Cygwin - you can just run the Windows version since you're on a Windows machine.

For me, I prefer to just run a Linux desktop, which I do. But I work with many people who sit in Cygwin all day.
 
Last edited:
Joined
Sep 26, 2007
Messages
3,469
And people called me crazy when I said this was inevitable.
 
Joined
Mar 6, 2019
Messages
38
I'm currently looking through my old computing magazines and throwing away what I don't need anymore.

Within one magazine I found a reference to Microsoft's command line programs/commands. I tried out this link and indeed, as the article said, the reference is downloadable from there - as a big PDF file.

www.microsoft.com/en-us/download/confirmation.aspx?id=56846

This seems to exist in German language and perhaps in other languages as well : https://docs.microsoft.com/de-de/windows-server/administration/windows-commands/windows-commands

In the lower left point of the page there is a tiny note "PDF herunterladen" , which means that the German-language version of it can be downloaded there.
My guess is that this works for other languages as well.

Some links of the PDF file, however, go into the online reference.
Others, like ATTRIB and START are explained within the PDF file/document.
 
Last edited:
Joined
Nov 5, 2006
Messages
21,955
Location
Old Europe
I tried out WSL a few months ago to use with docker as I plan to to host a docker image on a remote server running Ubuntu or CentOS. There are definite limitations to it - i.e. you can't run the Ubuntu GUI on top of it.

With Docker had to link the Ubuntu docker to the Windows version inside of it to get it to run (if that's the right terminology). So it works fine for my needs as a test or setup environment but I can't wait for WSL2 to be fully implemented.
 
Joined
Oct 19, 2006
Messages
5,215
Location
The Uncanny Valley
Back
Top Bottom