Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I know which Linux package to install for my Linux AMI

Tags:

linux

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

I have an application which has been natively packed on the above platforms, how do I know 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
like image 787
Jason Avatar asked Aug 16 '11 05:08

Jason


1 Answers

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

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

That should help you determine which Linux distribution you have. lsb-release is usually Ubuntu, while fedora-release, redhat-release indicate Fedora, RedHat, or CentOS. You can find a more complete listing here.

Alternatively, you can see if rpm or dpkg are installed by trying to run those commands:

rpm --version
dpkg --version

If dpkg is installed, it's probably Ubuntu/Debian based. If rpm is installed, it's probably RedHat/CentOS or openSUSE based.

like image 160
James O'Doherty Avatar answered Sep 28 '22 01:09

James O'Doherty