I have been an avid user, sysadmin and developer of Linux and UNIX systems since the mid-nineties. I have spent endless hours in religion-like discussions on whether closed source software is for better or worse. I never thought that Microsoft would embrace Free Open Source Software (FOSS).
Early this month, Microsoft released the Anniversary update on Windows 10, which enables me to run bash in Windows.
Equally, Microsoft’s PowerShell (PS) now also runs on Linux: https://github.com/PowerShell/PowerShell
Great news! The systems now can gain value from each other!
The value of PowerShell in Linux
I truly believe that PS brings value to Linux, given that it can handle structured data, not just strings through STDIN, STDOUT and STDERR. I have written many scripts in UNIX, automating system administrative tasks, and I have always missed the possibility to handle structured data. The way around that has been to use Perl, Python or any other scripting language with more power than shell scripting.
The value of bash in Windows
Although you don’t get access to all Windows system resources (kernel) through bash for Windows, it is still a step in the right direction to bring the automation power of the UNIX shell into Windows. This power has enabled system administrators of UNIX systems to be highly efficient for decades, and it was the lack of it in Windows systems that put many UNIX administrators off managing Windows systems, where everything has to be done through the click of a Graphical User Interface (GUI) element such as a window, button or drop-down list.
Bash for windows, brings all the headless binaries (programs running without a GUI) from the UNIX world into Windows along with Python, Perl and all other scripting languages. I just installed ffmpeg, a powerful commandline audio/video editor, into bash in windows, which enables me to automate the creation and conversion of multimedia into the format I wish. Pretty amazing!
Some tips to get more out of bash for windows
- Always run ‘bash for windows’ as Administrator. This way to will get access to parts of the running kernel though /proc, and the ability to access system resources such as the networking interface needed to run commands such as ‘ping’.