I have read that the difference between useradd
and adduser
is that useradd
is a low-level command and adduser
is a high-level command, likewise the difference between netstat
and ss
is also that ss
is low-level command while netstat
is high-level command, and likewise there are many other commands (apt
: high-level, apt-get
: low-level)which do the same work but the difference they say is that one is low-level command and other is high-level command. What does low level and high level really mean? Abstraction?

- 4,119
1 Answers
It's a sort of fuzzy concept relating to the amount of abstraction.
A low-level command is closest to the raw data, to the kernel interface, etc. The benefit is that when using one, you have a lot of control. This can be useful when something breaks, or you need to do something weird. The output of low-level commands are often easier to parse with scripts, too (a lot of times, that's what they're intended for). The downside is, you have to know what you're doing. The tools contain almost no knowledge—it all needs to be in your head (or notes in front of you...).
A high-level command abstracts away a lot of the details, putting the knowledge in the tool. This normally makes them much easier to use. The downside is sometimes they just can't do what you want, because you want something weird. Or when something goes wrong, it can be hard to figure out why it's not working.
This isn't a dichotomy, it's really a continuum. There is arguably a lowest level tool, where you just dump out the raw data from the kernel, but you can almost always add more abstraction.
As an example, ps
(on Linux) gets its information from files in /proc
. The output of ps l $$
is simple and readily understood by any competent sysadmin. But try cat /proc/$$/stat
:
$ cat /proc/$$/stat
11026 (bash) S 11024 11026 11026 34843 12425 4194304 3972 3748 0 2 12 2 3 1 20 0 1 0 69581565 25628672 2101 18446744073709551615 4194304 5242068 140731668323552 0 0 0 65536 3670020 1266777851 0 0 0 17 2 0 0 3 0 0 7341384 7388228 9216000 140731668326960 140731668326965 140731668326965 140731668328430 0
There are a bunch of other files in that directory too, some with much nicer (but still low-level) formats. But it's clear the ps
contains a lot of knowledge inside it—it knows the meaning of (some of) those fields, how to display them nicely, etc. ps
is a higher-level command than cat
of random files in /proc/pid/
. top
gets its data from the same source, but is a higher level of abstraction still. But sometimes you have to go to /proc/pid/
—there is a lot of information there that ps
(etc.) don't expose.
It's somewhat fuzzy, though. Different people will disagree about where on the continuum some commands are.

- 109,670