ubuntu apt-get update without input

Shell
sudo apt-get update && sudo apt-get -y upgrade

Source

Also in Shell: