Description

This article provides the commands for sending messages to a specific user, or to all users, that are logged into a device running JUNOS.

Solution

The following commands can be used to send messages to users who are logged into an EX Switch. It is valid for any JUNOS based device.

{master:0}
user@switch >show system users
fpc0:

8:34PM up 29 mins, 2 users, load averages: 0.07, 0.05, 0.08

USER  TTY  FROM           LOGIN@  IDLE WHAT
root  p0   10.130.35.114  8:15PM  2 cli
root  p1   10.130.35.134  8:26PM  - cli

The following command is used to send a message to all users that are logged into the Junos device:

{master:0}
user@switch >request message all message " Good Morning "

Broadcast Message from user@
(/dev/ttyp1) at 20:33 UTC...

Good Morning

The following command is used to send a message to a specific user or terminal:

{master:0}
user@switch >request message terminal p1 message " Good Morning " user root

Message from user@ on ttyp1 at 20:35 ...
Good Morning

Modification History

2020-08-10: Updated the article to be for any JUNOS platform instead of only EX switches and added related link.

Related Information