Sujet : Soft-links to binaries (was Re: Default PATH setting)
De : janis_papanagnou+ng (at) *nospam* hotmail.com (Janis Papanagnou)
Groupes : comp.unix.shellDate : 22. Jan 2025, 19:02:39
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vmrbs0$14n59$1@dont-email.me>
References : 1 2 3 4 5 6
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
On 21.01.2025 10:06, Janis Papanagnou wrote:
On 21.01.2025 07:52, Axel Reichert wrote:
>
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; [...]
BTW, for something (not) completely different [concerning links]...
There's certainly someone who can explain (beyond versioning) deep
linking chains like
/usr/bin/vi -> /etc/alternatives/vi -> /usr/bin/vim.gnome
/usr/bin/vim -> /etc/alternatives/vim -> /usr/bin/vim.gnome
/usr/bin/gvim -> /etc/alternatives/gvim -> /usr/bin/vim.gnome
/usr/bin/vimdiff -> /etc/alternatives/vimdiff -> /usr/bin/vim.gnome
/usr/bin/vim.gnome
/usr/bin/vim.tiny
/usr/bin/vimtutor
/usr/bin/vimdot
or even deeper chains like
/usr/bin/emacs -> /etc/alternatives/emacs -> /usr/bin/emacs22 ->
/etc/alternatives/emacs22 -> /usr/bin/emacs22-x
(There's a bunch of things in /etc/alternatives, like *.gz and *.so
items.)
For most binaries we don't have that many links to follow to get the
effective binary; browsing the PATH I get
links count
0 4093
1 545
2 133
3 6
4 1
There's reasons for soft-linking. - But chains up to those depths...?
Janis