As you may already know, Windows 10 Anniversary Update comes with a Bash on Ubuntu console, which allows the user to access and launch Ubuntu apps on Windows. Targeted for console apps and services, it allows you to run even GUI apps with a trick. In this article, we will see how to run a Linux command from the cmd.exe prompt in Windows 10 directly.
You can omit the need for a separate console for Bash on Ubuntu in Windows 10 and run a specific command or a set of commands directly from the command prompt. This is possible thanks to the implementation of Bash on Ubuntu.
The bash console can be started via the following file:
c:\windows\system32\bash.exe
This is a console app, which supports a number of command line arguments. You can learn them by running
bash --help
As is apparent from the brief help it provides, you can call a Linux command directly using the following syntax:
bash -c "linux command here"
The following example demonstrates this ability:
Watch the following video to see this trick in action:
Tip: You can subscribe to Winaero at Youtube.
That's it. Now you can extend your command line scripts with Linux apps.
Support us
Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:
apt-get install nautilus – тоже работает но не могу понять как запустить оболочку…
Иксы нужны и какой-нить fluxbox.
Вот тут я калькулятор запускал:
https://winaero.com/blog/how-to-run-linux-gui-apps-on-windows-10-in-bash/
it does not work for windows 7 ,please tell me a way to make this work on windows 7