| |

NonInteractive apt-get install in Debian

In this post, we will know how to do noninteractive apt-get install in Debian Operating System.
By this method you can skip the interactive query ask while doing apt-get install .

For eg. on doing apt-get -y install nagios-nrpe-server , the samba and dhcp packages also install and at that time it need user manual interaction to say ok or yes/no.

You have to set environment variable called DEBIAN_FRONTEND=noninteractive to make this working.

Example:

sudo export DEBIAN_FRONTEND=noninteractive
sudo apt-get -q -y install nagios-nrpe-server nagios-plugins nagios-plugins-basic

The method is helpful when u want to use command remotely from ssh.
For example.

sudo ssh hostname "export DEBIAN_FRONTEND=noninteractive;apt-get -q -y install nagios-nrpe-server

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.