Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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

For example: A cron script runs in background checking for updates. The user is logged into a virtual console (tty).

Only wall has a nonbanner option.

Wall still adds unnecessary newlines at the beginning and the the end. Also pressing enter to return to the prompt is awkward.

Are there any alternatives for displaying notifications in a tty console?

share|improve this question
up vote 2 down vote accepted

The only other way I can think of is to write to their tty directly. Use the w or who command to find out which tty the user is on, e.g.

w joeuser
 23:10:41 up  1:46,  3 users,  load average: 0.18, 0.16, 0.24
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
joeuser  tty7     :0               21:24    1:46m  3:29   0.82s gnome-session -
joeuser  pts/0    :0               23:03    0.00s  0.18s  0.00s w joeuser

..and directly write a message to their tty, e.g.

echo "Hello World" | sudo tee /dev/tty7
share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.