Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between yum -y install and yum install in CentOS

I've seen two ways to install packages,for example,squid on CentOS:

1.yum -y install squid

2.yum install squid

can anyone tell me what's the difference between them ? also, I'm using CentOS v.6.6

like image 811
Vakho Akobia Avatar asked Dec 18 '16 14:12

Vakho Akobia


People also ask

What is yum install?

YUM is the primary package management tool for installing, updating, removing, and managing software packages in Red Hat Enterprise Linux. YUM performs dependency resolution when installing, updating, and removing software packages. YUM can manage packages from installed repositories in the system or from .

What does yum stand for CentOS?

“YUM” is an acronym that stands for “Yellowdog Updater, Modified”. This name harkens back to YUM's origins as a rewrite of Yellowdog UPdater (also known as “YUP”), a software updater for Yellow Dog Linux, a now-defunct Linux distribution.

What's the difference between yum and RPM?

RPM is autonomous and utilizes its own database to keep information about the packages on the system. YUM is a front-end utility that uses the RPM package manager for package management. The utility also uses the RPM database in the backend. RPM package management and handling gets complicated at times.

Does CentOS use RPM or yum?

RPM is a packaging system used by Red Hat and its derivatives such as CentOS and Fedora. The official CentOS repositories contain thousands of RPM packages that can be installed using the yum command-line utility.


2 Answers

If you supply -y it automatically chooses "yes" for future questions, i.e. are you sure you want to install squid? [Y/n]?.

It is handy if the installation takes a long time and asks multiple questions, which happens when you install multiple programs at once. In that case, having to type enter every now and again for the process to continue can be annoying.

You could easily have found out the answer yourself by reading the help message for yum:

yum -h
like image 190
jmd_dk Avatar answered Sep 30 '22 16:09

jmd_dk


With -y option, yum will install specified package along with its dependent package without asking for confirmation.

Without -y option, yum will show information related to specified package and its dependent packages and will ask for confirmation to install.

-y option will be useful if package is going to be installed through some scripts.

like image 28
Vikas Sachdeva Avatar answered Sep 30 '22 17:09

Vikas Sachdeva