Unix/Linux 扫盲笔记

This document is not completed and will be updated anytime.

Unix

Unix is a family of multitasking, multiuser computer OS.

Derive from the original AT&T Unix, Developed in the 1970s at Bell Labs (贝尔实验室), initially intended for use inside the Bell System.

AT&T licensed Unix to outside parties(第三方) from the late 1970s, leading to a variety of both academic (最有有名的 BSD ) and commercial (Microsoft Xenix, IBM AIX, SunOS Solaris)


Unix-like

A Unix-like (sometimes referred to as UNX or nix) operating system is one that behaves in a manner similar to a Unix system, while not necessarily conforming to or being certified to any version of the Single UNIX Specification.

There is no standard for defining the term.
其实 Unix-like 是个相对模糊的概念:

Single UNIX Specification

The Single UNIX Specification (SUS) is the collective name of a family of standards for computer OS, compliance with which is required to qualify for the name “Unix”, like POSIX.

Apple iOS

iOS is a Unix-like OS based on Darwin(BSD) and OS X, which share some frameworks including Core Foundation, Founadtion and the Darwin foundation with OS X, but, Unix-like shell access is not avaliable for users and restricted for apps, making iOS not fully Unix-compatible either.

The iOS kernal is XNU, the kernal of Darwin.

XNU Kernel

XNU, the acronym(首字母缩写) for X is Not Unix, which is the Computer OS Kernel developed at Apple Inc since Dec 1996 for use in the Mac OS X and released as free open source software as part of Darwin.


Linux

Linux is a Unix-like and mostly POSIX-compliant computer OS.

Unix_timeline

Linux Kernel

严格来讲,术语 Linux 只表示 Linux Kernel 操作系统内核本身,比如说 Android is Based on Linux (Kernel). Linus 编写的也只是这一部分,一个免费的 Unix-like Kernel,并不属于 GNU Project 的一部分。

但通常把 Linux 作为 Linux Kernel 与大量配合使用的 GNU Project Software Kit (包括 Bash, Lib, Compiler, 以及后期的 GUI etc) 所组合成的 OS 的统称。(包括各类 Distribution 发行版)

这类操作系统也被称为 GNU/Linux

GNU Project

The GNU Project is a free software, mass collaboration project, which based on the following freedom rights:

In order to ensure that the entire software of a computer grants its users all freedom rights (use, share, study, modify), even the most fundamental and important part, the operating system, needed to be written.

This OS is decided to called GNU (a recursive acronym meaning “GNU is not Unix”). By 1992, the GNU Project had completed all of the major OS components except for their kernel, GNU Hurd.

With the release of the third-party Linux Kernel, started independently by Linus Torvalds in 1991 and released under the GPLv0.12 in 1992, for the first time it was possible to run an OS composed completely of free software.

Though the Linux kernel is not part of the GNU project, it was developed using GCC and other GNU programming tools and was released as free software under the GPL.

Anyway, there eventually comes to the GNU/Linux

其他与 GPL 相关的自由/开源软件公共许可证:

Public License

Android

Android is a mobile OS based on Linux Kernel, so it’s definitely Unix-like.

Linux is under GPL so Android has to be open source.
Android’s source code is released by Google under open source licenses, although most Android devices ultimately ship with a combination of open source and proprietary software, including proprietary software developed and licensed by Google (GMS are all proprietary)

Android Kernel

Android’s kernel is based on one of the Linux kernel’s long-term support (LTS) branches.

Android’s variant of the Linux kernel has further architectural changes that are implemented by Google outside the typical Linux kernel development cycle, and, certain features that Google contributed back to the Linux kernel. Google maintains a public code repo that contains their experimental work to re-base Android off the latest stable Linux versions.

Android Kernel 大概是 Linux Kernel 最得意的分支了,Android 也是 Linux 最流行的发行版。不过,也有一些 Google 工程师认为 Android is not Linux in the traditional Unix-like Linux distribution sense. 总之这类东西就算有各种协议也还是很难说清楚,在我理解里 Android Kernel 大概就是 fork Linux Kernel 之后改动和定制比较深的例子。

Android ROM

既然提到 Android 就不得不提提 Android ROM

ROM 的本义实际上是只读内存:

Read-only memory (ROM) is a class of storage medium used in computers and other electronic devices. Data stored in ROM can only be modified slowly, with difficulty, or not at all, so it is mainly used to distribute firmware (固件) (software that is very closely tied to specific hardware, and unlikely to need frequent updates).

ROM 在发展的过程中不断进化,从只读演变成了可编程可擦除,并最终演化成了 Flash

Flash 的出现是历史性的,它不但可以作为 ROM 使用,又因其极高的读写速度和稳定性,先后发展成为U盘(USB flash drives)、移动设备主要内置存储,和虐机械硬盘几条街的固态硬盘(SSD),可以说这货基本统一了高端存储市场的技术规格。

所以我们平时习惯说的 ROM 其实还是来源于老单片机时代,那时的 ROM 真的是写了就很难(需要上电复位)、甚至无法修改,所以那时往 ROM 里烧下去的程序就被称作 firmware ,固件。久而久之,虽然技术发展了,固件仍然指代那些不常需要更新的软件,而 ROM 这个词也就这么沿用下来了。

所以在 wiki 里是没有 Android ROM 这个词条的,只有 List of custom Android firmwares

A custom firmware, also known as a custom ROM, ROM, or custom OS, is an aftermarket distribution of the Android operating system. They are based on the Android Open Source Project (AOSP), hence most are open-sourced releases, unlike proprietary modifications by device manufacturers.

各类 Android ROM 在 Android 词类下也都是属于 Forks and distributions 一类的。

所以我说,其实各类 Android ROM 也好,fork Android 之流的 YunOS、FireOS 也好,改了多少东西,碰到多深的 codebase ……其实 ROM 和 Distribution OS 的界限是很模糊的,为什么 Android 就不可以是移动时代的 Linux ,为什么 Devlik/ART 就不能是移动时代的 GCC 呢?

Chrome OS

Chrome OS is an operating system based on the Linux kernel and designed by Google to work with web applications and installed applications.

虽然目前只是个 Web Thin Client OS ,但是 RoadMap 非常酷……

平复一下激动的心情,还是回到正题来:

Chromium OS

Chrome OS is based on Chromium OS, which is the open-source development version of Chrome OS, which is a Linux distribution designed by Google.

For Detail, Chromium OS based on Gentoo Linux, emm…