未加星标

Working with Bash on Ubuntu on Windows 10

字体大小 | |
[系统(linux) 所属分类 系统(linux) | 发布者 店小二03 | 时间 2016 | 作者 红领巾 ] 0人收藏点击收藏

Yes, the title reads right. I'm talking about running Bash , the Unix Shell on windows. Well, on the Ubuntu subsystem running inside the Windows 10 OS. It's a bit weird, I know. And yet so cool and forward thinking.

If you need more info about how this works, you can check this MSDN article that also provides links to related posts. And these people have done a great job explaining in depth how it all hangs together. They also provide installation and usage instructions which are miles better than mine.

But I'm too excited not to share. Because today, this addition to Windows made my life so much easier. I was able to work with the native tools to manage a linux cluster. By now, my past self would be horrified with the sentence I just wrote because I hadn't touched Linux for a very long time. Let alone deploy and manage a Linux cluster on Azure! And I did it all through the command line. I was even offered the option to perform the same tasks through the GUI but I ignored it! I still chose the command line as it was faster!

The fact that got me so excited is that I was able to perform some really complex workloads all through the command line (OK, and a little bit of Visual Studio Code). It was faster and easier all together, even with the learning curve involved. What tasks did I perform you may ask?

I forked the [Azure Quick Start Template() GitHub repo Copied it locally ( git pull ) Edited the necessary ARM template in VS Code Saved and push my changes to the remote ( git push ) Run the ARM template with Powershell Installed the mysql client on Ubuntu through bash Logged into the newly deployed MySQL cluster using the MySQL client Tested the cluster failover from the command line Queried the database, created tables and inserted records I ssh(ed) into both the VMs to ensure that MySQL replication was working as expected Wiped out the cluster after I was satisfied with the results!

I didn't have to install Putty or Cygwin nor did I have to enable HyperV and install Ubuntu or another Linux distro (flavour).

It's one of these times that I felt empowered to do what I need without having to jump through 20 hoops or rely on 3rd party, half-baked solutions. It's all about using the right tool for the right job! And for this instance, we have the Windows team to thank. Because they made the Linux subsystem part of the native Windows toolchain. And it looks like this:


Working with Bash on Ubuntu on Windows 10

If you haven't tried it yet, I urge you to give it a go and hopefully you'll feel as elated as I did today (apart from the fact that I suck in using bash/cmd/powershell).

本文系统(linux)相关术语:linux系统 鸟哥的linux私房菜 linux命令大全 linux操作系统

分页:12
转载请注明
本文标题:Working with Bash on Ubuntu on Windows 10
本站链接:http://www.codesec.net/view/480230.html
分享请点击:


1.凡CodeSecTeam转载的文章,均出自其它媒体或其他官网介绍,目的在于传递更多的信息,并不代表本站赞同其观点和其真实性负责;
2.转载的文章仅代表原创作者观点,与本站无关。其原创性以及文中陈述文字和内容未经本站证实,本站对该文以及其中全部或者部分内容、文字的真实性、完整性、及时性,不作出任何保证或承若;
3.如本站转载稿涉及版权等问题,请作者及时联系本站,我们会及时处理。
登录后可拥有收藏文章、关注作者等权限...
技术大类 技术大类 | 系统(linux) | 评论(0) | 阅读(50)