Sujet : Re: Default PATH setting - reduce to something more sensible?
De : janis_papanagnou+ng (at) *nospam* hotmail.com (Janis Papanagnou)
Groupes : comp.unix.shellDate : 21. Jan 2025, 10:06:23
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vmno2f$3us02$1@dont-email.me>
References : 1 2 3 4 5
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
On 21.01.2025 07:52, Axel Reichert wrote:
[...]
I am a late-comer to an interesting thread ...
I think that, depending on your Linux distribution, /bin and /sbin are
symbolic links to their respective /usr counterparts [...]
In my environment these are not only distinct directories but also
contain different sets of executables; the "ls | wc -l" values are:
/bin - 164
/sbin - 248
/usr/bin - 3230
/usr/sbin - 307
So a tidy minimalist might opt for /bin only
Most "interesting" functions for the user are in /usr/bin. But note
that 'rm' for example will not be found there; the path-search will
(also according to strace) need to pass /usr/bin and access /bin to
find it. (That was actually something, maybe "[mostly] harmless",
that slightly unsettled me.)
(plus, if needed,
$HOME/bin, which is better than ~/bin, because tilde expansion is not,
AFAIK, included in POSIX) as non-root and /bin:/sbin else.
I used "~/bin" here just sort of informally due to my laziness. (In
my .profile I've used the variables $HOME/bin.)
In shell scripting or setups I generally use no '~' expressions at
all. (I use tilde-syntax only interactively, or in communication.)
But all the sbin directories (and other clutter) would be gone. It
practically shows that these directories are unnecessary for a normal
(non-root) user.
Well, /usr/games is populated here ... (-:
Well, the 50+ games I had installed there I invoke by the GUI menu
(so no PATH component would be necessary for that in my case). But,
to be honest, I've almost never played all these games. (The games
I regularly play are the Roguelikes; either separately compiled, or,
nowadays more common, played over 'ssh' on some public server. :-)
Janis
Best regards
Axel