There is sudo apt-get install -y nodejs , what is the -y option for?

  • I will even inject this: man apt-get | grep -A 4 -- -y man apt-get | grep -A 4 -- -y - andreymal

2 answers 2

Without it, apt-get asks a clarifying question - "do you really want to install it?"

So the key is needed to "accelerate" the installation of one press Enter.

    Is it so hard to go to Google? But not even that worries anymore. You can not even google, but to man.

    Please read:

     man man man apt-get http://segfault.kiev.ua/smart-questions-ru.html 

    at

    man apt-get

    direct text write:

      -y, --yes, --assume-yes Automatic yes to prompts; assume "yes" as answer to all prompts and run non-interactively. If an undesirable situation, such as changing a held package, trying to install a unauthenticated package or removing an essential package occurs then apt-get will abort. Configuration Item: APT::Get::Assume-Yes. 

    And in Google in the first link: https://www.opennet.ru/cgi-bin/opennet/man.cgi?topic=apt-get&category=8

     -y, --yes, --assume-yes Автоматически отвечать "да" в ответ на запрос программы; на все запросы, которые будет выводить программа будет автоматически выдаваться ответ "да". При возникновении нежелательной ситуации, как то: изменения пакета в состоянии удержания или удаления необходимого для работы системы пакета, apt-get будет аварийно завершать свою работу. Элемент настройки: APT::Get::Assume-Yes.