Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the -y flag used for in apt-get install? [closed]

What does the -y flag do when you're running apt-get install?

Example, from https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions:

sudo apt-get install -y nodejs
like image 236
saricden Avatar asked Apr 26 '16 18:04

saricden


People also ask

What is Flag in apt-get install?

apt-get install ( apt install ) – As the name implies, it installs a package. Passing the --reinstall flag on the apt-get command will immediately reinstall your package.

How do I fix apt-get install?

3) Reinstalling the OS After installing the APT package, check the /usr/bin/ directory to ensure if it had properly installed. If the file is empty, then run the locate apt-get command again. If no result is shown, there is no alternative but to reinstall the operating system. This might fix the problem.

What does apt-get install does?

dselect or apt-get install can be used to force these packages to install. Install is used to install packages by name. The package is automatically fetched and installed. This can be useful if you already know the name of the package to install and do not want to go into a GUI to select it.


1 Answers

It skips the confirmation of the installation. When you install a package, Ubuntu asks for confirmation (Y/N). With -y, Ubuntu does not ask.

like image 91
LuisKx Avatar answered Sep 20 '22 16:09

LuisKx