Saved Bookmarks
| 1. |
Solve : BASH for Window 10 - Will you?? |
|
Answer» Well, I haven't - so I am asking. A massive set of changes to the Windows Subsystem for Linux (WSL) was rolled into Windows Insider build 15002, which started shipping to Windows 10 users yesterday.More recent: https://msdn.microsoft.com/en-us/commandline/wsl/about Quote OverviewThe Microsoft Insall Guide https://msdn.microsoft.com/en-us/commandline/wsl/install_guide Quote Jack Hammons|Last Updated: 5/8/2017 Is this important to you? "Will you?" - Have been SINCE April 2016 on my laptop (Insider Builds), and since August 2016 on my mainstream machine (it came with Anniversary Update). Since the Creators Update you have interops (interoperability) so you can do this in bash Code: [Select]/mnt/c/Windows/System32/cmd.exe /c dir You can make the /mnt/c/Windows/System32/cmd.exe part into something shorter if you wish (having .bashrc on Windows! W00T!) and in Windows command prompt you can do this Code: [Select]bash -c "ls -l" These are just simple examples, of course. In each shell you can run the other shell's scripts and binaries... What's not to like? I do find a lot of Linux command line stuff more intuitive and more rewarding to master, and (I feel like I am admitting something dirty here) I have never much liked Powershell. Yes, I know there has always been Cygwin, but I don't like that much either. I have a Linux box running Debian 8 Jessie and using WSL to provide an ssh terminal is very handy, also to my NAS running ARM Linux. I use Nano for my editor. All is good. Quote from: Salmon Trout on May 22, 2017, 01:49:29 AM
In fact you can just use cmd.exe in bash, because the bash $PATH variable includes the Windows %path% I don't have it enabled on most of my SYSTEMS (maybe a few where I fiddled with it) and probably won't use it. Though it is good to know it is there. Could be useful for things like SSH like Salmon mentioned. I definitely prefer Bash over powershell by a wide margin but generally prefer to do things the "Windows way" on windows and the "Linux Way" on Linux, and cmd tends to be enough on Windows, at least for me. Though there have been times I wanted a easily available Linux command or program and had to try to build a Windows version from source which was a pain which is made simple via this approach. |
|