From 7d1cc9cf6d71cf2f89743f272a06e09e4775fdfd Mon Sep 17 00:00:00 2001 From: xllc <392137944@qq.com> Date: Wed, 14 Jun 2017 22:30:11 +0800 Subject: [PATCH 1/7] translated by xllc --- ...5 How I got started with bash scripting.md | 123 ++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 translated/talk/20170515 How I got started with bash scripting.md diff --git a/translated/talk/20170515 How I got started with bash scripting.md b/translated/talk/20170515 How I got started with bash scripting.md new file mode 100644 index 0000000000..ceffb642a2 --- /dev/null +++ b/translated/talk/20170515 How I got started with bash scripting.md @@ -0,0 +1,123 @@ +我是如何开始编写 bash 脚本的? +============================================================ + +### 通过一些简单的 Google 搜索,即使编程入门者也可以尝试编写代码实现将以往枯燥和冗长的任务自动化。 + + + +![How Google helped me learn bash scripting](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/computer_happy_sad_developer_programming.png?itok=5E3k_t_r "How Google helped me learn bash scripting") +>图片来自 : opensource.com + +我前几天写了一个脚本。对于一些人来说,这句话听起来没什么了不起的。而对于另一些人来说,这句话意义重大。要知道,我不是一个程序员,而是一个作家。 + +### 我需要解决什么? + +我的问题相当简单:我需要将工程文件进行分类。这些文件可以从一个网站 URL 以 .zip 的格式下载。当我正手工将它们拷贝到我的电脑桌面,并移动到一个已按照我文件分类的需要进行了结构化的目录时,一位作家同事给我提了建议:_“你为什么不就写个脚本来完成这件事呢?”_ + +我心想:_“就写个脚本?”_——说得好像这是世界上最容易做的事情一样。 + +### Google 是如何解救我的? + +同事的问题促使我思考,并且经过思考后,我进行了 Google 搜索。 + +**Linux 上使用的是什么脚本编程语言?** + +这是我第一个 Google 搜索的准则。也许很多人心里会想:“她太笨了!”是的,我很笨。不过,这的确使我走上了一条解决问题的道路。最常见的搜索结果是 Bash 。嗯,我见过 Bash 。呃,我要分类的文件中有一个就有 Bash 在里面,那无处不在的 **#!/bin/bash** 。我重新看了下那个文件,我知道它的用途,因为我需要将它分类。 + +这引导我进行了下一个 Google 搜索 + +**如何从一个 URL 下载 zip 文件?** + +那确实是我的基本任务。我有一个附带着 .zip 文件的 URL ,它包含有所有我需要分类的文件,所以我寻求万能的 Google 的帮助。搜索到的精华内容和其它一些结果引导我使用 Curl 。但最重要的是:我不仅找到了 Curl ,其中一条置顶的搜索结果还展示了一个使用 Curl 去下载并解压 .zip 文件的 Bash 脚本。这超出了我本来想寻求的答案,但那也使我意识到在 Google 搜索具体的请求可以得到我写这个脚本需要的信息。所以,在收获的推动下,我写了最简单的脚本: + +``` +#!/bin/sh + +curl http://rather.long.url | tar -xz -C my_directory --strip-components=1 +``` + +我迫不及待地运行看看。但我发现一个问题: URL 是会变的,根据我要访问的文件的分组不同而不同。我有新的问题需要解决,这使我进行了下一轮搜索。 + +**参数如何传递给 Bash 脚本?** + +我需要以不同的 URL 和不同的最终目录来运行此脚本。 Google 向我展示了如何使用 **$1**、**$2** 等等来替换我在命令行中运行脚本时输入的内容。比如: +``` +bash myscript.sh http://rather.long.url my_directory +``` + +这就好多了。一切如我所愿,灵活,实用。最重要的是我只要输入一条简短的命令就可以节省 30 分钟无聊的复制、粘贴工作。这个早上的时间花得值得。 + +然后我发现还有一个问题:我很健忘,并且我知道我几个月才运行一次这个脚本。这留给我两个疑问: + +* 我要如何记得运行脚本时输入什么 ( URL 先?还是目录先?)? + +* 如果我被货车撞了,其它作家如何知道该怎样运行我的脚本? + +我需要一个使用说明 —— 如果我使用不正确,则脚本会提示。比如: + +``` +usage: bash yaml-fetch.sh <'snapshot_url'> +``` + +否则,则直接运行脚本。我的下一个搜索是: + +**如何在 Bash 脚本里使用“if/then/else”?** + +幸运的是,我已经知道编程中 **if/then/else** 的存在。我只要找出如何使用它的方法。在这个过程中,我也学到了如何在 Bash 脚本里使用 **echo** 打印。我的最终成果如下: + +``` +#!/bin/sh + +URL=$1 +DIRECTORY=$2 + +if [ $# -eq 0 ]; + then + echo "usage: bash yaml-fetch.sh <'snapshot_url'> ". + else + +     # 如果目录不存在则创建它 + echo 'create directory' + + mkdir $DIRECTORY + + # 下载并解压 yaml 文件 + echo 'fetch and untar the yaml files' + + curl $URL | tar -xz -C $DIRECTORY --strip-components=1 +fi +``` + +### Google 和脚本编程如何震撼我的世界? + +好吧,这稍微有点夸大,不过现在是 21 世纪,学习新东西(特别是稍微简单的东西)比以前简单多了。我所学到的(除了如何写一个简短的、自动分类的 Bash 脚本)是如果我有疑问,那么有很大可能性是其它人在之前也有过相同的疑问。当我困惑的时候,我可以问下一个问题,再下一个问题。最后,我不仅拥有了脚本,还拥有了坚持和习惯于简化其它任务的新技能,这是我之前所没有的。 + +别止步于第一个脚本(或者编程的第一步)。这是一个无异于其它的技能,丰富的信息可以在这一路上帮助你。你无需阅读大量的书或参加一个月的课程。你可以像婴儿学步那样简单地开始写脚本,然后掌握技能并建立自信。人们总有写成千上万行代码,包含分支、合并、修复错误的程序的需要。 + +但是,通过简单的脚本或其它方式来自动化、简单化任务的需求也一样强烈。这就是一个小脚本和小自信能够让你启程。 + +-------------------------------------------------------------------------------- + +作者简介: + +桑德拉麦肯:桑德拉麦肯是一位 Linux 和开源技术的倡导者。她是一位软件开发者、学习资源内容架构师、内容创作者。桑德拉目前是位于韦斯特福德马萨诸塞州的红帽公司的内容创作者,专注于 OpenStack 和 NFV 技术。 + +---- + +via: https://opensource.com/article/17/5/how-i-learned-bash-scripting + +作者:[ Sandra McCann ][a] +译者:[xllc](https://github.com/xllc) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://opensource.com/users/sandra-mccann +[1]:https://opensource.com/tags/python?src=programming_resource_menu +[2]:https://opensource.com/tags/javascript?src=programming_resource_menu +[3]:https://opensource.com/tags/perl?src=programming_resource_menu +[4]:https://developers.redhat.com/?intcmp=7016000000127cYAAQ&src=programming_resource_menu +[5]:https://opensource.com/article/17/5/how-i-learned-bash-scripting?rate=s_R-jmOxcMvs9bi41yRwenl7GINDvbIFYrUMIJ8OBYk +[6]:https://opensource.com/user/39771/feed +[7]:https://opensource.com/article/17/5/how-i-learned-bash-scripting#comments +[8]:https://opensource.com/users/sandra-mccann From 618f5ca9d1c2ddd6813e7a024c75ea1aa20448d5 Mon Sep 17 00:00:00 2001 From: xllc <392137944@qq.com> Date: Wed, 14 Jun 2017 22:31:03 +0800 Subject: [PATCH 2/7] Delete 20170515 How I got started with bash scripting.md --- ...5 How I got started with bash scripting.md | 138 ------------------ 1 file changed, 138 deletions(-) delete mode 100644 sources/talk/20170515 How I got started with bash scripting.md diff --git a/sources/talk/20170515 How I got started with bash scripting.md b/sources/talk/20170515 How I got started with bash scripting.md deleted file mode 100644 index 67c10ae521..0000000000 --- a/sources/talk/20170515 How I got started with bash scripting.md +++ /dev/null @@ -1,138 +0,0 @@ -【xllc翻译中】 - -How I got started with bash scripting -============================================================ - -### With a few simple Google searches, a programming novice learned to write code that automates a previously tedious and time-consuming task. - - - -![How Google helped me learn bash scripting](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/computer_happy_sad_developer_programming.png?itok=5E3k_t_r "How Google helped me learn bash scripting") ->Image by : opensource.com - -I wrote a script the other day. For some of you, that sentence sounds like no big deal. For others, and I know you're out there, that sentence is significant. You see, I'm not a programmer. I'm a writer. - -### What I needed to solve - -My problem was fairly simple: I had to juggle files from engineering into our documentation. The files were available in a .zip format from a web URL. I was copying them to my desktop manually, then moving them into a different directory structure to match my documentation needs. A fellow writer gave me this advice:  _"Why don't you just write a script to do this for you?"_ - -Programming and development - -* [New Python content][1] - -* [Our latest JavaScript articles][2] - -* [Recent Perl posts][3] - -* [Red Hat Developers Blog][4] - -​ - -I thought  _"just write a script?!?"_ —as if it was the easiest thing in the world to do. - -### How Google came to the rescue - -My colleague's question got me thinking, and as I thought, I googled. - -**What scripting languages are on Linux?** - -This was my first Google search criteria, and many of you are probably thinking, "She's pretty clueless." Well, I was, but it did set me on a path to solving my problem. The most common result was Bash. Hmm, I've seen Bash. Heck, one of the files I had to document had Bash in it, that ubiquitous line **#!/bin/bash**. I took another look at that file, and I knew what it was doing because I had to document it. - -So that led me to my next Google search request. - -**How to download a zip file from a URL?** - -That was my basic task really. I had a URL with a .zip file containing all the files I needed to include in my documentation, so I asked the All Powerful Google to help me out. That search gem, and a few more, led me to Curl. But here's the best part: Not only did I find Curl, one of the top search hits showed me a Bash script that used Curl to download a .zip file and extract it. That was more than I asked for, but that's when I realized being specific in my Google search requests could give me the information I needed to write this script. So, momentum in my favor, I wrote the simplest of scripts: - -``` -#!/bin/sh - -curl http://rather.long.url | tar -xz -C my_directory --strip-components=1 -``` - -What a moment to see that thing run! But then I realized one gotcha: The URL can change, depending on which set of files I'm trying to access. I had another problem to solve, which led me to my next search. - -**How to pass parameters into a Bash script?** - -I needed to be able to run this script with different URLs and different end directories. Google showed me how to put in **$1**, **$2**, etc., to replace what I typed on the command line with my script. For example: - -``` -bash myscript.sh http://rather.long.url my_directory -``` - -That was much better. Everything was working as I needed it to, I had flexibility, I had a working script, and most of all, I had a short command to type and save myself 30 minutes of copy-paste grunt work. That was a morning well spent. - -Then I realized I had one more problem. You see, my memory is short, and I knew I'd run this script only every couple of months. That left me with two issues: - -* How would I remember what to type for my script (URL first? directory first?)? - -* How would another writer know how to run my script if I got hit by a truck? - -I needed a usage message—something the script would display if I didn't use it correctly. For example: - -``` -usage: bash yaml-fetch.sh <'snapshot_url'> -``` - -Otherwise, run the script. My next search was: - -**How to write "if/then/else" in a Bash script?** - -Fortunately I already knew **if/then/else** existed in programming. I just had to find out how to do that. Along the way, I also learned to print from a Bash script using **echo**. What I ended up with was something like this: - -``` -#!/bin/sh - -URL=$1 -DIRECTORY=$2 - -if [ $# -eq 0 ]; - then - echo "usage: bash yaml-fetch.sh <'snapshot_url'> ". - else - - # make the directory if it doesn't already exist - echo 'create directory' - - mkdir $DIRECTORY - - # fetch and untar the yaml files - echo 'fetch and untar the yaml files' - - curl $URL | tar -xz -C $DIRECTORY --strip-components=1 -fi -``` - -### How Google and scripting rocked my world - -Okay, slight exaggeration there, but this being the 21st century, learning new things (especially somewhat simple things) is a whole lot easier than it used to be. What I learned (besides how to write a short, self-documented Bash script) is that if I have a question, there's a good chance someone else had the same or a similar question before. When I get stumped, I can ask the next question, and the next question. And in the end, not only do I have a script, I have the start of a new skill that I can hold onto and use to simplify other tasks I've been avoiding. - -Don't let that first script (or programming step) get the best of you. It's a skill, like any other, and there's a wealth of information out there to help you along the way. You don't need to read a massive book or take a month-long course. You can do it a simpler way with baby steps and baby scripts that get you started, then build on that skill and your confidence. There will always be a need for folks to write those thousands-of-lines-of-code programs with all the branching and merging and bug-fixing. - -But there is also a strong need for simple scripts and other ways to automate/simplify tasks. And that's where a little script and a little confidence can give you a kickstart. - --------------------------------------------------------------------------------- - -作者简介: - -Sandra McCann - Sandra McCann is a Linux and open source advocate. She's worked as a software developer, content architect for learning resources, and content creator. Sandra is currently a content creator for Red Hat in Westford, MA focusing on OpenStack and NFV techology. - ----- - -via: https://opensource.com/article/17/5/how-i-learned-bash-scripting - -作者:[ Sandra McCann ][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://opensource.com/users/sandra-mccann -[1]:https://opensource.com/tags/python?src=programming_resource_menu -[2]:https://opensource.com/tags/javascript?src=programming_resource_menu -[3]:https://opensource.com/tags/perl?src=programming_resource_menu -[4]:https://developers.redhat.com/?intcmp=7016000000127cYAAQ&src=programming_resource_menu -[5]:https://opensource.com/article/17/5/how-i-learned-bash-scripting?rate=s_R-jmOxcMvs9bi41yRwenl7GINDvbIFYrUMIJ8OBYk -[6]:https://opensource.com/user/39771/feed -[7]:https://opensource.com/article/17/5/how-i-learned-bash-scripting#comments -[8]:https://opensource.com/users/sandra-mccann From c4e7b3941b226c00af2606a78cf0217540f957b1 Mon Sep 17 00:00:00 2001 From: ChunYu Wang Date: Thu, 15 Jun 2017 13:09:58 +0800 Subject: [PATCH 3/7] Take translation work Take translation work of 20170220 An introduction to the Linux boot and startup processes.md --- ...0 An introduction to the Linux boot and startup processes.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20170220 An introduction to the Linux boot and startup processes.md b/sources/tech/20170220 An introduction to the Linux boot and startup processes.md index e6d064f3cd..ba1cd9463e 100644 --- a/sources/tech/20170220 An introduction to the Linux boot and startup processes.md +++ b/sources/tech/20170220 An introduction to the Linux boot and startup processes.md @@ -1,3 +1,5 @@ +Translating by CherryMill + An introduction to the Linux boot and startup processes ============================================================ From 6410a3c7c84a8115fd47e1651333b6787581737e Mon Sep 17 00:00:00 2001 From: xiaow6 Date: Thu, 15 Jun 2017 15:12:54 +0800 Subject: [PATCH 4/7] translating by xiaow6 --- ...20161006 Go Serverless with Apex and Composes MongoDB.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sources/tech/20161006 Go Serverless with Apex and Composes MongoDB.md b/sources/tech/20161006 Go Serverless with Apex and Composes MongoDB.md index 2365341b66..7df4c4523c 100644 --- a/sources/tech/20161006 Go Serverless with Apex and Composes MongoDB.md +++ b/sources/tech/20161006 Go Serverless with Apex and Composes MongoDB.md @@ -1,3 +1,5 @@ +translating by xiaow6 + # Go Serverless with Apex and Compose's MongoDB _Apex is tooling that wraps the development and deployment experience for AWS Lambda functions. It provides a local command line tool which can create security contexts, deploy functions, and even tail cloud logs. While AWS's Lambda service treats each function as an independent unit, Apex provides a framework which treats a set of functions as a project. Plus, it even extends the service to languages beyond just Java, Javascript, and Python such as Go._ @@ -182,10 +184,10 @@ via: https://www.compose.com/articles/go-serverless-with-apex-and-composes-mongo 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:https://www.compose.com/articles/author/hays-hutton/ -[1]:https://twitter.com/share?text=Go%20Serverless%20with%20Apex%20and%20Compose%27s%20MongoDB&url=https://www.compose.com/articles/go-serverless-with-apex-and-composes-mongodb/&via=composeio +[1]:https://twitter.com/share?text=Go%20Serverless%20with%20Apex%20and%20Compose%27s%20MongoDB&url=https://www.compose.com/articles/go-serverless-with-apex-and-composes-mongodb/&via=composeio [2]:https://www.facebook.com/sharer/sharer.php?u=https://www.compose.com/articles/go-serverless-with-apex-and-composes-mongodb/ [3]:https://plus.google.com/share?url=https://www.compose.com/articles/go-serverless-with-apex-and-composes-mongodb/ -[4]:http://news.ycombinator.com/submitlink?u=https://www.compose.com/articles/go-serverless-with-apex-and-composes-mongodb/&t=Go%20Serverless%20with%20Apex%20and%20Compose%27s%20MongoDB +[4]:http://news.ycombinator.com/submitlink?u=https://www.compose.com/articles/go-serverless-with-apex-and-composes-mongodb/&t=Go%20Serverless%20with%20Apex%20and%20Compose%27s%20MongoDB [5]:https://www.compose.com/articles/rss/ [6]:https://unsplash.com/@esaiastann [7]:https://www.compose.com/articles From 1b2ed16fb2d4a53c524f4e2f477846d96d9e6f94 Mon Sep 17 00:00:00 2001 From: xllc <392137944@qq.com> Date: Thu, 15 Jun 2017 22:13:18 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E7=94=B3=E8=AF=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tech/20170201 Performance made easy with Linux containers.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20170201 Performance made easy with Linux containers.md b/sources/tech/20170201 Performance made easy with Linux containers.md index 4a55487cc4..1d748459c7 100644 --- a/sources/tech/20170201 Performance made easy with Linux containers.md +++ b/sources/tech/20170201 Performance made easy with Linux containers.md @@ -1,3 +1,4 @@ +translating by xllc Performance made easy with Linux containers ============================================================ From 2fe6d2d13629160d4da017fb48d5ee8e19def16f Mon Sep 17 00:00:00 2001 From: xllc <392137944@qq.com> Date: Thu, 15 Jun 2017 22:14:25 +0800 Subject: [PATCH 6/7] Update 20170201 Performance made easy with Linux containers.md --- .../tech/20170201 Performance made easy with Linux containers.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20170201 Performance made easy with Linux containers.md b/sources/tech/20170201 Performance made easy with Linux containers.md index 1d748459c7..ae79ffcd65 100644 --- a/sources/tech/20170201 Performance made easy with Linux containers.md +++ b/sources/tech/20170201 Performance made easy with Linux containers.md @@ -1,4 +1,5 @@ translating by xllc + Performance made easy with Linux containers ============================================================ From 29d793381dcac696b036d8b4afdf961267c361eb Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 16 Jun 2017 02:02:54 +0800 Subject: [PATCH 7/7] PRF&PUB:20170516 How Microsoft is becoming a Linux vendor.md @geekpi --- ...ow Microsoft is becoming a Linux vendor.md | 58 ++++++++++++++++++ ...ow Microsoft is becoming a Linux vendor.md | 60 ------------------- 2 files changed, 58 insertions(+), 60 deletions(-) create mode 100644 published/20170516 How Microsoft is becoming a Linux vendor.md delete mode 100644 translated/talk/20170516 How Microsoft is becoming a Linux vendor.md diff --git a/published/20170516 How Microsoft is becoming a Linux vendor.md b/published/20170516 How Microsoft is becoming a Linux vendor.md new file mode 100644 index 0000000000..294cb8c6b4 --- /dev/null +++ b/published/20170516 How Microsoft is becoming a Linux vendor.md @@ -0,0 +1,58 @@ +微软正在成为一个 Linux 供应商 +===================================== + +> 微软通过将 Linux 融入自己的产品中来弥合与 Linux 的裂隙。 + +![](http://images.techhive.com/images/article/2017/05/microsoft-100722875-large.jpg) + +Linux 以及开源技术在数据中心、云以及 IoT 中变得如此主流,以至于微软无法忽视他们。 + +在微软自己的云中,三分之一的机器运行着 Linux。这些是运行 Linux 的微软客户。微软需要支持他们使用的平台,否则他们将到别处去了。 + +以下就是微软如何将 Linux 战略落实到它的开发者平台 (Windows 10)、云 (Azure) 以及数据中心 (Windows Server) 上的。 + +**Windows 中的 Linux:** IT 专家管理公共或者私有 Linux 机器需要原生的 UNIX 工具。Linux 以及 macOS 是仅有的二个提供原生能力的平台。这也难怪你在各种会议如 DockerCon、OpenStack Summit 或者 CoreOS Fest 看到的都是 MacBook 或者少量的 Linux 桌面。 + +为了弥补这之间的裂隙,微软与 Canonical 协作在 Windows 内部构建了一个 Linux 子系统,它提供了原生的 Linux 工具。这是一个很棒的妥协,这样 IT 专家可以在继续使用 Windows 10 桌面的同时能够使用大多数 Linux 工具来管理他们的 Linux 机器。 + +**Azure 中的 Linux:** 不能完整支持 Linux 的云有什么好的呢?微软一直以来与 Linux 供应商合作来使客户能够在 Azure 中运行 Linux 程序以及任务。 + +微软不仅与三家主要的 Linux 供应商 Red Hat、SUSE 和 Canonical 签署了协议,还与无数的其他公司合作,为 Debian 这样的基于社区的发行版提供了支持。 + +**Windows Server 中的 Linux:** 这是剩下的最后一块拼图。客户使用的 Linux 容器是一个巨大的生态系统。Docker Hub 上有超过 90 万个 Docker 容器,它们只能在 Linux 机器上运行。微软希望把这些容器带到自己的平台上。 + +在 DockerCon 中,微软宣布在 Windows Server 中支持 Linux 容器,将这些容器都带到 Windows 中。 + +事情正变得更加有趣,在 Windows 10 上的 Bash on Ubuntu 成功之后,微软正将 Ubuntu bash 带到 Windows Server 中。是的,你听的没错。Windows Server 也将会有一个 Linux 子系统。 + +微软的高级项目经理 Rich Turne 告诉我:“服务器上的 WSL 为管理员提供了偏好的 *NIX 管理脚本和工具,以便让他们可以在更熟悉的工作环境工作。” + +微软在一个通告中称它将允许 IT 专家 “可以在 Windows Server 容器主机上使用在 Linux 容器上所用的相同的脚本、工具、流程和容器镜像。这些容器使用我们的 Hyper-V 隔离技术结合你选择的 Linux 内核来托管负载,而主机上的管理脚本以及工具使用 WSL。” + +在覆盖了上面三个情况后,微软已经成功地创建了一个客户不必选择任何 Linux 供应商的环境。 + +### 它对微软意味着什么? + +通过将 Linux 融入它自己的产品,微软已经成为了一个 Linux 供应商。它是 Linux 基金会的一份子,它是众多 Linux 贡献者之一,并且它现在在自己的商店中分发 Linux。 + +只有一个小问题。微软没有拥有任何 Linux 技术。它完全依赖于外部的厂家,目前 Canonical 为其提供了完全的 Linux 层。如果 Canonical 被强力的竞争对手收购,那会是一个很大的风险。 + +或许对微软而言尝试收购 Canonical 是有意义的,并且会将核心技术收入囊中。这是有道理的。 + +### 这对 Linux 供应商意味着什么 + +表面上,很显然这对微软是个胜利,因为它的客户可以留存在 Windows 世界中。它还将包含 Linux 在数据中心中的发展势头。它或许还会影响 Linux 桌面,由于现在 IT 专家不必为了寻找 *NIX 工具使用 Linux 桌面了,它们可以在 Windows 中做任何事。 + +微软的成功是传统 Linux 厂家的失败么?某种程度上来说,是的,微软已经成为了一个直接竞争者。但是这里明显的赢家是 Linux。 + +-------------------------------------------------------------------------------- + +via: http://www.cio.com/article/3197016/linux/how-microsoft-is-becoming-a-linux-vendor.html + +作者:[Swapnil Bhartiya][a] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.cio.com/author/Swapnil-Bhartiya/ diff --git a/translated/talk/20170516 How Microsoft is becoming a Linux vendor.md b/translated/talk/20170516 How Microsoft is becoming a Linux vendor.md deleted file mode 100644 index 999cc72c63..0000000000 --- a/translated/talk/20170516 How Microsoft is becoming a Linux vendor.md +++ /dev/null @@ -1,60 +0,0 @@ -微软如何正在成为一个 Linux 供应商 -===================================== - - ->微软通过将 Linux 融入自己的产品中来弥合与 Linux 的差距。 - -![](http://images.techhive.com/images/article/2017/05/microsoft-100722875-large.jpg) - - -Linux 以及开源技术在数据中心、云以及 IoT 中变得如此主流以至于微软无法忽视他们。 - -在微软自己的云中,三分之一的机器运行着 Linux。这些是运行 Linux 的微软客户。微软需要支持他们使用的平台,否则他们将到别处去了。 - -以下就是微软如何在它的开发者平台 (Windows 10)、云 (Azure) 以及数据中心 (Windows Server) 打破 Linux 策略的。 - -**Windows 中的 Linux:** IT 专家管理公共或者私有 Linux 机器需要原生的 UNIX 工具。Linux 以及 macOS 是仅有的二个提供原生能力的平台。难怪你在各种会议如 DockerCon、OpenStack Summit 或者 CoreOS Fest 看到的都是 MacBook 或者少量的 Linux 桌面。 - -为了弥补差距,微软与 Canonical 协作在 Windows 内部构建了一个 Linux 子系统,它提供了原生的 Linux 工具。这是一个很棒的妥协,这样 IT 专家可以继续使用 Windows 10 桌面的同时能够使用大多数 Linux 工具来管理他们的 Linux 机器。 - -**Azure 中的 Linux:** 不能完整支持 Linux 的云有什么好呢?微软一直以来与 Linux 供应商合作来使客户能够在 Azure 中运行 Linux 程序以及负载。 - -微软不仅与三家主要的 Linux 供应商 Red Hat、SUSE 和 Canonical 签署了协议,还与无数的其他公司合作,为 Debian提 供了基于社区的发行版的支持。 - -**Windows Server 中的 Linux:** 这是剩下的最后一块披萨。客户使用的 Linux 容器是一个巨大的生态系统。Docker Hub 上有超过 90 万个 Docker 容器,它们只能在 Linux 机器上运行。微软希望把这些容器带到自己的平台上。 - -在 DockerCon 中,微软宣布在 Windows Server 中支持 Linux 容器,将这些容器都带到 Linux 中。 - -事情正变得更加有趣,在 Windows 10 上的 Bash 成功之后,微软正将 Ubuntu bash 带到 Windows Server 中。是的,你听的没错。Windows Server 将会有一个 Linux 子系统。 - -微软的高级项目经理 Rich Turne 告诉我:“服务器上的 WSL 为管理员提供了 *UNIX 管理脚本和工具的偏好,以便有更熟悉的工作环境。” - -微软在一个通告中称它将允许 IT 专家 “使用他们在 Windows Server 容器主机上为 Linux 容器使用的相同的脚本,工具,流程和容器镜像。这些容器使用我们的 Hyper-V 隔离技术结合你选择的 Linux 内核来托管负载,而主机上的管理脚本以及工具使用 WSL。” - -在覆盖了上面三个情况后,微软已经成功地创建了一个客户不必选择任何 Linux 供应商的环境。 - -### 它对微软意味着什么? - -通过将 Linux 融入它自己的产品,微软已经成为了一个 Linux 供应商。它们是 Linux 基金会的一部分,它们是众多 Linux 贡献者之一,并且它们现在在自己的商店中分发 Linux。 - -还有一个小问题。微软没有拥有任何 Linux 技术。它们完全依赖于外部的厂家,目前 Canonical 是完全的 Linux 层厂商。如果 Canonical 被强力的竞争对手收购,那会是一个很大的风险。 - -或许对微软而言尝试收购 Canonical 是有意义的,并且会将核心技术收入囊中。这是有道理的。 - -### 这对 Linux 供应商意味着什么 - -表面上,很显然这对微软是个胜利,因为它的客户可以在 Windows 世界中存留。它还将包含 Linux 在数据中心中的势头。它或许还会影响 Linux 桌面,由于现在 IT 专家不必为了寻找 *NIX 工具使用 Linux 桌面了,它们可以在 Windows 中做任何事。 - -微软的成功是传统 Linux 厂家的失败么?某种程度上来说,是的,微软已经成为了一个直接竞争者。但是这里明显的赢家是 Linux。 - --------------------------------------------------------------------------------- - -via: http://www.cio.com/article/3197016/linux/how-microsoft-is-becoming-a-linux-vendor.html - -作者:[ Swapnil Bhartiya ][a] -译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.cio.com/author/Swapnil-Bhartiya/