by 2bitencryption · 5y ago · 0 comments
I was under the impression that different Linux userspaces sometimes implement these common commands differently. Like "ls" sometimes actually being aliased to a bash script, or maybe BSD having one implementation and Ubuntu another. Is that not the case? Is "sudo" not maintained by an entity like gnu, bsd, etc?
edit - in other words, I always assumed "sudo" was a highly-dependent system-level tool, not just some useful helper binary that is maintained by one independent person.
OpenBSD dropped sudo from the base OS several years ago. sudo just became too complex, tailored to the feature creep demanded and required (PAM, ugh) by Linux users.
It is true that BSD and linux sometimes have different implementations of posix commands.
The vast majority of linux distros are using the same gnu coreutils though. There are alternate implementations (like busybox, among others), but they're not often used in desktop distros.
I'm curious if you have any example of a linux distro that does treat ls so weirdly; that uses anything other gnu coreutils or busybox for it.
$ (. /etc/os-release; echo "$NAME:$VERSION_ID")
openSUSE Tumbleweed:20210121
$ command -v ls
alias ls='_ls'
$ grep -A6 -B1 '_ls ()' /etc/profile.d/ls.bash
bash|dash|ash)
_ls ()
{
local IFS=' '
command ls $LS_OPTIONS ${1+"$@"}
}
alias ls=_ls
;;But every tool has to be maintained by someone. Its not like GNU is a faceless corporation.