What's the simplest way to download/install software on Red Hat Linux (from bash command line)?
5 Answers
For Red Hat Enterprise Linux and derivatives:
$ yum install foo
For Fedora:
$ dnf install foo
For Debian and derivatives such as Ubuntu (run this as root) :
# apt-get install foo
- 411,918
- 54
- 1,065
- 1,164
- 626
- 5
- 6
-
I'm trying "yum install ncdu", and getting "No package ncdu available." (See http://unix.stackexchange.com/questions/3961/how-to-understand-whats-taking-up-space/3970#3970). What now? – ripper234 Nov 12 '10 at 10:25
-
@ripper234 Not all distros provide ncdu – N J Nov 12 '10 at 10:33
-
So, what are my options then? Do I have to download the source and compile? – ripper234 Nov 12 '10 at 11:18
-
Suse uses yast not yum – xenoterracide Nov 12 '10 at 13:26
-
@ripper234 ... I don't know what that is but I'll bet it's in an external repo, try asking a second question on here "how can I install ncdu on Red Hat" and ask if it's available in any repo's in the text. – xenoterracide Nov 12 '10 at 13:27
-
@xeno - done. http://unix.stackexchange.com/questions/3979/how-can-i-install-ncdu-on-red-hat – ripper234 Nov 12 '10 at 13:31
-
@xeno: fixed it. :) – sudobash Nov 12 '10 at 22:08
-
@xenoterracide: actually, SUSE uses `zypper` - I think it did back in 2010 too. – Mei Feb 16 '12 at 15:30
-
@David libzypp became a new backend for yast, and it can be used directly as zypper but afaik yast is still the main interface even if reality says it's working via zypper which uses rpms. – xenoterracide Feb 17 '12 at 07:43
-
@xenoterracide: True - but then the same can be said of APT (aptitude) or YUM. – Mei Feb 17 '12 at 16:06
For Debian/Ubuntu
aptitude install firefox
For Fedora i think it is
yum install firefox
[note] Run these as root.
-
-
see this [discussion](http://meta.unix.stackexchange.com/questions/192/). `#` means the command is run as root, `$` is normal user. – Stefan Nov 13 '10 at 12:24
If you are using Red Hat Enterprise Linux, it happens that the package you are looking for is in EPEL, so you can install that:
sudo rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
and then you can yum install ncdu.
If you are using ancient Red Hat Linux, the answer is for the love of all that is holy, time to upgrade to Fedora.
- 39,535
- 18
- 99
- 133
-
-
@spemble Well, sure, but even at the time I wrote that, Red Hat Linux 9 (the last release) had been out of support for almost _seven years_. Now, it's been _fourteen_. The number of unpatched local and remote exploits is horrifying to consider. – mattdm May 30 '18 at 13:41
-
My job has me working on RHEL 4.6 and SCO Unix v5. You can imagine the frustration. Just saying. – spemble Jun 02 '18 at 17:47
For RHEL distrib for remote installation and repositories installation to yum OK, Here we have some additional details :
RHEL2, RHEL3 and RHEL4 :
up2date -i pkg-name
RHEL5, RHEL6, RHEL7, RHEL8 :
yum install pkg-name
Note RHEL8 can also : dnf install pkg-name
think about module appstream for apps in RHEL8 : for instance : mariadb
#use the default module version
yum module install mariadb
#select module version
yum module install mariadb:10.5
#select the profile
yum module install mariadb:10.5/Client
RHEL7/RHEL8 : yum group install group-pkg-name
RHEL5, RHEL6,RHEL7 and RHEL8 :
yum groupinstall group-pkg-name
RHEL2,RHEL3,RHEL4 : up2date "@group-pkg-name"
If you have to install any rpm package local, avoid to use :
rpm -ivh http://...
and prefer use :
OBSOLETE : yum localinstall http://...
now : yum install http://mywebiste/mypackage.rpm
or
Legacy distribution RHEL2, RHEL3, RHEL4 :
up2date -k pkg-name
Note : maybe http://... if not wget -0 http://... after up2date -k pkg-name
All of this to keep your metainformation yum (or up2date) ok and sync with rpm.
- 29
- 4