おれさまラボ

実際に手を動かして理解を深めるブログ。

bashrc の "rc" が何を意味するのか

はじめに

bashrc の "rc" が何を意味するのかについての答えを見かけたので備忘として残しておきます。

"rc" の意味

😃:CTSS → MulticsUNIXLinux というコンピュータの系譜があり、CTSSやMulticsの頃に誕生し、シェルスクリプトの原型とされるRUNCOM(語源="run commands")の名残から、現在でも"rc"が用いられているらしい。

補足情報

MIT

マサチューセッツ工科大学(Massachusetts Institute of Technology)の略称。

参考:マサチューセッツ工科大学 - Wikipedia

CTSS

CTSS(Compatible Time-Sharing System、互換タイムシェアリングシステム)は、MIT計算センターで開発された世界初のタイムシェアリングシステムのひとつ。

参考:CTSS - Wikipedia

タイムシェアリングシステム

タイムシェアリングシステム (Time Sharing System, TSS) は、1台のコンピュータを複数のユーザが同時に利用するためのシステムのこと。

参考:タイムシェアリングシステム - Wikipedia

Multics

Multics(マルティックス)は1960年代に開発されたタイムシェアリングオペレーティングシステムのこと。CTSSの直接の後継にあたる。のちのUNIXに大きな影響を与えることとなったシステム。

参考:Multics - Wikipedia

RUNCOM

MIT計算センターの職員ルイ・プザンによって開発されたCTSS向けのコマンドのこと。これはファイルに書かれているコマンド群を実行するもので、UNIXシェルスクリプトの原型である。

参考:CTSS - Wikipedia

RUNCOMの語源は"run commands"であるとされる。

参考:Run commands - Wikipedia

情報ソース

最初はTwitterで見かけた。

bashrcとかのrcって何?

MITの CTSS (Compatible Time-Sharing System)とMulticsに由来。CTSSにはRUNCOMと呼ぶコマンドがあり、Unixを作ったコミュニティはスクリプトをruncomと呼んでおり拡張子が最初は.rcに、後にrcの省略語が利用された

📰:高梨陣平 - Twitter

もとはQAサイトであるsuperuserででた質問らしい。


Question:VIMRC, SCREENRC, BASHRC, KSHRC, etc. What does the “RC” mean? In these and other applications what does the "RC" stand for?

Answer 1:There's a bit of interesting historical perspective about its derivation on this page:

"rc" derives from "runcom", from the MIT CTSS system, ca. 1965.

and that

"rc" in Unix is a fossil from that usage.'

Answer 2:It stands for Run Commands. And as the name already says it can contain a listing of commands to run. For example in a xinitrc file You can list commands to run when initializing X. so you can make a Xterm window popup, or load GDM/Gnome.


📰:linux - What does the 'rc' in `.bashrc`, etc. mean? - Super User

Wikipediaの英語版にまさしくなページが用意されている。

In the context of Unix-like systems, the term rc stands for the phrase "run commands". It is used for any file that contains startup information for a command. It is believed to have originated sometime in 1965 at a runcom facility from the MIT Compatible Time-Sharing System (CTSS).

From Brian Kernighan and Dennis Ritchie:

There was a facility that would execute a bunch of commands stored in a file; it was called runcom for "run commands", and the file began to be called "a runcom". rc in Unix is a fossil from that usage.

Tom Van Vleck, a Multics engineer, has also reminisced about the extension rc: "The idea of having the command processing shell be an ordinary slave program came from the Multics design, and a predecessor program on CTSS by Louis Pouzin called RUNCOM, the source of the '.rc' suffix on some Unix configuration files."

This is also the origin of the name of the Plan 9 from Bell Labs shell by Tom Duff, the rc shell. It is called "rc" because the main job of a shell is to "run commands".

While not historically precise, rc may also be expanded as "run control", because an rc file controls how a program runs. For instance, the editor Vim looks for and reads the contents of the .vimrc file to determine its initial configuration. In The Art of Unix Programming, Eric S. Raymond consistently refers to rc files as "run-control" files.

📰:Run commands - Wikipedia

以上