Merge pull request #9020 from MjSeven/master

20180521 Linux vs. Unix- What-s the difference.md 翻译完毕
This commit is contained in:
Ezio 2018-06-03 23:02:53 +08:00 committed by GitHub
commit 50d81e3100
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 76 additions and 78 deletions

View File

@ -1,78 +0,0 @@
Translating by MjSeven
Linux vs. Unix: What's the difference?
======
![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/BUSINESS_twoforward.png?itok=exkV49ts)
If you are a software developer in your 20s or 30s, you've grown up in a world dominated by Linux. It has been a significant player in the data center for decades, and while it's hard to find definitive operating system market share reports, Linux's share of data center operating systems could be as high as 70%, with Windows variants carrying nearly all the remaining percentage. Developers using any major public cloud can expect the target system will run Linux. Evidence that Linux is everywhere has grown in recent years when you add in Android and Linux-based embedded systems in smartphones, TVs, automobiles, and many other devices.
Even so, most software developers, even those who have grown up during this venerable "Linux revolution" have at least heard of Unix. It sounds similar to Linux, and you've probably heard people use these terms interchangeably. Or maybe you've heard Linux called a "Unix-like" operating system.
So, what is this Unix? The caricatures speak of wizard-like "graybeards" sitting behind glowing green screens, writing C code and shell scripts, powered by old-fashioned, drip-brewed coffee. But Unix has a much richer history beyond those bearded C programmers from the 1970s. While articles detailing the history of Unix and "Unix vs. Linux" comparisons abound, this article will offer a high-level background and a list of major differences between these complementary worlds.
### Unix's beginnings
The history of Unix begins at AT&T Bell Labs in the late 1960s with a small team of programmers looking to write a multi-tasking, multi-user operating system for the PDP-7. Two of the most notable members of this team at the Bell Labs research facility were Ken Thompson and Dennis Ritchie. While many of Unix's concepts were derivative of its predecessor ([Multics][1]), the Unix team's decision early in the 1970s to rewrite this small operating system in the C language is what separated Unix from all others. At the time, operating systems were rarely, if ever, portable. Instead, by nature of their design and low-level source language, operating systems were tightly linked to the hardware platform for which they had been authored. By refactoring Unix on the C programming language, Unix could now be ported to many hardware architectures.
In addition to this new portability, which allowed Unix to quickly expand beyond Bell Labs to other research, academic, and even commercial uses, several key of the operating system's design tenets were attractive to users and programmers. For one, Ken Thompson's [Unix philosophy][2] became a powerful model of modular software design and computing. The Unix philosophy recommended utilizing small, purpose-built programs in combination to do complex overall tasks. Since Unix was designed around files and pipes, this model of "piping" inputs and outputs of programs together into a linear set of operations on the input is still in vogue today. In fact, the current cloud functions-as-a-service (FaaS)/serverless computing model owes much of its heritage to the Unix philosophy.
### Rapid growth and competition
Through the late 1970s and 80s, Unix became the root of a family tree that expanded across research, academia, and a growing commercial Unix operating system business. Unix was not open source software, and the Unix source code was licensable via agreements with its owner, AT&T. The first known software license was sold to the University of Illinois in 1975.
Unix grew quickly in academia, with Berkeley becoming a significant center of activity, given Ken Thompson's sabbatical there in the '70s. With all the activity around Unix at Berkeley, a new delivery of Unix software was born: the Berkeley Software Distribution, or BSD. Initially, BSD was not an alternative to AT&T's Unix, but an add-on with additional software and capabilities. By the time 2BSD (the Second Berkeley Software Distribution) arrived in 1979, Bill Joy, a Berkeley grad student, had added now-famous programs such as `vi` and the C shell (/bin/csh).
In addition to BSD, which became one of the most popular branches of the Unix family, Unix's commercial offerings exploded through the 1980s and into the '90s with names like HP-UX, IBM's AIX, Sun's Solaris, Sequent, and Xenix. As the branches grew from the original root, the "[Unix wars][3]" began, and standardization became a new focus for the community. The POSIX standard was born in 1988, as well as other standardization follow-ons via The Open Group into the 1990s.
Around this time AT&T and Sun released System V Release 4 (SVR4), which was adopted by many commercial vendors. Separately, the BSD family of operating systems had grown over the years, leading to some open source variations that were released under the now-familiar [BSD license][4] . This included FreeBSD, OpenBSD, and NetBSD, each with a slightly different target market in the Unix server industry. These Unix variants continue to have some usage today, although many have seen their server market share dwindle into the single digits (or lower). BSD may have the largest install base of any modern Unix system today. Also, every Apple Mac hardware unit shipped in recent history can be claimed by BSD, as its OS X (now macOS) operating system is a BSD-derivative.
While the full history of Unix and its academic and commercial variants could take many more pages, for the sake of our article focus, let's move on to the rise of Linux.
### Enter Linux
What we call the Linux operating system today is really the combination of two efforts from the early 1990s. Richard Stallman was looking to create a truly free and open source alternative to the proprietary Unix system. He was working on the utilities and programs under the name GNU, a recursive algorithm meaning "GNU's not Unix!" Although there was a kernel project underway, it turned out to be difficult going, and without a kernel, the free and open source operating system dream could not be realized. It was Linus Torvald's work—producing a working and viable kernel that he called Linux—that brought the complete operating system to life. Given that Linus was using several GNU tools (e.g., the GNU Compiler Collection, or [GCC][5]), the marriage of the GNU tools and the Linux kernel was a perfect match.
Linux distributions came to life with the components of GNU, the Linux kernel, MIT's X-Windows GUI, and other BSD components that could be used under the open source BSD license. The early popularity of distributions like Slackware and then Red Hat gave the "common PC user" of the 1990s access to the Linux operating system and, with it, many of the proprietary Unix system capabilities and utilities they used in their work or academic lives.
Because of the free and open source standing of all the Linux components, anyone could create a Linux distribution with a bit of effort, and soon the total number of distros reached into the hundreds. Today, [distrowatch.com][6] lists 312 unique Linux distributions available in some form. Of course, many developers utilize Linux either via cloud providers or by using popular free distributions like Fedora, Canonical's Ubuntu, Debian, Arch Linux, Gentoo, and many other variants. Commercial Linux offerings, which provide support on top of the free and open source components, became viable as many enterprises, including IBM, migrated from proprietary Unix to offering middleware and software solutions atop Linux. Red Hat built a model of commercial support around Red Hat Enterprise Linux, as did German provider SUSE with SUSE Linux Enterprise Server (SLES).
### Comparing Unix and Linux
So far, we've looked at the history of Unix and the rise of Linux and the GNU/Free Software Foundation underpinnings of a free and open source alternative to Unix. Let's examine the differences between these two operating systems that share much of the same heritage and many of the same goals.
From a user experience perspective, not very much is different! Much of the attraction of Linux was the operating system's availability across many hardware architectures (including the modern PC) and ability to use tools familiar to Unix system administrators and users.
Because of POSIX standards and compliance, software written on Unix could be compiled for a Linux operating system with a usually limited amount of porting effort. Shell scripts could be used directly on Linux in many cases. While some tools had slightly different flag/command-line options between Unix and Linux, many operated the same on both.
One side note is that the popularity of the macOS hardware and operating system as a platform for development that mainly targets Linux may be attributed to the BSD-like macOS operating system. Many tools and scripts meant for a Linux system work easily within the macOS terminal. Many open source software components available on Linux are easily available through tools like [Homebrew][7].
The remaining differences between Linux and Unix are mainly related to the licensing model: open source vs. proprietary, licensed software. Also, the lack of a common kernel within Unix distributions has implications for software and hardware vendors. For Linux, a vendor can create a device driver for a specific hardware device and expect that, within reason, it will operate across most distributions. Because of the commercial and academic branches of the Unix tree, a vendor might have to write different drivers for variants of Unix and have licensing and other concerns related to access to an SDK or a distribution model for the software as a binary device driver across many Unix variants.
As both communities have matured over the past decade, many of the advancements in Linux have been adopted in the Unix world. Many GNU utilities were made available as add-ons for Unix systems where developers wanted features from GNU programs that aren't part of Unix. For example, IBM's AIX offered an AIX Toolbox for Linux Applications with hundreds of GNU software packages (like Bash, GCC, OpenLDAP, and many others) that could be added to an AIX installation to ease the transition between Linux and Unix-based AIX systems.
Proprietary Unix is still alive and well and, with many major vendors promising support for their current releases well into the 2020s, it goes without saying that Unix will be around for the foreseeable future. Also, the BSD branch of the Unix tree is open source, and NetBSD, OpenBSD, and FreeBSD all have strong user bases and open source communities that may not be as visible or active as Linux, but are holding their own in recent server share reports, with well above the proprietary Unix numbers in areas like web serving.
Where Linux has shown a significant advantage over proprietary Unix is in its availability across a vast number of hardware platforms and devices. The Raspberry Pi, popular with hobbyists and enthusiasts, is Linux-driven and has opened the door for an entire spectrum of IoT devices running Linux. We've already mentioned Android devices, autos (with Automotive Grade Linux), and smart TVs, where Linux has large market share. Every cloud provider on the planet offers virtual servers running Linux, and many of today's most popular cloud-native stacks are Linux-based, whether you're talking about container runtimes or Kubernetes or many of the serverless platforms that are gaining popularity.
One of the most revealing representations of Linux's ascendancy is Microsoft's transformation in recent years. If you told software developers a decade ago that the Windows operating system would "run Linux" in 2016, most of them would have laughed hysterically. But the existence and popularity of the Windows Subsystem for Linux (WSL), as well as more recently announced capabilities like the Windows port of Docker, including LCOW (Linux containers on Windows) support, are evidence of the impact that Linux has had—and clearly will continue to have—across the software world.
--------------------------------------------------------------------------------
via: https://opensource.com/article/18/5/differences-between-linux-and-unix
作者:[Phil Estes][a]
选题:[lujun9972](https://github.com/lujun9972)
译者:[译者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/estesp
[1]:https://en.wikipedia.org/wiki/Multics
[2]:https://en.wikipedia.org/wiki/Unix_philosophy
[3]:https://en.wikipedia.org/wiki/Unix_wars
[4]:https://en.wikipedia.org/wiki/BSD_licenses
[5]:https://en.wikipedia.org/wiki/GNU_Compiler_Collection
[6]:https://distrowatch.com/
[7]:https://brew.sh/

View File

@ -0,0 +1,76 @@
Linux vs Unix有什么不同
=====
![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/BUSINESS_twoforward.png?itok=exkV49ts)
如果你是 20 多岁或 30 多岁的软件开发人员,那么你已经成长在一个由 Linux 主导的世界。数十年来,它一直是数据中心的重要参与者,尽管很难找到明确的操作系统市场份额报告,但 Linux 的数据中心操作系统份额可能高达 70%,而 Windows 及其变体几乎涵盖了所有剩余的百分比。使用任何主要公共云的开发人员可以预期目标系统将运行 Linux。近些年来随着 Android 和基于 Linux 的嵌入式系统在智能手机电视汽车和其他设备中的应用Linux 已经随处可见。
即便如此,大多数软件开发人员,甚至是那些在这场历史悠久的 “Linux 革命”中长大的软件开发人员,至少听过说 Unix。它听起来与 Linux 相似,你可能已经听到人们互换使用这些术语。或者你也许听说过 Linux 被称为“类 Unix ”操作系统。
那么Unix 是什么?漫画中提到了像巫师一样留着“灰胡子”,坐在发光的绿色屏幕后面,写着 C 代码和 shell 脚本受老式的、滴灌的咖啡提供动力。但是Unix 的历史比上世纪 70 年代那些留着胡子的 C 程序员要丰富得多。虽然详细介绍 Unix 历史和 “Unix 与 Linux” 比较的文章比比皆是,但本文将提供高级背景和这些互补世界之间的主要区别的列表。
### Unix 的起源
Unix 的历史始于 20 世纪 60 年代后期的 AT&T 贝尔实验室,有一小组程序员希望为 PDP-7 编写一个多任务、多用户操作系统。贝尔实验室研究机构中最著名的两名成员是 Ken Thompson 和 Dennis Ritchie。尽管 Unix 的许多概念都是其前身([Multics][1])的衍生物,但 Unix 团队早在 70 年代就决定用 C 语言重写这个小型操作系统,这是将 Unix 与其他分离开来的原因。当时操作系统很少如果有的话protableto 校正者,这个 protable 不知道怎样翻译才好)。相反,由于他们的设计和底层语言的本质,操作系统与他们所编写的硬件平台紧密相关。通过 C 语言重构 UnixUnix 现在可以移植到许多硬件体系结构中。
除了这种新的可移植性,之所以使得 Unix 迅速扩展到贝尔实验室以外的其他研究,学术甚至商业用途,是因为操作系统设计原则的几个关键点对用户和程序员都很有吸引力。首先是 Ken Thompson 的 [Unix哲学][2]成为模块化软件设计和计算的强大模型。Unix 哲学推荐使用小型的、专用的程序组合起来完成复杂的整体任务。由于 Unix 是围绕文件和管道设计的因此这种“管道”模式的输入和输出程序的组合成一组线性操作的输入操作现在仍然流行。事实上目前的云功能即服务FaaS或无服务器计算模型归功于 Unix 哲学的许多传统。
### 快速增长和竞争
到 70 年代末和 80 年代Unix 成为了一个家族的起源,它扩展了研究,学术和日益增长的商业 Unix 操作系统业务。Unix 不是开源软件Unix 源代码可以通过与它的所有者 AT&T 达成协议来获得许可。第一个已知的软件许可证于 1975 年出售给 University of Illinois伊利诺伊大学)。
Unix 在学术界迅速发展,由于 Ken Thompson 在 70 年代的休假期间,伯克利成为一个重要的活动中心。通过在伯克利的所有有关 Unix 活动Unix 软件的一种新的交付方式诞生了Berkeley Software Distribution 或 BSD。最初BSD 不是 AT&T Unix 的替代品,而是一种添加类似于附加软件和功能。在 1979 年, 2BSD第二伯克利软件发行版出现时伯克利研究生 Bill Joy 已经添加了现在知名的程序,例如 `vi` 和 C shell/bin/csh
除了成为 Unix 家族中最受欢迎的分支之一的 BSD 之外Unix 的商业产品在 20 世纪 80 年代和 90 年代爆发,其中包括 HP-UX, IBM 的 AIX, Sun 的 Solaris, Sequent 和 Xenix 等。随着分支从根源头发展壮大,“ [Unix 战争][3]”开始了标准化成为社区的新焦点。POSIX 标准诞生于 1988 年,在 90 年代后,其他标准化后续工作也开始通过 The Open Group to 校正者:这里是开源组织吗)进入。
在此期间AT&T 和 Sun 发布了 System V Release 4SVR4许多商业供应商都采用了这一版本。另外BSD 系列操作系统多年来一直在增长,导致一些开源的变体在现在熟悉的 [BSD许可证][4]下发布。这包括 FreeBSD, OpenBSD 和 NetBSD每个 Unix 服务器行业的目标市场略有不同。这些 Unix 变体今天仍然有一些在使用,尽管很多人已经看到他们的服务器市场份额缩小到个位数字(或更低)。在当今的所有 Unix 系统中BSD 可能拥有最大的安装基数。另外BSD 声称每台 Apple Mac 硬件设备都可以申请,因为其 OS X现在是 macOS操作系统是 BSD 衍生产品。
虽然 Unix 的全部历史及其学术和商业变体可能需要更多的页面,但为了我们文章的重点,让我们来讨论 Linux 的兴起。
### 进入 Linux
今天我们所说的 Linux 操作系统实际上是 90 年代初期的两个努力的结合。Richard Stallman 希望创建一个真正的免费和开放源代码的专有 Unix 系统。他正在以 GNU 的名义开发实用程序和程序,它是一种递归算法,意思是“ GNU 不是 Unixto 校正者,这点不太理解)虽然当时有一个内核项目正在进行,但事实证明这是一件很困难的事情,而且没有内核,自由和开源操作系统的梦想无法实现。这是 Linus Torvald 的工作 - 生产出一种可工作和可行的内核,他称之为 Linux -- 它将整个操作系统带入了生活。鉴于 Linus 使用了几个 GNU 工具(例如 GNU 编译器集合或 [GCC][5]GNU 工具和 Linux 内核的结合是完美的搭配。
Linux 发行版采用了 GNU 的组件Linux 内核MIT 的 X-Windows GUI 以及可以在开源 BSD 许可下使用的其他 BSD 组件。像 Slackware 和 Red Hat 这样的发行版早期的流行给了 20 世纪 90 年代的“普通 PC 用户”一个机会进入 Linux 操作系统,并且让他们在工作和学术生活中使用许多特有的 Unix 系统功能和实用程序。
由于所有 Linux 组件都有自由和开放的源代码,任何人都可以通过一些努力来创建一个 Linux 发行版,所以不久后发行版的总数达到了数百个。今天,[distrowatch.com][6] 列出了 312 种独特的 Linux 发行版。当然,许多开发人员通过云提供商或使用流行的免费发行版来使用 Linux如 Fedora, Canonical 的 Ubuntu, Debian, Arch Linux, Gentoo 和许多其他变体。随着包括 IBM 在内的许多企业从专有 Unix 迁移到 Linux 上并提供中间件和软件解决方案,商用 Linux 产品在免费和开源组件之上提供支持变得可行。红帽公司围绕 Red Hat Enterprise Linux红帽企业版 Linux 建立了商业支持模式,德国供应商 SUSE 使用 SUSE Linux Enterprise ServerSLES也提供了这种模式。
### 比较 Unix 和 Linux
到目前为止,我们已经了解了 Unix 的历史以及 Linux 的兴起,以及 GNU/自由软件基金会对 Unix 的免费和开源替代品的支持。让我们来看看这两个操作系统之间的差异,它们有许多共同的传统和许多相同的目标。
从用户体验角度来看两者差不多Linux 的很大吸引力在于操作系统在许多硬件体系结构(包括现代 PC上的可用性以及类似使用 Unix 系统管理员和用户熟悉的工具的能力。
由于 POSIX 的标准和合规性,在 Unix 上编写的软件可以针对 Linux 操作系统进行编译通常只有少量的移植工作量。在很多情况下Shell 脚本可以在 Linux 上直接使用。虽然一些工具在 Unix 和 Linux 之间有着略微不同的标志或命令行选项,但许多工具在两者上都是相同的。
一方面要注意的是macOS 硬件和操作系统作为主要针对 Linux 的开发平台的流行可能归因于类似 BSD 的 macOS 操作系统。许多用于 Linux 系统的工具和脚本可以在 macOS 终端内轻松工作。Linux 上的许多开源软件组件都可以通过 [Homebrew][7] 等工具轻松获得。
Linux 和 Unix 之间的其他差异主要与许可模式有关:开源与专有许可软件。另外,在 Unix 发行版中缺少一个通用内核对软件和硬件供应商有影响。对于 Linux供应商可以为特定的硬件设备创建设备驱动程序并期望在合理的范围内它可以在大多数发行版上运行。由于 Unix 家族的商业和学术分支,供应商可能必须为 Unix 的变体编写不同的驱动程序,并且需要许可和其他相关的权限才能访问 SDK 或软件的分发模型,以跨越多个二进制设备驱动程序的 Unix 变体。
随着这两个社区在过去十年中的成熟Linux 的许多优点已经在 Unix 世界中被采用。当开发人员需要来自不属于 Unix 的 GNU 程序的功能时,许多 GNU 实用程序可作为 Unix 系统的附件提供。例如IBM 的AIX为 Linux 应用程序提供了一个 AIX Toolbox其中包含数百个 GNU 软件包(如 Bash, GCC, OpenLDAP 和许多其他软件包),这些软件包可添加到 AIX 安装包中以简化基于 Linux 和基于 Unix 的 AIX 系统。
Unix 仍然活着而且还不错,许多主要供应商承诺支持其当前版本,直到 2020 年。不言而喻Unix 还会在可预见的将来一直出现。此外Unix 的 BSD 分支是开源的,而 NetBSD, OpenBSD 和 FreeBSD 都有强大的用户基础和开源社区,它们可能不像 Linux 那样明显或活跃,但在最近的服务器报告中,它们远高于 Web 服务等领域的专有 Unix 数量。
Linux 已经显示出超越 Unix 的显著优势在于其在大量硬件平台和设备上的可用性。Raspberry Pi树莓派受到业余爱好者的欢迎它是由 Linux 驱动的,为运行 Linux 的各种物联网设备打开了大门。我们已经提到了 Android 设备,汽车(包括 Automotive Grade Linux和智能电视其中 Linux 占有巨大的市场份额。这个星球上的每个云提供商都提供运行 Linux 的虚拟服务器而且当今许多最受欢迎的本地云to 校正者cloud-native 这个词需要斟酌以下)堆栈都是基于 Linux 的,无论你是在谈论容器运行时还是 Kubernetes或者是许多正在流行的无服务器平台。
其中一个最显著的代表 Linux 的优势是近年来微软的转变。如果你十年前告诉软件开发人员Windows 操作系统将在 2016 年“运行 Linux”他们中的大多数人会歇斯底里地大笑。 但是 Windows Linux 子系统WSL的存在和普及以及最近宣布的诸如 Docker 的 Windows 端口,包括 LCOWWindows 上的 Linux 容器)支持等功能都证明了 Linux 在整个软件世界中所产生的影响 - 而且显然还会继续存在。
--------------------------------------------------------------------------------
via: https://opensource.com/article/18/5/differences-between-linux-and-unix
作者:[Phil Estes][a]
选题:[lujun9972](https://github.com/lujun9972)
译者:[MjSeven](https://github.com/MjSeven)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:https://opensource.com/users/estesp
[1]:https://en.wikipedia.org/wiki/Multics
[2]:https://en.wikipedia.org/wiki/Unix_philosophy
[3]:https://en.wikipedia.org/wiki/Unix_wars
[4]:https://en.wikipedia.org/wiki/BSD_licenses
[5]:https://en.wikipedia.org/wiki/GNU_Compiler_Collection
[6]:https://distrowatch.com/
[7]:https://brew.sh/