LLM 证明了 Unix 的胜利。
LLMs are proof that Unix won

原始链接: https://bastian.rieck.me/blog/2026/unix/

作者讲述了自己从早年 Windows 系统的严格束缚,迈向类 Unix 系统那般自由如“数字粘土”般的旅程。从命令行新手到 Linux 高级用户,作者推崇 Unix 哲学:通过小型、专业化的工具,以文本流进行交互,从而构建定制化且强大的工作流。 虽然作者曾将精通命令行视为一种精英主义技能——疏远了那些习惯于限制性、预设图形界面(GUI)的用户,但大型语言模型(LLM)的兴起弥合了这一鸿沟。LLM 充当了自然语言与复杂 Shell 命令之间的翻译官,让终端的强大功能变得触手可及。 最终,作者观察到计算领域一种诗意的演变。尽管现代人工智能异常复杂,但 LLM 强化了这一核心原则:文本是终极的通用接口。在图形界面统治数十年后,基于文本的交互方式再度兴起,这表明 Unix 哲学不仅幸存下来,而且取得了胜利,命令行再次回到了计算创新的核心。

这篇 Hacker News 帖子讨论了一个颇具争议的观点,即“大语言模型(LLM)证明了 Unix 的胜利”。 评论者大多对此类比持怀疑态度。一位用户认为这种比较只是为了博眼球,并指出大语言模型违背了 Unix 的核心哲学,因为它们既不轻量,也不是专注于单一且出色的任务。另一位参与者则指出,现代云原生开发(如 Java、Go、无服务器架构)已经完全抽象了底层操作系统,使得“Unix”层与高层应用逻辑已无关联。 关于命令行工具的可访问性,讨论还演变成了一场激烈的争辩。当一位用户捍卫经典 CLI 工具的强大功能并贬低那些觉得其难以使用的人时,另一位回复者批评这种态度“自以为是”且脱离实际,认为技术社区的精英主义疏远了用户。总的来说,该帖既是对将历史技术哲学不严谨地应用于现代人工智能的批判,也反映了关于技术门槛的持续文化冲突。
相关文章

原文

When I first learned about Unix and “Unix-like” operating systems, I was intrigued. I had only known the colorful world of Windows 3.1 so far. Like Japanese carpentry, everything seemed to be carved out of one block with no apparent cracks (except that Japanese carpentry is rock solid, and the same cannot be said about Windows 3.1 with a straight face). Imagine my surprise when I sat in front of a command-line prompt for the first time. The blinking cursor dared me to enter something and there was, at first, no obvious way to achieve any of the things I already knew a computer could do. A formidable puzzle—I was hooked! Thanks to a surprisingly well-stocked library the next village over, I learned that there are different flavors or evolutionary cousins of Unix, and that some of their behavior is codified by standards like POSIX. I also learned about GNU and the heroic efforts of the first waves of hackers who made all of this software available to a world that seemed more interested in locking down everything and preventing any tinkering. O brave new world!

But I persisted. I stared down the ever-blinking prompt and fed it. Many moons later, after a detour with FreeBSD, I remain an avid Linux user since it suits my working style: I like to live dangerously, often deferring kernel updates right before important deadlines—what a thrill—and generally being quite optimistic about my ability to get myself out of any jam. What I appreciate is that Linux lets me exercise my self-efficacy. In essence, virtually all the pain I may experience by using it is, to a large extent, self-inflicted. That feels so much better than having to pray that the next iOS update does not destroy my devices or some other nonsense.

This attitude is often met with blank stares or the usual “Anyway, …” by people who just don’t get it, i.e., almost everyone else who is not a huge nerd, Neal Stephenson fan, or blessed with an abundance of free time. Next to the nice tingling sense of danger, the thing that entices me most about Linux is the ability to mold it to my purposes like digital clay. Many of the command-line tools I use have been around for quite some time now but they still work admirably and allow me to do things like this:

rg -t py "^\s*url ="                               \
  | grep -Eo "(http|https)://[a-zA-Z0-9./?=_%:-]*" \
  | awk -F/ '{print $3}'                           \
  | sort                                           \
  | uniq -c                                        \
  | sort -rn

In natural language, the purpose of this command is to extract and count domain names like github.com from URLs that are assigned to variables named url across all Python files in the current directory and its subdirectories. If this reads like gibberish to you, my younger hothead self, full of (neo)vim and vigor, would have hit you with the old “Linux is very user-friendly; it’s just also super picky about its friends.” Yes, younger me was adept at making enemies like a craftsman.

With the wisdom and mellowing of the years, I would now be diplomatic, but it still strikes me as odd that this way of working with a computer is so alien to many. Explaining my ancient workflow to someone who is used to only modern GUIs is a bit like explaining higher dimensions to someone inhabiting Flatland: At best, they will politely listen before discarding what you said as mildly odd and going back to their old ways. But again, I persisted and stuck to my conviction that a computer should offer you a general-purpose interface that enables you to build things you like. GUIs can only partially sate that need since they need to guess what path you are wont to take. By contrast, the Unix graybeards of yore realized that it is futile to guess or railroad user behavior—instead, they opted to equip everyone with a couple of smallish tools that adhere to a certain philosophy:

  1. Write programs that do one thing and do it well.
  2. Write programs to work together.
  3. Write programs to handle text streams, because that is a universal interface.

Decades later, this still works. Programs have become larger, more complex, but also more convenient for highly-specific cases like video editing—but at the core of many machines lies this wonderful interface that offers nigh-limitless fun. Instead of widening the gap between the CLI dwarves and the GUI elves, however, something unexpected happened, viz., the development of large language models. Presenting at first nothing but an input box to the user, they constituted a deliberate break in habits for many. Here, then, was no GUI waiting for you to specify what type of picture you wanted to create. The prompt was daring you to dream big. I imagine for some, it must have been a bit shocking even—a program that does not tell you what to do with it was unheard of.

And progress marched on, leaving the prompts of the early days for ever-refined queries in natural language. Now, instead of having to know about awk, grep, and friends, one can just ask their favorite LLM:

I want to extract and count domain names like github.com from URLs that are assigned to variables named url across all Python files in the current directory and its subdirectories. How do I do this with a set of shell commands?

The output is quite competent:

grep -rhoP "url\w*\s*=\s*['\"]\Khttps?://[^'\"]+" --include="*.py" . \
    | sed -E 's#https?://##; s#/.*##'                                \
    | sort                                                           \
    | uniq -c                                                        \
    | sort -rn

The commands do more or less the same thing. My hand-crafted one with rg automatically ignores hidden directories, though, which is typically what you want to do when searching code, but I did not provide that context to the LLM. Moreover, -P will fail on operating systems that use the BSD variant of grep. Again, the LLM lacks the context, but this command will work when I copy and paste it into my terminal. I could even use one of the CLI tools myself to make it directly execute the command for me, with the LLM serving as a translator between natural language commands and ancient Unix incantations.

In that sense, LLMs are embodying the Unix philosophy. Of course, this analogy has holes so big you can easily ride a horse through. LLMs are neither small nor do they do one thing—you could even argue that some of the things they do, they certainly do not do well. These issues notwithstanding, LLMs understand that text is the universal interface. Instead of users needing to learn how to talk to the computer, the computer now talks to you. A couple of years ago, this notion would have seemed utterly optimistic. No one would have expected that “text and tokenization” are the recipe for building general-purpose AI models. But here we are, relying less and less on GUIs and instead going back to our beloved Unix-like interface.

For all the problematic things around AI, we may at least find some comfort in being vindicated after so many decades: Text reigns supreme and Unix won.

联系我们 contact @ memedata.com