How to find out which Linux package to install for my Linux AMI

Ubuntu/Debian Red Hat/Fedora/CentOS Mac OS X openSUSE FreeBSD OpenBSD Gentoo 

I have an application that was actually packaged on the above platforms, how to find out which one to install on my Linux AMI on EC2.

 uname -a displays the following Linux ip-10-315-48-29 3.7.31.31-83.9.amzn1.i686 #1 SMP Sat Feb 18 20:11:16 UTC 2011 i686 i686 i386 GNU/Linux 
+6
source share
1 answer

This is obviously some kind of Linux, so look for a file in / etc that ends in -release or _version:

 ls /etc/*-release /etc/*_version 

This will help you determine which Linux distribution you have. lsb-release is typically Ubuntu, while Fedora, redhat-release shows Fedora, RedHat, or CentOS. You can find a more complete list here .

Alternatively, you can see if rpm or dpkg is installed, trying to execute these commands:

 rpm --version dpkg --version 

If dpkg is installed, it may be based on Ubuntu / Debian. If rpm is installed, it may be RedHat / CentOS or openSUSE.

+5
source

Source: https://habr.com/ru/post/895112/


All Articles