Unix和Linux的区别

等等,我昨天帮一个朋友安装了他的电脑,他坚持要安装过时的Solaris。
安装完后,他连蓝牙都认不出来,花了好长时间。
这让我想起了我实验室使用的老式Unix服务器,运行AIX系统,每次更新都要等待IBM的邮件通知,慢得像乌龟爬一样。
但说实话,当时的稳定性确实让人放心,企业里跑数据库的人还是离不开它。

Unix 最初是由贝尔实验室的人在 2 0 世纪 7 0 年代开发的。
那时还没有个人电脑。
他们考虑建立一个分时系统,以便几个人可以同时使用一台大型计算机。
记得查资料看到,1 9 7 3 年Unix第一个版本发布时,代码量只有一万多行。
Now the Linux kernel has almost 1 0 million lines. 但Unix人后来分裂了。
BSD小组上了大学,创建了FreeBSD和OpenBSD,非常自由。
AT&T集团变成了商业产品,比如Solaris和AIX,而且收费也很吓人。

Linux是1 9 9 1 年才问世的,当时Linus还是个大学生,就用C语言写了一个内核。
他原本想构建一个比 Minix 更容易使用的系统,Minix 是一个用于在大学教授操作系统课程的模拟系统。
One of the great benefits of Linux is that it is open source and anyone can read and modify the code. This is completely different from the mysterious closed development of Unix in the early days. The GNU people contributed various tools, such as ls and cp, to make Linux run.
Look now, fewer and fewer companies are still using Solaris. 上次去银行培训,他们机房的几台Sun服务器都运行Oracle数据库,管理员都快退休了。
But the BSD group is quite active, and FreeBSD is used a lot on NAS. TrueNAS 基于 FreeBSD。
我有一个朋友,专门玩路由器。
The kernel of the home router he bought is OpenBSD, which is very safe.
Linux is now the leader in the server industry. Cloud platforms such as AWS and Azure all use the Linux kernel for virtual machines. I set up a server on AWS last year, and the system I chose was a bunch of Linux options, and there were not many candidates for Windows Server. Especially on the mobile side, the bottom layer of Android is the Linux kernel. Many of the applications running on your phone run on the Linux system. But there are too many Linux distributions, including Ubuntu, Debian, CentOS, Arch, and Fedora. The last time I helped a colleague install the system, he chose Arch. After struggling for half a month, he said that the system was too clean and did not even have a graphical tool.
There are only so many old programmers left in the Unix community. 我曾经参加过一个FreeBSD线下活动。
There were only about twenty people in the audience, all of them gray-haired old men. What they talked about were esoteric technologies such as ZFS and DPDK, which young people couldn't understand at all. But to be honest, the stability of FreeBSD is really incredible. My NAS has been running for five years and has never had a problem.
The Linux community is much more lively, with developers contributing code at various conferences and forums every day. I have followed the Linux kernel mailing list, and there are hundreds of emails every day, all of which are code and discussions. Unlike the Unix people, who have been doing it for decades and are reluctant to add even a new feature. Linux 的人们非常活跃。
They were the first to come up with new things like containers and microservices.
In the final analysis, Unix is ​​the ancestor, and Linux is the latecomer. Unix has been around for so many years, but it still has to rely on商业公司为其提供支持; Linux依靠开源,一下子就流行起来了。
然而,这两个系统的底层设计实际上非常相似。
它们都是多用户、多任务,命令行也类似。
只是Linux更灵活,BSD更自由,商业Unix只是……你知道它很贵。

等一下,我突然想到,如果当年Unix也开源的话,现在的世界会不会不一样呢?

【干货】unix和linux的区别,【收藏】unix和linux的区别

需要明确的是,Unix和Linux的主要区别在于“闭源”和“开源”,这直接决定了它们的使用方式和生态差异。

为了扩展,让我们从最重要的起源差异开始:Unix 于 1 9 6 9 年诞生于贝尔实验室。
这是一个付费交易系统。
去年我们跑的一个金融级服务器项目,使用的是AIX内核,但是License费用占了预算的3 0%;尽管Linux在1 9 9 1 年诞生时就是开源的,但Torvalds仍然将其发布在官方网站公告板上进行开发。
现在全球有 3 000 万台服务器运行 Linux,而且基本上不花钱。
还有一点就是内核架构。
Unix内核设计更加复杂但稳定。
我记得去年我们测试Solaris时,它可以在大约1 G内存上运行8 小时而不崩溃。
Linux内核模块设计更加灵活,但去年我们测试Cento 7 时,突然添加网络模块使系统速度减慢至1 秒2 00ms。
用行话来说,这称为雪崩效应。
事实上,前线的一点延迟让一切都恢复了。

起初我以为这两个文件系统是一样的,但后来我意识到这是错误的。
例如,Solaris 的 ZFS 卷影同步非常有趣,但 Linux ext4 支持更多自定义选项,这在调试嵌入式设备时特别有用。
最后,还有一个陷阱:许多初学者在 Linux 中编写脚本并直接执行 Unix 命令。
例如,ln 软链接无法区分 SIM 链接和硬链接。
去年,一位同事因此导致他的产品组合瘫痪。
说实话,这很尴尬。

linux和unix区别

嘿,你所说的对我来说听起来太过分了,不适合实际操作。
让我告诉你,在几个员工中,我正在考虑更改服务器的系统。
当时有些人在使用Linux,另一些人则坚持使用Unix。

我觉得,有了Linux,你可以看源码,随意改。
我们在做自定义功能的时候,直接找到源码修改,比外包快很多,而且没有额外的成本。
当时公司财务非常紧张,Linux的好处最为明显。
与 Unix 不同,它的源代码不会向您显示。
如果你想改变一些东西,你必须向制造商申请。
审批过程漫长,最终会被拒绝。
我记得每个半月有一次小调整补充,终于抽出时间来了。

而且Linux的兼容性也不错。
我们的服务器有不同的硬件,如果我们在一个系统上安装Linux并运行它们,就不会有什么大问题。
如果要使用Unix,可以为不同类型的服务器准备不同的版本,维护起来比较麻烦且昂贵。
今年我们买了几台旧机器,买的都是Linux的。
旧硬盘和旧CPU对每个人都有用,可以节省很多钱。

在Linux上安装也很简单。
我有一个朋友,他是电脑新手。
花了很长时间安装Windows,最后还是安装了Linux。
他按照网上的步骤,半个小时就搞定了。
Unix非常复杂。
对于技术人员来说,这是第一次安装Unix。
我们对订单行感到困惑,花了两个小时才弄明白。

但是 Unix 也有优点。
比如关于稳定性,他采用了后来基于Unix的旧系统。
它运行了大约十年,没有出现任何重大问题。
虽然Linux也稳定,但Unix在高负载下的长期稳定性方面更有优势。
今年,我们社会的一位重要公仆突然崩溃了。
上次调查显示Linux内核中存在一个老bug。
换了Unix系统后,稳定性更好了。

那么,你看,善恶都不是绝对的。
关键要看你的需求是什么。
如果您追求自由、成本和便利,Linux 绝对是一个不错的选择。
如果你对稳定性和兼容性有必要的一笔,并且有足够的预算,Unix也是一个不错的选择。
综合考虑后最终选择了Linux,结果还不错。