问题
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
回答1:
It skips the confirmation of the installation. When you install a package, Ubuntu asks for confirmation (Y/N). With -y, Ubuntu does not ask.
来源:https://stackoverflow.com/questions/36873361/what-is-the-y-flag-used-for-in-apt-get-install