Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

How would you include the list and / or count of pending updates in the welcome banner?


username: User
password: *****

Hi 'User', welcome on 'localhost'
There are 8 pending updates, you need to execute "sudo apt-get upgrade"


Bonus question : How to display this "extra message" only for users belonging to the "sudo" group ?

share|improve this question

migrated from May 21 '13 at 22:41

This question came from our site for system and network administrators.

Put code to do that in /etc/profile, and have that code check for group membership. – Jenny D May 21 '13 at 12:52
Recent versions of Ubuntu already do this, have a look at /etc/update-motd.d/90-updates-available. – mgorven May 21 '13 at 17:12
@mgorven Confirmed. /etc/update-motd.d/90-updates-available does it via /usr/lib/update-notifier/update-motd-updates-available on my Ubuntu 11.04 box. – Joseph R. May 21 '13 at 23:28
Just to keep everybody posted, I'm not droping this. currently I've found that you can get 60% of this by using the package update-notifier-common but according to this debian team has choosen not to automatically update the motd because of security bugs that affected Ubuntu. – Cerber May 26 '13 at 19:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.