Command to yield just the linux distribution name only
2
votes
3
answers
1343
views
Suppose I have a set of pre-requisites I need to install for any of a number of linux distributions. In this case, I'd need to switch my install expression against the distribution.
I am aware of
uname -v
, and I am aware that I can inspect the output of this command with some friable string expression and logic. However what I really need is:
V=$(something-like-uname)
echo $V
"Debian"
# or
"Gentoo"
# or
"Redhat"
# or
"Arch"
# etc.
What is this command? (Does it exist?)
Asked by Chris
(1075 rep)
Dec 7, 2019, 08:20 PM
Last activity: Dec 7, 2019, 08:35 PM
Last activity: Dec 7, 2019, 08:35 PM