write a message to login users through terminal
March 10th, 2007 mysurface Posted in Admin, Common, wall, who, write | Hits: 20702 |
To write a message to users that have login, you can using the command write. But before that, you need to check who is login, and which terminal he is login to, use command who.
Let say you was unable to call your friend, maybe he forgot to bring his cellphone and you know he is login to a linux server doing something, and you have permission to ssh to that particular server, then you can write him a message.
First, type:
who
who will list of all user have login and and login to which terminal, you will see something like pts/0, pts/1.
Example output:
aizatto pts/0 2007-03-10 02:21 (:0.0)
With the information, now you can write messages to the user aizatto.
write aizatto pts/0
After typing the command line above, you can start to type your messages. When you hit enter, you message will be send to that terminal. Terminate the write by ctrl+D.
You can cat a file and pipe to write command too.
cat memo.txt | write aizatto pts/0
You can broadcast your message to all login user with wall command. wall, write to all.
cat announcement.txt | wall
Or simply type wall, then start to write your message. For wall, the message will be send only after you hit ctrl+D. And the message will be send to all users that login including you.
Live Chat!









March 13th, 2007 at 10:25 pm
it will be nice if u can include some sample on how recipient screen look like when get the message.
( am i asking too much ? :P )
March 13th, 2007 at 11:09 pm
login to s particular server through ssh, give me access as well, I will do you a live demo :P
Its that better ? :D
March 26th, 2007 at 9:44 am
Not all distibution can have write i belive
let’s assume to do it other way, through dev…
echo msg > /dev/pts/1
cat /dev/pst/1
April 21st, 2007 at 5:47 am
me gusto mas el último post, muy efectivo y sale inmediatamente en la termina. Tnks!!
April 21st, 2007 at 10:39 am
sebastian: I am sorry, I couldn’t understand the language you are saying.
July 3rd, 2007 at 4:48 pm
i am new to linux but i learned lots of neat stuffs already. is it possible to write message via terminal still yet the other side is not opening the terminal? thank you!
July 3rd, 2007 at 7:27 pm
jan:
No, the user has to login to the console.
September 7th, 2007 at 10:26 pm
example of what you see:
Message from foo@server.domain on pts/1 at 10:23 …
wanna grab lunch? im starved!!!
September 11th, 2007 at 9:40 pm
if I will done for message and exit what must key word
September 12th, 2007 at 2:35 pm
turn:
“Terminate the write by ctrl+D.”
October 13th, 2007 at 11:41 pm
I’m using Damn Small Linux and cannot use this command. It needs installing does anyone know where I can get the packages?
Thanks.
October 14th, 2007 at 2:05 am
Ricky:
That is bsdmainutils package.
bsdmainutils: /usr/bin/bsd-writeOctober 14th, 2007 at 8:08 pm
Thanks for the quick reply;
-bash: bsdmainutils:: command not found
Shall I use apt-get instead?
Update; I used apt-get install bsd-write. It trys to build the Dependency Tree it gets up to 5% and then it starts killing it and ending it.
=] Thank you ever-so-much.
October 14th, 2007 at 8:15 pm
Update: I got the apt-get working again and it cannot find the
package. =] Thanks again.
October 14th, 2007 at 11:08 pm
Ricky: Damn Small Linux uses apt-get? Oh that is new to me. May be you can try to
or
or any other keywords you can think off.
FYI, I am using Ubuntu, maybe the package’s name is different from Ubuntu repo.
October 15th, 2007 at 12:42 am
Thank you; Yeah I installed it onto the system. Thanks again. :)
October 16th, 2007 at 8:06 pm
hello tableton,
echo to /dev/… requires write permission to that file.
It is necessary to give write permission to /dev/pts/.. to all users to use this method
June 18th, 2008 at 12:21 pm
thank u
October 4th, 2008 at 6:36 am
best search engine google