Jump to content

What are the benefits for Bash for Windows?

Go to solution Solved by GoodBytes,

Based on my usage, you can do everything.

Keep in mind that it is limited to Windows, as it runs on Windows. So for example, if you open the command prompt, hit bash, and do a sudo command that affects the system it will fail, despite you sudo it, as the command prompt wasn't open with elevated credentials in the first place. So in this case, if you really want to do root stuff under bash, you need to open the command prompt as admin, and now sudo your commands. Also, you cannot do things that Windows can't, but you can do things that are simple in Linux, and a pain in the ass to do in Windows. So that is the big appeal.

 

The purpose of it, is the same as MacOS with Unix. You can run Linux programs under Windows. It is command line only. You don't have a GUI, but that is not impossible to implement, but performance and support isn't there. So your mileage will vary. Some programs will work better than others. And yes, you can access your Windows files with them. Support is weak, as it is new, but you have good level of interest by the community. Ubuntu is the most active, from what I know.

 

The target of it are back-end web and Android app developers, but even if you do Linux dev and it happen to fit Ubuntu or OpenSuse (Fedora was supposed to be available, but it is still in the works by the community), you can use it. It allows devs to mix the power of Windows with Linux, bringing the strength of both worlds. Linux based OS biggest weakness is being a desktop OS, so now you solve that. So, if you want to run a web server under Linux to test your phone app, for example, you can. You can install Apache and the rest under Linux subsystem, and run your app under an Android emulator (say). Or, another example, you have a Windows program that has a web back-end that will be installed under Linux, you can just run it directly in Windows, and have it communicate between each other. No need to setup a VM, cutting away your system resources, or remote to a server, or break your head in trying to setup a server under Windows.

Right now, I have a dual-boot system of Windows 10 Pro (Main OS), and Ubuntu Linux. My question is what benefits can a user get installing bash for Windows?

I've asked around, but I've mainly gotten vague answers, a few theories about what you can and can't do, what you kinda can do, etc...

 

I'm looking for people who have actually used and tested and pushed this feature to all its limits, which is why I'm here. The hard facts.

So, what can I, if anything, actually do with bash for windows in its current state?

Link to comment
Share on other sites

Link to post
Share on other sites

Based on my usage, you can do everything.

Keep in mind that it is limited to Windows, as it runs on Windows. So for example, if you open the command prompt, hit bash, and do a sudo command that affects the system it will fail, despite you sudo it, as the command prompt wasn't open with elevated credentials in the first place. So in this case, if you really want to do root stuff under bash, you need to open the command prompt as admin, and now sudo your commands. Also, you cannot do things that Windows can't, but you can do things that are simple in Linux, and a pain in the ass to do in Windows. So that is the big appeal.

 

The purpose of it, is the same as MacOS with Unix. You can run Linux programs under Windows. It is command line only. You don't have a GUI, but that is not impossible to implement, but performance and support isn't there. So your mileage will vary. Some programs will work better than others. And yes, you can access your Windows files with them. Support is weak, as it is new, but you have good level of interest by the community. Ubuntu is the most active, from what I know.

 

The target of it are back-end web and Android app developers, but even if you do Linux dev and it happen to fit Ubuntu or OpenSuse (Fedora was supposed to be available, but it is still in the works by the community), you can use it. It allows devs to mix the power of Windows with Linux, bringing the strength of both worlds. Linux based OS biggest weakness is being a desktop OS, so now you solve that. So, if you want to run a web server under Linux to test your phone app, for example, you can. You can install Apache and the rest under Linux subsystem, and run your app under an Android emulator (say). Or, another example, you have a Windows program that has a web back-end that will be installed under Linux, you can just run it directly in Windows, and have it communicate between each other. No need to setup a VM, cutting away your system resources, or remote to a server, or break your head in trying to setup a server under Windows.

Link to comment
Share on other sites

Link to post
Share on other sites

In Type Here Search on Windows 10, have you typed Bash.  The return results for me is Get Bash Desktop App.  After I click on it, I get the colorful Bash Command Com a Window.  From there, I have not used it.  However, I have noticed files and resources after the Bash window opens that I did not see before.  For example: "ls -ls"

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, GoodBytes said:

Based on my usage, you can do everything.

Keep in mind that it is limited to Windows, as it runs on Windows. So for example, if you open the command prompt, hit bash, and do a sudo command that affects the system it will fail, despite you sudo it, as the command prompt wasn't open with elevated credentials, and you can do things that Windows can't.

 

The purpose of it, is the same as MacOS with Unix. You can run Linux programs under Windows. It is command line only. You don't have a GUI, but that is not impossible to implement, but performance and support isn't there. So your mileage will vary. Some programs will work better than others. And yes, you can access your Windows files with them. Support is weak, as it is new, but you have good level of interest. Ubuntu is the most active, from what I know.

 

The target of it are back-end web and Android app developers, but even if you do Linux dev and it happen to fit Ubuntu or OpenSuse (Fedora was supposed to be available, but it is still in the works by the community). If allows devs to mix the power of Windows with Linux, bringing the strength of both worlds. Linux based OS biggest weakness is being a desktop OS, so now you solve that. So if you want t run a web server under Linux to test your phone app, for example, you can. You can install Apache and teh rest under Linux, and run your app under an Android emulator (say), or let's say it is a Windows program, and just run it directly in Windows, and have it communicate between each other. No need to setup a VM, cutting away your system resources, or remote to a server, and so you need a strong internet connection or limited to dev on the company ground due to intranet limitations.

 

Excellent! One final question...If I no longer need it, can I remove the feature?

Link to comment
Share on other sites

Link to post
Share on other sites

7 minutes ago, PlayBoyMan said:

Excellent! One final question...If I no longer need it, can I remove the feature?

Yup! You can have both Ubuntu and OpenSuse and any other Linux distro that wants to join in (it is all open), and you can remove 1 of of them, or all.

And you can completely disable, remove the whole thing (it is all turned off by default, so you just repeat the same thing but you uncheck the boxes you previously checked) :)

 

Note: Typo fixed on my previous post

Link to comment
Share on other sites

Link to post
Share on other sites

Oh, 1 limitation is that if you close the command prompt window where you have a background process running in it, it will be killed.

It doesn't support background process. So if you run a web server, you run it on a window, and might be best to move that window into a virtual desktop and leave it there, so that you don't close it by accident. It is a current limitation. I don't think it is high in the list to support it, due to the complications and the fact that this is not meant to be a server. This is just for devs.

 

If you are genuinely interested, you can check Windows Subsystem for Linux blog here:
https://blogs.msdn.microsoft.com/wsl/

You'll get to read on what is new and what is being worked on, and how to do some things.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×