Path: csiph.com!weretis.net!feeder9.news.weretis.net!panix!.POSTED.spitfire.i.gajendra.net!not-for-mail From: cross@spitfire.i.gajendra.net (Dan Cross) Newsgroups: comp.unix.shell Subject: Re: ed Date: Wed, 10 Jun 2026 23:53:14 -0000 (UTC) Organization: PANIX Public Access Internet and UNIX, NYC Message-ID: <110ctda$kkq$1@reader1.panix.com> References: <110abmr$ckmk$12@dont-email.me> <110cmrj$32trj$1@dont-email.me> <110csrb$13aa9$2@kst.eternal-september.org> Injection-Date: Wed, 10 Jun 2026 23:53:14 -0000 (UTC) Injection-Info: reader1.panix.com; posting-host="spitfire.i.gajendra.net:166.84.136.80"; logging-data="21146"; mail-complaints-to="abuse@panix.com" X-Newsreader: trn 4.0-test77 (Sep 1, 2010) Originator: cross@spitfire.i.gajendra.net (Dan Cross) Xref: csiph.com comp.unix.shell:26883 In article <110csrb$13aa9$2@kst.eternal-september.org>, Keith Thompson wrote: >John McCue writes: >> Lawrence D?Oliveiro wrote: >>> On Tue, 9 Jun 2026 19:44:19 -0000 (UTC), John McCue wrote: >>> >>>> There is one use for ed(1), when I boot NetBSD into single user >>>> mode, ed(1) is the only one available without jumping through hoops. >>> >>> Why is that? Is it because NetBSD still has the legacy root-versus-usr >>> separation of executables and libraries? >> >> From what I have seen, seems Linux does not have a real single >> user mode. But I think that is OK for Linux. >> >> NetBSD and the other BSDs have real single user mode where no >> file systems are mounted, no daemons are started and root is >> mounted RO. NetBSD boots into /bin/sh or a shell of your >> choice and you work from that, no login needed. Also I think >> only static executables are available for use. >> >> I do not know what "legacy root-versus-usr" means, I would >> never want a system that does not have a clear separation >> between root and users. > >That's not what it means. > >Historically, /bin and /usr/bin were two different directories, >with /bin containing only executables that are needed during >system startup. /usr/bin can be on a separate filesystem that isn't >initially mounted. I think /usr was also where home directories were >located; for example, Dennis Ritchie's home directory was /usr/dmr. > >I think the origin of that is an early PDP-11 or PDP-7 system at >Bell Labs that had limited space on its main hard drive a larger >secondary drive. That's about right. Btw, it was the -11; the organization of the filesystem on PDP-7 Unix was very different. >NetBSD 10.1, the latest release, retains that distinction. I have >it running in a VM, and it has 39 files in /bin and 515 in /usr/bin. >All the executables are dynamically linked, but I think they >depend on on libraries in /lib, not /usr/lib. /bin and /usr/bin >are on the same filesystem (though I think it can be configured >with /usr in its own filesystem). > >Many other Unix-like systems have transitioned to making /bin a >symbolic link to /usr/bin. But remnants of the old layout still >exist; for example /usr/bin and /bin are typically both in $PATH >even if they're the same directory. > >Similar things apply to /lib and /usr/bin, and to /sbin and >/usr/sbin. Yup. I usually just make one big filesystem on most machines. There isn't much reason to split them up anymore. Back in the day, partition sizes were hardcoded and compiled into the drivers for the different disk devices; you carefully chose how you used each disk and which partitions you created filesystems on. BSD fixed that with disklabels; many commercial Unixes similiarly with their own proprietary versions. Now it is du jour. - Dan C.