Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Distribution: Red Hat, openBSD,Mandrake,freeBSD,SunOS
Sending messages to people on the same server
I want to send a message to someone who is connected to the same server as me. So let's say, I am at home and they are at home but we are both working on the same server which is at work. (this is all through the shell obviously) I want to send a message to them and them only. I always just use: wall $msg but this sends it to everyone. I know about 'talk' but, they need to accept right? Is there a command to just send message to their terminal. Could you give me an example please?
Something I learned way back in the dark ages before talk became popular was this.
When you log in you get assigned a tty (virtual terminal) - which is what is used to send you stdout output. Another user can (usually, unless your dist has been hardened to lock tty's) send output to that terminal as if it were coming from the machine.
So, if you don't have talk enabled (common on the later dists - and talk has been known to have vunerabilities which is *why* it's turned off by default), you can do this :
find the tty of your user. Example type 'w'
[root@fseng root]# w
18:51:15 up 1:50, 1 user, load average: 0.00, 0.00, 0.00
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root pts/0 xxx.xxx.xxx.xxx 5:07pm 0.00s 0.09s 0.01s w
steve pts/1 xxx.xxx.xxx.xxx 5:08pm 0.00s 0.07s 0.01s -bash
I'm root and I want to talk to steve.
echo "Hi steve! Wanna go for lunch?" >/dev/pts/1
and it'll write it to his terminal directly.
Note that this is rather disgusting behaviour if your user steve is, for instance, in the middle of editing a file as it'll write it directly to his screen and mess up whatever it was he was doing at the time. It's not destructive, just annoying...
It's also rather neat for chatting up the girl infront of you in class without her knowing who it is.. :P