This commit is contained in:
Donkey-Hao 2022-09-06 21:37:48 +08:00
parent 90d1d10dea
commit 078cddf2fe

View File

@ -1,99 +1,92 @@
[#]: subject: "What is the Difference Between macOS and Linux?"
[#]: via: "https://itsfoss.com/mac-linux-difference/"
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
[#]: collector: "lkxed"
[#]: translator: "Donkey-Hao"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
What is the Difference Between macOS and Linux?
macOS 和 Linux 有什么区别?
======
We often[compare Linux with Windows][1], but what about comparing it with macOS?
我们经常对比 [Linux 和 Windows 的区别][1],那 macOS 和 Linux 有什么区别呢?
While the differences between Linux and Windows are quite obvious, Linux and macOS may seem similar to many.
虽然 Linux 和 Windows 的差异很明显,但是 Linux 和 macOS 却很相似。
二者都可以在命令行中运行 Unix 命令,并且与用户在 Windows 中的体验大相径庭。同时,并不是所有 Windows 上的应用和游戏可以在 macOS 和Linux 上运行。
Both can run Unix commands in the terminal, and the user experience is vastly different from Windows. And not all Windows applications and games are available for macOS and Linux.
This is why some people even think Apples macOS is based on Linux. But that is not the case. macOS is not Linux despite the similarities.
这就是为什么一些人认为苹果公司的 macOS 是基于 Linux 的系统。尽管有相似之处,但 macOS 并不是 Linux。
There are plenty of differences between the two UNIX-like operating systems and I shall highlight both the similarities and the differences in this article.
这两个类 Unix 的操作系统有很多不同之处,我将在这篇文章中指出二者的异同之处。
So, lets compare Apple and Orange Penguin.
那就让我们来比较一下苹果和橙色企鹅吧。
### macOS vs. Linux: Origins
### macOS vs. Linux:起源
macOS has a fascinating history. The foundation of it was built by Steve Jobss NeXT computer company when he wasnt at Apple. Technically, it was based on the [Mach Kernel][2] and the UNIX-derived BSD.
macOS 有一段迷人的历史。它是由史蒂夫·乔布斯的计算机公司 NeXT 所开发的,那时候乔布斯不在苹果公司工作。从技术上讲,它是基于 [Mach 内核][2] 和 Unix 派生的 BSD。
Back then, a [NeXTSTEP][3] operating system was created to power the devices/computers built by **NeXT**. While it got some attention, it wasnt a big success. Apple later acquired NeXT and brought back Steve onboard as part of the deal, making NeXTSTEP OS the base for macOS.
那时候,**NeXT** 开发了 [NeXTSTEP][3] 操作系统来驱动它设计的设备和电脑。尽管有一些人注意到了该操作系统,但是它未获得成功。之后,苹果公司以恢复史蒂夫董事会席位为交易的一部分,收购了 NeXT 公司,使得 NeXTSTEP OS 成为 macOS 的基础。
This is why macOS has a combination of Unix components along with Apples proprietary technologies.
这就是为什么 macOS 是 Unix 组件和苹果公司独家技术相结合的操作系统。
**On the contrary**, Linux (the kernel) was built as a free and open-source replacement for Unix.
**相反**Linux (内核)是自由并开源的 Unix 的替代品。
Linux is not an operating system but needs different components like [desktop environments][4] to form an operating system. There are [hundreds of Linux-based operating systems][5] called distributions.
Linux 不是一个操作系统,它需要一些组件比如 [桌面环境][4] 才能成为一个操作系统。有许多 [基于 Linux 的操作系统][5],称之为发行版 (distributions) 。
For simplicity, we tend to address it as **Linux** OS instead of a specific Linux distribution.
简单起见,我们将这些操作系统成为 **Linux** 操作系统而不是特定的发行版。
### macOS kernel vs Linux kernel
### macOS 内核 vs Linux 内核
The macOS kernel is officially known as XNU. The [acronym][6] stands for “XNU is Not Unix.” According to [Apples Github page][7], XNU is “a hybrid kernel combining the Mach kernel developed at Carnegie Mellon University with components from FreeBSD and C++ API for writing drivers”. The BSD subsystem part of the code is [“typically implemented as user-space servers in microkernel systems”][8]. The Mach part is responsible for low-level work, such as multitasking, protected memory, virtual memory management, kernel debugging support, and console I/O.
macOS 内核的官方名称为 XNU。 [首字母缩略词][6] 代表 “XNU 不是 Unix”。根据 [苹果公司的 Github 页面][7]XNU 是“将卡内基梅隆大学开发的 Mach 内核,与来自 FreeBSD 的组件,和用于编写驱动程序的 C++ API 相结合的一个混合内核”。代码的 BSD 子系统部分是 [“在微内核系统中实现用户空间服务”][8]。 Mach 部分负责底层工作,例如多任务处理、受保护内存、虚拟内存管理、内核调试支持和控制台 I/O。
While the macOS kernel combines the feature of a microkernel ([Mach][9])) and a monolithic kernel ([BSD][10]), Linux is solely a monolithic kernel. A [monolithic kernel][11] is responsible for managing the CPU, memory, inter-process communication, device drivers, file system, and system server calls.
虽然 macOS 内核结合了微内核 ([Mach][9]) 和单片内核 ([BSD][10]) 的特性,但 Linux 只是一个单片内核。 [单片内核][11] 负责管理 CPU、内存、进程间通信、设备驱动程序、文件系统和系统服务器调用。
### Heres What They Have in Common
### 二者共同之处
macOS utilizes Unix components, and Linux was built as an alternative to Unix. So, what do we have in common here?
macOS 利用 Unix 组件,而 Linux 是作为 Unix 的替代品而构建的。那么,二者有什么共同点?
Both give access to **Unix commands, bash/zsh, and other shells**.
二者都可以使用 **Unix 命令、bash/zsh、以及其他 shell**
The [default shell][12] can be different, but you can always change it as per your preferences.
或许 [默认 shell][12] 会有所不同,但是你可以根据你的喜好进行设置。
Thats about it. I cant think of anything else similar between the two.
除此之外,我想不到二者还有什么相似之处。
Probably a decade back, we could say that both Linux/macOS offered fewer applications.
大概在十年前,我们可以说 Linux/macOS 都提供了更少的应用程序。
But thats not the case anymore.
但时过境迁。
The software ecosystem and game support for both have evolved over the years, which we will discuss later in this article.
多年来,二者的软件生态和游戏支持都在不断发展,我们将在本文后面讨论。
### Codebase: Proprietary vs. Open-Source
### 代码库:闭源与开源
![open source proprietary illustration][13]
macOS is a proprietary operating system, meaning you cannot view the complete operating systems source code.
macOS 是一个闭源的操作系统,意味着你无法看到完整的操作系统源码。
Sure, you have [part of the macOS (mostly GNU) libraries source code available][14]. There is also the [XNU kernel code][15] used in the development of macOS and iOS operating systems. But [you cannot just take this code and build a macOS clone][16] to be installed on any hardware.
当然,可以获得 [部分 macOS (大多为 GNU库的源码][14]。有用来开发 macOS 和 iOS 操作系统的 [XNU 内核代码][15]。但是 [你不能只用该代码构建 macOS 的克隆版][16],并安装在任何硬件上。
Its not the end of the world without the source code, but you get **less transparency** on Apples claims and practices to secure and enhance your computer experience.
没有源码的世界不会崩塌,但你会因为苹果公司保护和增强你使用电脑体验的声明和实践,而获得 **更少的透明度**
Some might argue that proprietary code remains hidden for security reasons. However, both proprietary and open-source software remain vulnerable to threats.
一些人认为出于安全的原因而保持闭源。然而,不论开源还是闭源都面临安全威胁。
**The difference between them** is: that open-source software often gets fixed sooner because of community participation by several developers, compared to limited employees working on macOS.
**二者的不同** 是:相对于员工数量有限的苹果公司来说,由于有很多开发者在开源社区中,所以会很快修复开源软件。
Unless you trust Apple without questions, Linuxs open-source model gets an edge.
除非你毫无保留的相信苹果,不然 Linux 的开源模式更胜一筹。
### Purpose and Usage: macOS vs. Linux
### 目的和用途: macOS vs. Linux
macOS is tailored for desktop and laptop usage. It is well-suited for **video editing, graphics designing, and audio editing**.
macOS 专为台式机和笔记本电脑使用而设计。它非常适合于 **视频编辑、图形设计和音频编辑**
When it comes to Linux, you get a host of possibilities. You can use Linux for:
当谈到 Linux ,你可以做很多事情。你可以将 Linux 用于:
* Desktop
* 客户端
* Toaster (yes! I hope you know about [IoT][17])
* Single Board Computers
* Server
* 单片机
* 服务器
Of course, it is not the same experience when using it on various platforms, but Linux can run for various use-cases.
当然,在各种平台上使用它的体验并不相同,但 Linux 可以针对各种用例运行。
So, if you like Linux, you can choose to continue using it on other platforms for a comfortable experience.
所以,如果你喜欢 Linux你可以选择在其他平台上继续使用它以获得舒适的体验。
### macOS vs Linux: User Experience
### macOS vs Linux: 用户体验
When it comes to user experience, it comes down to personal preferences.
当谈到用户体验,这取决于个人喜好。
macOS offers a **pleasing user interface**. It is visually appealing with subtle animations and high-resolution wallpapers/icons.
macOS 提供了 **令人愉悦的用户界面**。微妙的动画和高分辨率的壁纸、图标,这在视觉上很有吸引力。
![macOS Monterey][18]
@ -119,7 +112,7 @@ Overall, the out-of-the-box experience with Linux is inconsistent, but it is cap
And if you are coming from Windows, the interface could be confusing initially.
### Customizability
### 可定制性
![customizability][24]
@ -133,7 +126,7 @@ You can choose to customize the user interface as much as you want, with a wide
While that is good, it could backfire when customizing things on a Linux system. So, you need to learn/explore what you want to customize.
### Hardware Requirements to run macOS vs Linux
### 运行硬件要求:macOS vs Linux
![hardware illustration][26]
@ -151,7 +144,7 @@ In contrast, if you would rather not spend a lot but still want a decent configu
Some skilled tinkerers try running macOS on non-Apple hardware. Such a system is called [Hackintosh][27] but it is certainly nowhere close to the comfort of running Linux on a regular computer.
### Software Ecosystem
### 软件生态
macOS offers a **top-notch native experience** with macOS-exclusive applications or tools made by Apple.
@ -177,7 +170,7 @@ The native app experience depends on the Linux distribution you use.
It may not be as seamless as macOS, but if you are not a professional-grade video/graphics editor, you should not have any issues.
### Gaming on Linux and macOS
### 在 Linux 和 macOS 上游戏
![gaming illustration][31]
@ -195,53 +188,53 @@ Would you spend upwards of **$1800 for a Mac with 16 GB of RAM and 512 GB of SSD
Thats your call.
### Package Manager
### 软件包管理
![package manager illustration new][32]
A package manager helps you quickly find, install, and remove software in your operating system.
软件包管理器能够让你很快地找到、安装或卸载你的操作系统中的软件。
Linux has been the superior force in package management compared to anything out there.
与现有的任何系统相比Linux 一直在包管理方面占据优势。
You get options like [Flatpak][33], [Snap][34], [Synaptic][35], and more out of the box.
你可以获得 [Flatpak][33]、[Snap][34]、[Synaptic][35] 等开箱即用的选项。
But, Mac users do not have anything to rely on by default. Fortunately, an option like [Homebrew][36] makes life easier for macOS users.
但是在默认情况下Mac 用户没有任何可依赖的东西。幸运的是,像 [Homebrew][36] 这样的选项极大的方便了 macOS 用户。
It also supports Linux. So, you can use it across multiple devices to make things easy.
它还支持Linux。因此你可以在多个设备上使用它来简化操作。
### Operating System Updates
### 系统升级
![software update illustration][37]
Apple does not share specific timelines for software updates to the operating system.
苹果公司不会发布其操作系统具体更新的时间。
For instance, **macOS Ventura** (the upcoming version upgrade at the time of writing) suddenly ditched all the Mac devices before 2017.
例如,**macOS Ventura** (在撰写本文时即将进行版本升级)突然放弃了 2017 年之前的所有 Mac 设备。
Interestingly, the previous operating system versions had average support for about **seven years**, but with newer changes, it seems to be about **five** now.
有趣的是,以前的操作系统版本平均支持大约 **七年**,但随着更新的变化,现在似乎大约是 **五年**
With Apple silicons, it may not be a straightforward answer. But, it is safe to assume at least 4-5 years of software support.
对于苹果公司设计的芯片,这或许不是一个简单的答案。但是,至少 4 到 5 年的软件支持是安全的。
Linux gives you options. If you want a stable operating system without feature upgrades but focused on maintenance and security, [LTS editions][38] of Linux distributions give you up to **five years** of updates for free. This is primarily true for [Ubuntu][39] or Ubuntu-based distributions like Linux Mint.
Linux 为你提供了选择。如果你想要一个没有升级功能只专注于维护和安全性的稳定操作系统Linux 发行版的 [LTS 版本][38] 可以免费为你提供 **五年** 的更新。这主要适用于 [Ubuntu][39] 或基于 Ubuntu 的发行版,如 Linux Mint。
Furthermore, theres a subscription plan for Ubuntu, where you can continue receiving security updates for up to **10 years**.
此外,有一个 Ubuntu 订阅项目,你可以持续 **十年** 获取安全更新。
And, it does not end there; you can also opt for [rolling-release distributions][40] that get constant bleeding-edge updates with no timeline for an end. As long as your hardware is competent enough, you should be able to update the operating system with no issues.
而且,它并没有就此结束;你还可以选择 [滚动发行的版本][40],来获得没有结束的时间的持续的前沿更新。只要你的硬件能够胜任,你应该就能毫无问题地更新操作系统。
### macOS vs. Linux: What Should You Pick?
### macOS vs. Linux: 你应该选择哪一个?
macOS can be well worth the price tag if you need it.
如果你需要的话macOS 物有所值。
It is not an easy recommendation for users who just need to surf the web, send emails, and perform some tasks that are possible on any platform.
不建议只需要上网、发送电子邮件,以及执行一些在任何平台上都可以执行的任务的用户购买 macOS。
macOS remains a niche pick.
macOS 仍然是一个不错的选择。
However, Linux has improved to become a usable choice for former Windows/macOS users, computer science students, developers, creative professionals (like us) and a wide range of potential users.
然而,随着 Linux 的改进,它已经成为先前是 Windows/macOS 的用户、计算机专业学生、开发人员、创意专业人士(如我们)以及广泛潜在用户的有用的选择。
There are many reasons to pick Linux over macOS, but not the other way around (I think). What are your thoughts on macOS vs. Linux? You are welcome to share your thoughts in the comments down below.
选择 Linux 而不是 macOS 的原因有很多,但(我认为)不矛盾。你对 macOS 与 Linux 有何看法?欢迎在下面的评论中分享你的想法。
--------------------------------------------------------------------------------
via: https://itsfoss.com/mac-linux-difference/
via: <https://itsfoss.com/mac-linux-difference/>
作者:[Ankush Das][a]
选题:[lkxed][b]
@ -260,35 +253,35 @@ via: https://itsfoss.com/mac-linux-difference/
[6]: https://github.com/apple/darwin-xnu
[7]: https://github.com/apple/darwin-xnu
[8]: http://osxbook.com/book/bonus/ancient/whatismacosx/arch_xnu.html
[9]: https://en.wikipedia.org/wiki/Mach_(kernel
[10]: https://en.wikipedia.org/wiki/FreeBSD
[11]: https://www.howtogeek.com/howto/31632/what-is-the-linux-kernel-and-what-does-it-do/
[12]: https://linuxhandbook.com/change-shell-linux/
[13]: https://itsfoss.com/wp-content/uploads/2022/08/open-source-proprietary-illustration.jpg
[14]: https://opensource.apple.com/releases/
[15]: https://github.com/apple/darwin-xnu
[16]: https://www.techrepublic.com/article/why-apple-open-sourcing-mac-os-x-isnt-terribly-exciting/
[17]: https://www.ibm.com/blogs/internet-of-things/what-is-the-iot/
[18]: https://itsfoss.com/wp-content/uploads/2022/08/macos-monterey-screenshot.jpg
[19]: https://itsfoss.com/wp-content/uploads/2021/12/zorin-os-16-mac.png
[20]: https://itsfoss.com/best-linux-desktop-environments/
[21]: https://itsfoss.com/macos-like-linux-distros/
[22]: https://itsfoss.com/wp-content/uploads/2022/08/pop-os-screenshot-2022.png
[23]: https://itsfoss.com/wp-content/uploads/2022/07/10.-MX-Linux.jpg
[24]: https://itsfoss.com/wp-content/uploads/2022/08/customizability-illustration.jpg
[25]: https://itsfoss.com/kde-customization/
[26]: https://itsfoss.com/wp-content/uploads/2022/08/hardware-illustration-800x450.jpg
[27]: https://www.freecodecamp.org/news/build-a-hackintosh/
[28]: https://itsfoss.com/wp-content/uploads/2022/08/final-cut-pro-mac.jpg
[29]: https://itsfoss.com/wp-content/uploads/2022/08/kdenlive-editor.jpg
[30]: https://itsfoss.com/wp-content/uploads/2021/08/planner-board-view.png
[31]: https://itsfoss.com/wp-content/uploads/2022/08/gaming-illustration.jpg
[32]: https://itsfoss.com/wp-content/uploads/2022/08/package-manager-illustration-new.jpg
[33]: https://itsfoss.com/what-is-flatpak/
[34]: https://itsfoss.com/use-snap-packages-ubuntu-16-04/
[35]: https://itsfoss.com/synaptic-package-manager/
[36]: https://itsfoss.com/homebrew-linux/
[37]: https://itsfoss.com/wp-content/uploads/2022/07/software-update-illustration.jpg
[38]: https://itsfoss.com/long-term-support-lts/
[39]: https://itsfoss.com/getting-started-with-ubuntu/
[40]: https://itsfoss.com/best-rolling-release-distros/
[9]: <https://en.wikipedia.org/wiki/Mach_(kernel>
[10]: <https://en.wikipedia.org/wiki/FreeBSD>
[11]: <https://www.howtogeek.com/howto/31632/what-is-the-linux-kernel-and-what-does-it-do/>
[12]: <https://linuxhandbook.com/change-shell-linux/>
[13]: <https://itsfoss.com/wp-content/uploads/2022/08/open-source-proprietary-illustration.jpg>
[14]: <https://opensource.apple.com/releases/>
[15]: <https://github.com/apple/darwin-xnu>
[16]: <https://www.techrepublic.com/article/why-apple-open-sourcing-mac-os-x-isnt-terribly-exciting/>
[17]: <https://www.ibm.com/blogs/internet-of-things/what-is-the-iot/>
[18]: <https://itsfoss.com/wp-content/uploads/2022/08/macos-monterey-screenshot.jpg>
[19]: <https://itsfoss.com/wp-content/uploads/2021/12/zorin-os-16-mac.png>
[20]: <https://itsfoss.com/best-linux-desktop-environments/>
[21]: <https://itsfoss.com/macos-like-linux-distros/>
[22]: <https://itsfoss.com/wp-content/uploads/2022/08/pop-os-screenshot-2022.png>
[23]: <https://itsfoss.com/wp-content/uploads/2022/07/10.-MX-Linux.jpg>
[24]: <https://itsfoss.com/wp-content/uploads/2022/08/customizability-illustration.jpg>
[25]: <https://itsfoss.com/kde-customization/>
[26]: <https://itsfoss.com/wp-content/uploads/2022/08/hardware-illustration-800x450.jpg>
[27]: <https://www.freecodecamp.org/news/build-a-hackintosh/>
[28]: <https://itsfoss.com/wp-content/uploads/2022/08/final-cut-pro-mac.jpg>
[29]: <https://itsfoss.com/wp-content/uploads/2022/08/kdenlive-editor.jpg>
[30]: <https://itsfoss.com/wp-content/uploads/2021/08/planner-board-view.png>
[31]: <https://itsfoss.com/wp-content/uploads/2022/08/gaming-illustration.jpg>
[32]: <https://itsfoss.com/wp-content/uploads/2022/08/package-manager-illustration-new.jpg>
[33]: <https://itsfoss.com/what-is-flatpak/>
[34]: <https://itsfoss.com/use-snap-packages-ubuntu-16-04/>
[35]: <https://itsfoss.com/synaptic-package-manager/>
[36]: <https://itsfoss.com/homebrew-linux/>
[37]: <https://itsfoss.com/wp-content/uploads/2022/07/software-update-illustration.jpg>
[38]: <https://itsfoss.com/long-term-support-lts/>
[39]: <https://itsfoss.com/getting-started-with-ubuntu/>
[40]: <https://itsfoss.com/best-rolling-release-distros/>