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.
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.
sudo ssh hostname "export DEBIAN_FRONTEND=noninteractive;apt-get -q -y install nagios-nrpe-server