Sometimes I need to access some servers running Linux (or maybe another Unix-like SO), but I don\'t know how to verify which distribution is in use on the server (there are
... is a quite professional BASH script that should have all the info you might desire.
(Disclaimer: I am not affiliated with it)
neofetch --stdout | grep '^OS: ' | sed -e 's/OS:[[:space:]]\+//'
might give:
Debian GNU/Linux 11 (bullseye) x86_64
but there is much more info.
Options:
system packaage neofetch
If that is not available, either see the official installation instructions
or for a hacky one-time use - if you have faith and an internet connection - you could use:
wget 'https://raw.githubusercontent.com/dylanaraps/neofetch/master/neofetch' \
&& bash neofetch --stdout \
&& rm neofetch