Take the 2-minute tour ×
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.

Is it possible to send text messages between two users of the same LAN, but the first running Windows with cmd and the second running Linux/Unix?

I am not looking for an instant messaging service. I would like to type in the Linux shell something like

write [email protected]:port message

so that the Windows user can read in its cmd window the text message; then the Windows user should be able to reply with another command. Is it possible?

I have read about the Windows msg command but it doesn't work in all the versions of the OS. Is there anything else?

Instead of PuTTY, I would like to use the Linux shell and the Windows cmd.

share|improve this question
    
That is sort of an instant messaging service, although integrated into the terminal. –  Pavel Šimerda Jul 14 '14 at 17:21

3 Answers 3

How about NET SEND {name1 | * | /DOMAIN[:name] | /USERS} message on the windows machine, and echo "message" | smbclient -M name2 on the linux box? name1 and name2 are the netbios names of the machines.

share|improve this answer

There is an interesting tool which allows you to execute windows commands from Linux, the name is winexe.

So you can send a message from the same machine to the console just typing: winexe -U domain/user%password --interactive=1 //WindowsMachine "msg console \"Your message goes here.\""

As you can see noleti's answer is much simpler but with winexe you can also open a calc or whatever you want in that machine. We have been using it to do unattenden installs in Windows machines from a batch script in Linux. Pretty cool and time saving...

share|improve this answer

On Unix: nc -l 192.168.1.10 32849

On Windows: telnet 192.168.1.10 32849

Where 32849 is an arbitrary port allowed in firewall rules, and the IP is the listening IP of the Unix machine. nc is the netcat utility.

share|improve this answer

Your Answer

 
discard

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.