Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am creating a Script and I need to know what package manager each Popular Unix Distribution Uses (especially those distros that are commonly-used for Servers)...

I mean:
Debian uses apt-get
Fedora uses yum

share|improve this question

closed as too broad by mattdm Aug 21 '13 at 22:11

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Those are package manager tools you gave as examples. An installer is a different thing. –  Keith Jun 17 '12 at 12:22
3  
See the Rosetta Stone for Unix bhami.com/rosetta.html and the Pacman Rosetta stone: wiki.archlinux.org/index.php/Pacman_Rosetta –  Shawn J. Goff Jun 17 '12 at 15:29
    
Yes, I meant Package Managers... Sorry for that misunderstanding! –  akatzbreaker Jun 17 '12 at 18:50
    
Stack Exchange doesn't work well for list-format answers like this question requests. –  mattdm Aug 21 '13 at 22:13
add comment

4 Answers

up vote 1 down vote accepted

I'll comment about the specific *BSD tools:

Warning: the *BSD systems use the same name convention for the tools (pkg_add, pkg_info, etc) but all are completely different.

share|improve this answer
    
OK! Thanks for your answer! I got what I needed! –  akatzbreaker Jun 17 '12 at 18:53
add comment

You would probably be better off creating a .deb package for Debian based distros (including Ubuntu), and .rpm package for Red-Hat based distros (including Fedora), and making the .tar file available for everybody else. Don't concern yourself with which package manager each distro uses. For instance, although I run a Debian-derived distro, I personally use the aptitude package manager. But and .deb package will install for me, assuming that it targets the versions of dependencies that I have installed.

share|improve this answer
    
These package managers are used IN my script! So, I need to know which one each OS uses... –  akatzbreaker Jun 17 '12 at 18:51
    
I see. Then you need less concern yourself with which package manager is the 'default' for that distro, and just worry about which package managers are available. I would target apt-get, yum, zipper, and pacman. –  dotancohen Jun 18 '12 at 8:13
add comment

The website distrowatch compares the package manager tools and their options of all famous linux distributions.

share|improve this answer
add comment

Its different for different unix-systems. But the common thing in all those is the tar.gz file . It is the source code of your program. Then you can make either .deb files for Debian systems or .rpm file for Red Hat Systems. The .deb and .rpm are both binary files while tar.gz is mostly ASCII file but it can also contain binaries. You can convert .rpm file to .deb file in debian systems by this command:

To install :

sudo apt-get install alien

To convert to .deb from .rpm :

sudo alien "packagename.rpm"

Replace the "packagename.rpm" with your original name of the file.

Then a .deb file will be created and to install that use :

sudo dpkg -i "filename.deb"

Replace the "filename.deb" with your original name of the file.

If you want that users can install your application by apt-get or yum then you will have to upload your app to the repository of your distribution. Only then the user will be able to use apt-get or yum to install the application directly.

share|improve this answer
1  
A tar.gz file is not necessarily source code; it can contain binaries, and it's definitely not an ASCII file: it's a gzip-compressed archive. –  Shawn J. Goff Jun 17 '12 at 15:27
    
sorry wait I will edit it! –  Pranit Bauva Jun 17 '12 at 15:57
1  
It is still incorrect. A tar.gz is a compressed file that contains multiple files within it. There is no reason to expect them to be source files. –  Stephen Jun 18 '12 at 13:49
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.