Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I run Ubuntu 12.04 and if the computer is started in console mode I get a notification of available updates when I log in. Is there a way to get this notification to show up in a (GUI) terminal window? What do I need to add to ~/.bashrc?

share|improve this question

The message that you see is from a package called motd aka message of the day from ubuntu. There are files that can be modified to remove update notification, as well as put new welcome messages, run scripts that will fetch various information to display.

Take a look at this article on how to customize it.

share|improve this answer
    
OK, thanks, /usr/lib/update-notifier/update-motd-updates-available is the command I'm looking for. However, it can't be run as non-root as it creates a file in /var/lib/update-notifier. As far as I know you should be able to check for new updates without being root. – August Karlstrom Sep 19 '12 at 14:26
up vote 0 down vote accepted

There is a command called apt-check. The following Bash script displays the number of updates if there are any:

updates=$(/usr/lib/update-notifier/apt-check --human-readable)
if [ ${updates:0:1} != 0 ]; then
   echo -e "$updates"
fi
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .