![]() ![]() Could try something like:Īnd if you're installing the exact same packages in every machine, you don't need to update and upgrade each one over the internet, you can download all the required. Or you could blindly pipe a few newlines or "q"'s into apt-get, I used to install one package that would ignore apt options like -y and wait for a keypress (probably in it's preinst or postinst script). When you make a purchase using links on our site, we may earn an affiliate commission. Using force-yes can potentially destroy your system! Configuration Linux How to Update Ubuntu in the Command Line By Jordan Gloor Published Want to update Ubuntu quickly and simply Here's how to open a terminal prompt and install Ubuntu in the command line. It should not be used except in very special situations. You may either list all available updates with -l (which is closest to sudo apt-get update in that it doesn't download or install packages), download with -d or download and install them with -i. sudo /bin/sh -c 'apt-get update & apt-get dist-upgrade & apt-get autoremove & apt-get autoclean' Note that the answer proposed by amra does not the same as the above command: Commands separated by ' ' are executed in sequence without taking the exit code of the previous command into account. In other words, it'll figure out what the latest version of each package and dependency is, but will not actually download or install any of those updates. Configuration Item: APT::Get::Assume-Yes.įorce yes this is a dangerous option that will cause apt toĬontinue without prompting if it is doing something potentially The main difference is that sudo apt-get update fetches the latest version of the package list from your distro's software repository, and any third-party repositories you may have configured. Package or removing an essential package occurs then apt-get willĪbort. If an undesirable situation, such asĬhanging a held package, trying to install a unauthenticated Or -s as APT may decide to do something you did not expect.Īutomatic yes to prompts assume "yes" as answer to all prompts and Never use -qq without a no-action modifier such as -d, -print-uris Note that quiet level 2 implies -y you should You can also use -q=# to set the quiet level, overriding theĬonfiguration file. More q's will produce more quiet up to a maximum of 2. Quiet produces output suitable for logging, omitting progress ![]() Might want to look into some apt-get options too like: Or to just allow a few programs like reboot and apt-get: username ALL=(ALL) NOPASSWD: /sbin/reboot, /usr/bin/apt-get So you don't want your user to have to type in a password to use sudo? You could add a line like this into /etc/sudoers or a file in /etc/sudoers.d/ ![]()
0 Comments
Leave a Reply. |