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
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 .
“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.
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.
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.
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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With