21

We know that apt-get is used on debian based systems so what is used on Red Hat Enterprise Linux (RHEL) systems? Is it possible to install and use apt-get on Red Hat?

3
  • 2
    aptitude or apt-get is the Debian package manager. In RedHat distributions, the package manager is rpm or yum for the Fedora/Centos flavours. You could probably figure out a way to manually install aptitude on RedHat, but that sounds like quite a bit of work.
    – Sean C.
    Commented Sep 26, 2012 at 14:05
  • No, you should be using yum.
    – qroberts
    Commented Sep 26, 2012 at 14:06
  • Even if you could get it installed, would any of the downloaded packages work?
    – SaintWacko
    Commented Sep 26, 2012 at 14:43

2 Answers 2

12

There is a project out there that claims to support apt style repositories (as well as the apt-get command) on RPM based distros. It is called apt-rpm and is used as the default package manager on a few distros, though not on RHEL/Fedora.

Problems:

  • It seems not to be really maintained since ~2008; it may have incremental patches or fixes since then, but nothing major.
  • Yum repositories are not compatible with apt-rpm, so even if you were to install it on your computer, you would need an apt-rpm repository to connect to in order to use it.

There is a fork of apt-rpm that has been updated to be mostly compatible with rpm version 5, which is used in all recent RPM distros. So if you insist on using it, a good starting point is to check out the Gitorious branch for apt-rpm for rpm5.

The command syntax of yum is close enough to apt-get that you should be able to learn one if you know the other within a day, or at most, a week. So unless there is some very strong business need for using apt and you're willing to create your own apt-rpm repository (and deal with the cruftiness of software that's basically unmaintained), I would advise against proceeding down this train of thought.

4
  • just small query i simply tried to cut a file from current directory to other directory using this command {sudo rm filename ./Desktop} and it said that user is not is the sudoers file. This incident will be reported . Doesn't this means that SUDO is available in RHEL
    – OmiPenguin
    Commented Oct 9, 2012 at 12:33
  • First thing: rm removes a file, not moves it. Do NOT use rm unless you wish to delete a file (possibly with no ability to recover it). Use mv instead to rename or move files. Considering that you almost deleted a file by mistake, I would advise you to learn basic console commands before you become root, so you don't destroy your system. Commented Oct 9, 2012 at 14:53
  • Oh sorry it was mv not rm apologies. A TYPO
    – OmiPenguin
    Commented Oct 10, 2012 at 6:27
  • Anyway, your question is off-topic for the comments of this question, as it is completely unrelated. This is not a chatroom. If you have a question about Sudo on RHEL, ask a new question -- although I'd advise you to search SuperUser first because this question has been asked dozens of times. Commented Oct 10, 2012 at 13:30
16

No, apt is Debian specific. apt uses dpkg to install .deb files (which are binary files that are specific to Debian).

Red Hat based Linux distributions uses the rpm package management system. You can use yum to retrieve and install rpms on Red Hat distributions:

 yum search som-package-name
 yum install some-package-name

If you want to install an rpm that you've downloaded on your own, you could use rpm -i some-package.rpm to install it (and rpm -qa to retrieve a list of all installed rpms). This is equivalent to dpkg -i some-package.deb (and dpkg --get-selections to retrieve a list of all installed deb packages) on Debian based distributions.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .