What's the simplest way to download/install software on Red Hat Linux (from bash command line)?
For Red Hat Enterprise Linux and derivatives:
$ yum install foo
$ dnf install foo
For Debian and derivatives such as Ubuntu (run this as root) :
# apt-get install foo
aptitude install firefox
For Fedora i think it is
yum install firefox
[note] Run these as root.
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.
In debian based system you can use
sudo apt-get install foo
to download you can use wget
For RHEL distrib for remote installation and repositories installation to yum OK, Here we have some additional details :
RHEL 2,3 and 4 :
up2date -i pkg-name
yum install pkg-name
RHEL7 yum group install group-pkg-name
RHEL 5,6 & 7:
yum groupinstall group-pkg-name
RHEL 2,3,4 : up2date "@group-pkg-name"
If you have to install any rpm package local, avoid to use :
rpm -ivh http://...
and prefer use :
yum localinstall http://...
Legacy distribution RHEL 2,3,4 :
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.