Linked Questions
29 questions linked to/from How can I get distribution name and version number in a simple shell script?
117
votes
4
answers
157k
views
How do I know which version of Debian I'm running?
In a tutorial, I'm prompted "If you are running Squeeze, follow these instructions..." and "If you are running Wheezy, follow these other instructions..."
When I run uname, I get the following ...
47
votes
3
answers
16k
views
Which are the standard commands available in every Linux based distribution?
I would like to know which are the standard commands available in every Linux system.
For example if you get a debian/ubuntu/redhat/suse/arch/slackware etc, you will always find there commands like:
...
21
votes
5
answers
25k
views
Grab ID of OS from /etc/os-release
When I cat /etc/os-release I get the following:
PRETTY_NAME="Kali GNU/Linux Rolling"
NAME="Kali GNU/Linux"
ID=kali
VERSION="2018.1"
VERSION_ID="2018.1"
ID_LIKE=debian
ANSI_COLOR="1;31"
HOME_URL="http:...
36
votes
6
answers
104k
views
Identifying the system package manager
Is there a way (from a script) to identify the default system package manager?
To clarify, what I want to do is run a given command and, on Debian or any of its derivatives it'll return something ...
5
votes
4
answers
2k
views
if with regex in bash code
In bash I did the following. This if expression will evaluate to true if the Redhat version is 7.5 or 7.6.
if [[ ` cat /etc/redhat-release | awk '{print $7}' ` == "7.5" ]] || [[ ` cat /etc/redhat-...
10
votes
2
answers
9k
views
The version number of my debian
My os was installed from debian 8.5.0 amd64.
Execute commands after installation.
cat /etc/issue
Debian GNU/Linux 8 \n \l
No 8.5 here.
cat /proc/version
Linux version 3.16.0-4-amd64 (debian-kernel@...
12
votes
4
answers
1k
views
How to write a script that effectively determines distro name?
I saw this post on all the different ways to find out what distro is installed, so I'm trying to write a script that tries them all. The possible commands include:
$ cat /etc/lsb-release
$ cat /etc/...
5
votes
3
answers
27k
views
how do i check if my linux is deb or rpm
The skype website offers downloads for linux in 2 versions DEB and RPM.
I don't know which one is right for my computer.
0
votes
2
answers
5k
views
Can't tar files: Refusing to read archive contents from terminal
I have host without dpkg so I need to install it.
I followed the instructions from here and here.
On both of these answers they wrote that I need to download the file:
wget http://security.ubuntu.com/...
0
votes
1
answer
2k
views
How do we check OS version and count of security patches to be applied on the Linux server?
I have written a bash script which is checking OS version and count for available security patches according to OS distribution.
The query here is the script is not working for Ubuntu OS.
The script ...
0
votes
1
answer
2k
views
How do I see if the current distro is Arch-based, Debian-based, etc [duplicate]
I'm writing a shell script that should be able to be used with a variety of Linux distros. I want to see what base the distro is, without hardcoding everything (since there are hundreds of distros), ...
3
votes
1
answer
946
views
Script to find the default Desktop Environment?
Assume a Linux Desktop Environment system is installed. When powered on and credentials entered, whatever Desktop Environment is started i would consider the default Desktop Environment. The user may ...
-2
votes
1
answer
841
views
Find package (OS distribution) manager for automation [closed]
I want to automate some installation process. For that, I need to know whether it is a DEB or RPM distribution, Im able to find some scripts for find the OS distribution.
I need to write a script to ...
1
vote
0
answers
71
views
How to determine that we are Bodhi Linux or other branches when the ouput for $NAME is "Ubuntu"
On Bodhi linux, if I do this :
. /etc/os-release
echo $NAME
the output is : "Ubuntu", this makes it extra hard to determine what is what for a script.
and this will be important when calling apps ...