Linux 早期岁月 (2023)
User: Password: | | Subscribe / Log in / New account
Linux 早期岁月
请考虑订阅 LWN 订阅是 LWN.net 的命脉。如果您喜欢这些内容并希望看到更多,您的订阅将有助于确保 LWN 继续蓬勃发展。请访问 此页面 进行注册,并让 LWN 继续在线。 2023 年 4 月 12 日 本文由 Lars Wirzenius 投稿
我叫 Lars Wirzenius,我见证了 Linux 的诞生。如今 Linux 已经取得了全球性的成功,但它的起源却非常 humble。这些是我对 Linux 最早期的记忆,包括它的创建以及它走向今天的道路的开端。
1988 年秋天,我开始在赫尔辛基大学学习计算机科学,并遇到了 Linus Torvalds,他是当年另一位说瑞典语的计算机科学新生。在第一年快结束的时候,我们获得了访问一台 Unix 服务器的权限,我不小心将 rm
误输入为 rn
,即 Usenet 阅读器,从而偶然发现了 Usenet,这个讨论系统。我告诉了 Linus,然后我们花了太多的时间来探索它。
第一年结束后,我们都去服了义务兵役,虽然地点不同。1990 年秋天,我们返回学校继续学习,并都选修了 C 和 Unix 编程课程,其中还包括相当多的 Unix 内核架构理论。这导致我们阅读了其他操作系统内核,例如 QNX 和 Plan 9。Linus 和我充满热情地讨论了应该如何正确地构建操作系统。我们拥有 20 岁二年级大学生的所有过度自信。幸好这些没有被记录下来,否则不堪回首。
1991 年 1 月,Linus 从一家当地商店购买了他的第一台 PC,这家商店从零件组装电脑。这台 PC 配备了 386 CPU,在当时算是比较 fancy 的,因为 Linus 想要探索 multitasking。此外,由于他之前用的是配备 32 位 Motorola 68008 CPU 的 Sinclair QL,所以他想要一个 32 位 CPU,不想降级到 16 位的,因此 286 不是一个选项。Linus 的第一台 PC 配备了 whopping 4 MB 的 RAM 和一个硬盘。
他得到了一份《波斯王子》游戏,在接下来的几个月里占据了他大部分的空闲时间。后来,他还购买了一份 MINIX,因为在大学里使用过 Unix 之后,他也想在家里拥有类似的东西。
A 和 B
完成游戏后,Linus 开始学习 Intel 汇编语言。有一天,他向我展示了一个可以进行 multitasking 的程序。一个 task 或线程会在屏幕上写入一连串的字母 "A",另一个则写入 "B";当 "A" 的流变成 "B" 时,上下文切换在视觉上很明显。这是后来被称为 Linux 内核的第一个版本。
Linus 后来扩展了这个程序,并用 C 编写了大部分代码。在这段时间里,1991 年的晚春,我为他编写了 C sprintf()
函数的实现,因为他还没有学会如何编写带有可变参数列表的函数。我不想让他为每种要写出的 value 都使用不同的函数。这段代码的核心仍然在内核中,作为 snprintf()
。
随着时间的推移,Linus 不断改进他这个新生的内核,并不断实现新的东西。过了一段时间,他有了键盘和串行端口的驱动程序,VT100 终端转义序列的屏幕仿真,并且可以使用它通过调制解调器拨号到大学从家里读取 Usenet。科幻!有一天,Linus 不小心尝试使用他的硬盘拨号到大学,导致他的主引导扇区以 "ATDT" 和大学调制解调器池的电话号码开头。从这件事情恢复过来后,他在他的内核中实现了文件权限。
1991 年 8 月,Linus 在 comp.os.minix
新闻组中首次公开提到了他的新内核。其中包括这样一句话:“我正在做一个(免费的)操作系统(只是一个 hobby,不会像 gnu 那样变得庞大和专业)”。多么谦逊。这个系统最初被称为 Freax。几周后,Linus 请 ftp.funet.fi
的管理员之一 Ari Lemmke 上传第一个 tar 压缩包。Ari 选择了 Linux 这个名字。最初的版本仍然包含嵌入在其中一个源文件中的原始名称。
在此期间,人们有兴趣尝试这个新事物,因此 Linus 需要提供安装方法和说明。由于他只有一台 PC,所以他来我家拜访,以便在我的机器上安装它。由于他的电脑被用于开发 Linux,而 Linux 只是在他的 MINIX 安装之上发展起来的,所以它实际上从未被安装过。因此,我的 PC 是 Linux 首次安装的机器。当这件事情发生时,我正在打盹,我推荐这种安装 Linux 的方法:打盹,而 Linus 做 hard work。
Linux 的第一个版本使用的许可证禁止商业用途。一些早期的贡献者建议修改为自由软件许可证。1991 年秋天,Richard Stallman 访问了芬兰,我带 Linus 去听了 Stallman 的演讲。这件事、来自贡献者的压力以及我的 nagging 最终说服 Linus 在 1992 年初选择了 GNU GPL 许可证。
在圣诞节假期,Linus 在 Linux 中实现了虚拟内存。这使得 Linux 在内存少的廉价机器上成为一个更加实用的操作系统。
1992
1992 年以与 Andrew Tanenbaum 的著名辩论开始,他是一位大学教授,也是 MINIX 的作者。他对 Linux 及其架构有一些看法。Linus 对 MINIX 有看法。这场辩论被描述为一场 flame war,但事后看来实际上相当文明。
对 Linux 未来的成功更重要的是,X11 系统被移植到了 Linux 上,使得 1992 年成为 Linux 桌面之年。
我选择在社区方面做出贡献,而不是直接贡献于内核,并帮助回答问题、编写文档等等。我还创办了一个关于 Linux 的 short-lived newsletter,其主要价值在于发布了对 Linus 的首次采访。该 newsletter 实际上被 comp.os.linux.announce
新闻组所取代。
第一个 Linux 发行版也是在 1992 年开始的:Softlanding Linux System 或 SLS。第二年,SLS 演变成了 Slackware,这启发了 Ian Murdock 在 1993 年启动 Debian,以探索一种更加基于社区的开发结构。在未来的几年里,又出现了其他一些发行版。
1993 年,Linus 和我都获得了在大学担任助教的工作。我们可以共用一个办公室。那个房间里有一台 PC,Linus 接管了它,并将其用于 Linux 开发。我很高兴有一个 DEC 终端用于访问 Usenet。
有一天,Linus 感到无聊,并且觉得工作中的 PC 速度很慢。他花了一天的时间用汇编语言重写 Linux 内核命令行解析器,以提高速度。(当然,这是毫无意义的,而且该解析器后来会被再次用 C 语言重写,以提高可移植性。它的速度并不重要。)几年后,他花了几天的时间玩 Quake,表面上是为了对内核内存管理进行压力测试,尽管那是在一台更新的 PC 上进行的。在那个房间里有很多乐趣,而且没有任何恶作剧。完全没有。
在某个时候,Linux 获得了对以太网和 TCP/IP 的支持。这意味着人们无需使用调制解调器就可以阅读 Usenet。唉,早期的 Linux 网络代码偶尔有点 rough,因为它是从头开始编写的。有一次,Linux 发送了一些损坏的数据包,导致网络上的所有 Sun 机器都瘫痪了。由于很难修复 Sun 内核,因此 Linux 被禁止访问大学网络,直到其 bug 被修复为止。无法从桌子上访问 Usenet 是一个巨大的动力。
1.0
在 1994 年的春天,我们觉得 Linux 已经完成了。完成了。没什么可添加的了。人们可以使用 Linux 来编译自己,阅读 Usenet,并同时运行多个 xeyes
程序。我们决定发布 1.0 版本,并安排了一个发布活动。芬兰计算机媒体受到了邀请,甚至一家电视台也派出了工作人员。该活动的大部分内容是在后台进行仪式性地编译 Linux 1.0,而 Linus 和其他人则在谈论 Linux 是什么以及它的优势。Linus 解释说,用于 PC 的商业 Unix 非常昂贵,以至于自己编写一个更容易。
1995 年,Linus 和我在大学里做了一个软件工程课程,该课程主要包括一个大型的实践项目。当然,这是在 Linux 之上构建的。我坚持要使用版本控制系统。我目睹了早期课程中的学生做的那种 shouting 类型的版本控制:学生们通过 NFS 共享一个源代码树,并在他们更改某些东西时大喊“我正在编辑这个文件”。我觉得这似乎不是一种有效的方法,所以我坚持使用 CVS,我刚刚了解了它。正是这种经历导致 Linus 不喜欢 CVS,并且多年来拒绝使用任何版本控制,只是将 tar 包上传到 FTP 站点。
那一年也是 Linus 首次将 Linux 移植到新架构的一年。他得到了一台 DEC Alpha 机器。我后来将得到这台机器,用作阅读 Usenet 的终端。其他人将 Linux 移植到其他架构,但这并没有导致我得到更多的机器来阅读 Usenet。
1997 年,Linus 毕业并移居美国,在 Transmeta 找到了一份工作。我在赫尔辛基地区的另一所大学找到了一份工作。
在随后的几年里,发生了很多事情。事实证明,Linux 仍然缺少一些功能,所以人们致力于这些功能。"open source" 这个术语被创造出来,IBM 在 Linux 开发中投入了大量的资金。Netscape 以 open source 的形式发布了其 web browser 的一个版本。跳过一些细节和许多年,open source 基本上接管了世界。LWN 创办了,并每周报道了大部分历史。
1991 年,Linus 写道,Linux “不会像 gnu 那样变得庞大和专业”。在 2023 年,Linux 运行在每个大陆、每个海洋、数十亿台设备上、轨道上以及火星上。对于最初只是两个线程,在屏幕上写入 "A" 和 "B" 的流来说,这还不错。
Index entries for this article
GuestArticles| Wirzenius, Lars
to post comments
The early days of Linux
Posted Apr 12, 2023 17:27 UTC (Wed) by ccchips (subscriber, #3222) [Link] Thank you, Lars! Wonderful article!
The early days of Linux
Posted Apr 12, 2023 18:04 UTC (Wed) by Ndjenks (guest, #164469) [Link] (3 responses) Thank you Lars. The story is very interesting and inspiring. It is funny that Linux started as hobby project. :)
The early days of Linux
Posted Apr 12, 2023 18:29 UTC (Wed) by flussence (guest, #85566) [Link] (1 responses) And a good reminder that it's fine even if you start with something akin to a fidget toy and make major screw-ups along the way — something impressive can come out of it if you keep at it long enough.
The early days of Linux
Posted Apr 14, 2023 21:02 UTC (Fri) by Ndjenks (guest, #164469) [Link] You are right.
The early days of Linux
Posted Jul 3, 2023 20:15 UTC (Mon) by n7ekg (guest, #165912) [Link] And a hobby project that attracted a very talented group of individuals from around the world to create something that has changed the face of computing.
The early days of Linux
Posted Apr 12, 2023 18:39 UTC (Wed) by amacater (subscriber, #790) [Link] Typical Lars article - self deprecating and quiet. Thanks for the Linux Documentation Project - I've a huge book next door which is basically all the HOWTOs from about 1994 which got me using Linux properly using first Slackware, then Linux-FT and finally Debian. You could run an ISP using only those HOWTOs - I know because myself and a good friend basically built a small ISP using only that documentation until we could get on the Internet. Thanks Lars for sacrificing a machine to someone else's pet student project and kickstarting everyone else.
The early days of Linux
Posted Apr 12, 2023 20:02 UTC (Wed) by iabervon (subscriber, #722) [Link] Are you sure he was playing Quake and not Doom? Quake didn't come out until well after Linux was finished and wouldn't need memory management stress tested any more, but Doom got ported around the right time, I think.
The early days of Linux
Posted Apr 12, 2023 20:11 UTC (Wed) by halla (subscriber, #14185) [Link] Heh... Yes, this was a nice read. But I'm going to add something. I wasn't involved in free software, programming or anything back then. Sure, I bought Dr Dobbs every month, but my major was Comparative and Historical Linguistics of the Sino-Tibetan languages. But got together with my wife (and now I'm, her wife, all of thirty years later) and we got a stack of SLS floppies from our neighbour in the converted-to-appartments-convent-school appartment where we lived, back then (every school room was converted into a living/kitching + bedroom + bathroom). He gave my wife those 3.5" disks because she liked nethack, and knew I was being re-schooled into an Oracle 4GL programmer, at the time. Our first child was coming up... We managed to boot up and install Linux back then in 1993, and never looked back. Well, I'm looking back now, but whatevs. Linux Journal. gui toolkits, windowmaker, fvwm, wordperfect for Unix, there's been so much!
The early days of Linux
Posted Apr 12, 2023 22:09 UTC (Wed) by leromarinvit (subscriber, #56850) [Link]
While this was happening, I was taking a nap, and I recommend this method of installing Linux: napping, while Linus does the hard work. I'd like to nominate this gem as QOTW. It also reminds me of another recent article here, which quoted Rebecca Giblin saying (about Cory Doctorow) "if he were here, he would say 'please don't do that'". I imagine that might be applicable here as well... Thank you, Lars, for this wonderfully written piece of history!
The early days of Linux
Posted Apr 12, 2023 23:21 UTC (Wed) by csigler (subscriber, #1224) [Link] (5 responses) Who has two thumbs and still misses Usenet?............
The early days of Linux
Posted Apr 13, 2023 5:53 UTC (Thu) by bof (subscriber, #110741) [Link] (1 responses) I miss alt.religion.kibology, which was the way better talk.bizarre. I miss Andy Glew and Terje Mathisen penning hyper insightful articles on processor architecture and optimisations, on comp.arch That's about it...
The early days of Linux
Posted Apr 13, 2023 16:30 UTC (Thu) by anton (subscriber, #25547) [Link] Just resubscribe to comp.arch. Terje Mathisen is still active, although Andy Glew isn't.
The early days of Linux
Posted Apr 13, 2023 6:11 UTC (Thu) by jem (subscriber, #24231) [Link] (1 responses) I have always suspected the name of the 'rn' program was carefully chosen to be very similar to the often used 'rm'.
The early days of Linux
Posted Apr 13, 2023 20:20 UTC (Thu) by klossner (subscriber, #30046) [Link] It was a replacement for the then-ubiquitous "readnews" program, whose name took far too long to type.
The early days of Linux
Posted Apr 13, 2023 23:29 UTC (Thu) by jschrod (subscriber, #1646) [Link] Don't tell anybody -- but, it's still there, and actually quite usable nowadays. The flamers and AOL me-toos have gone, to Facebook, Twitter and other venues. Currently it's similar to the late 80s, and I like that. ;-)
The early days of Linux
Posted Apr 13, 2023 2:09 UTC (Thu) by hendry (guest, #50859) [Link] Pleasure to know you Lars. You inspired me and many others!
The early days of Linux
Posted Apr 13, 2023 6:25 UTC (Thu) by bof (subscriber, #110741) [Link] What a nice piece of history. Thanks Lars! Still remember creating SLS install disks, downloaded through the University FTP access, getting them to work and then just cloning and compiling for a few years what came up afterwards, who needs distros actually... Incredible that you could do all that back then on a 386 with just iirc 8 MB of RAM, and half a Gig or so of disk. Never looked back to the previous OSses I ran, because - why? P.S.: Lars, remember our CeBIT booth backroom hacking on Kannel, early 00s? It was such a joy working with you on that back then!
The early days of Linux
Posted Apr 13, 2023 6:27 UTC (Thu) by ccezar (subscriber, #2749) [Link] Thank you Lars!
The early days of Linux
Posted Apr 13, 2023 8:14 UTC (Thu) by pmatilai (subscriber, #15420) [Link] Priceless! :D Thank you for sharing!
The early days of Linux
Posted Apr 13, 2023 8:36 UTC (Thu) by rsidd (subscriber, #2582) [Link] (9 responses) Very nice article. I first encountered Linux in 1994, where some nerds in my grad school had already set up a PC running Linux 1.1.3 (I think) to be the department's mail relay. And within a year or two there were Linux desktops around the theoretical physics group, with X11 and all. I remember the desktop viewport was larger than the screen resolution (640x480 in those days) and you had to pan around with a mouse, but it seemed better than Windows95 on the same machine.
The early days of Linux
Posted Apr 13, 2023 8:39 UTC (Thu) by rsidd (subscriber, #2582) [Link] (8 responses) PS - reading Linus's interview (1992 (his style seems to have changed later (just a little))), I wonder if he was ever interested in Lisp programming (just joking (I think)). corbet is clearly a C programmer; his love of semicolons indicates that.
Semicolons
Posted Apr 13, 2023 13:31 UTC (Thu) by corbet (editor, #1) [Link] (6 responses) The first high-level language I learned was actually Pascal, which was the future according to my university's CS department. I suspect that warped my mind in a number of ways...
Semicolons
Posted Apr 13, 2023 14:42 UTC (Thu) by Wol (subscriber, #4433) [Link] :-) FORTRAN - and I can tell it's warped my mind :-) Cheers, Wol
Semicolons
Posted Apr 14, 2023 1:54 UTC (Fri) by Cyberax (✭ supporter ✭ , #52523) [Link] (3 responses)
The first high-level language I learned was actually Pascal Since we're quoting Linus today: "Yeah, yeah, most practical versions of Pascal ended up having all the stuff necessary to break structure, but as you may be able to tell, I was one of the unwashed masses who had to write in "standard Pascal" in my youth. I'm scarred for life"
Semicolons
Posted Apr 14, 2023 4:27 UTC (Fri) by rsidd (subscriber, #2582) [Link] (1 responses) My first language was BASIC, on a TRS-80 and a BBC Micro. Then came Pascal (Turbo Pascal on MS-DOS). I learned C in grad school in a physics department. I successfully avoided learning Fortran ever. But I'm told Fortran 2003 onwards is not so bad.
Semicolons
Posted Apr 17, 2023 1:02 UTC (Mon) by mathstuf (subscriber, #69389) [Link] Fortran certainly is interesting these days. Many modifiers are available to fine tune exactly what you mean (instead of C's "eh, something sane or UB" coin flip). Of course, discovering the modifiers is troublesome at times and with umpteen ways to spell things, the "best" way feels more like C++ subsetting arguments if one cared enough to argue about it.
Semicolons
Posted May 15, 2023 5:44 UTC (Mon) by sammythesnake (guest, #17693) [Link] When I was at uni in the late '90s, we had a course "Programming for Physicists" that used Standard Pascal. I was already familiar with a handful of other languages (including TurboPascal™) and finding out that there was such a thing as a "high level" language with no concept of "strings" was mind blowing (and not in a good way)! Thankfully, I understand that my cohort was the last year before they switched to using that new fangled "Java" thing, which despite valid criticisms was at least a great language for learning how to "do OOP right". Standard Pascal is not, IMNSHO a "great language" for really anything other than being less brain damaging than my later experience having to use that prehistoric dinosaur FORTRAN - and because it was in the context of stick-in-the-mud physicists at a university, it was a pretty early flavour, too (which at least had strings as of FORTRAN77 in '78, 2 decades before that Pascal course!) I'm mostly Ok now, though. twitch
Semicolons
Posted Apr 20, 2023 7:58 UTC (Thu) by fest3er (guest, #60379) [Link] Not Algol? :)
The early days of Linux
Posted Apr 13, 2023 14:44 UTC (Thu) by Klaasjan (subscriber, #4951) [Link] I see what you did there ;)
The early days of Linux
Posted Apr 13, 2023 14:00 UTC (Thu) by Tet (subscriber, #5433) [Link] (1 responses) Great article, but one minor correction - the first Linux distribution was MCC Interim Linux. SLS didn't arrive until slightly later. I'd been using HJ Lu's boot/root disks, but switched to MCC when it was released.
The early days of Linux
Posted Jul 3, 2023 19:04 UTC (Mon) by n7ekg (guest, #165912) [Link] And it was flexible enough so that it could be modified to create your own distro, at a time when a Linux distro could be created on a few floppies. Fun times! I did a distro that was elm/uucp-centric, but lost all of my old software and archives in Hurricane Ivan. :(
The early days of Linux
Posted Apr 13, 2023 17:10 UTC (Thu) by karim (subscriber, #114) [Link] Wow. Simply one of the best pieces I've read about Linux in a few years. No jokes. Thanks for taking the time to share this.
The early days of Linux
Posted Apr 14, 2023 6:24 UTC (Fri) by wtarreau (subscriber, #51152) [Link] (1 responses) Awesome article that brings back lots of memories from that era. I discovered Linux in 1994 with SLS and kernel 1.0.4 or 1.0.5 and by then it looked like like a hack, I remember that it was enough to let "ping" run for a few tens of seconds to completely lose network connectivity on that NE2000 card. But everything was fun in it. When you booted from floppies to that white-on-black "login:" prompt, you really felt that the computer was waiting for you to be creative today. Your story about multi-tasking with "A" and "B" is excellent. I did something comparable when trying to turn an XT motherboard to SMP. I noticed the 8087 and 8088 almost had the same pinout, and using a pair of 74LSxx chips solder on top of it with the