The simplest way to send an UDP message using the bash

The “/dev/” directory in the linux filesystem, provides the entries for the physical devices that may or may not be present in the hardware. “/dev/” also provides some pseudo-devices that handle specific use. For example: /dev/null, /dev/zero, /dev/urandom, /dev/tcp and /dev/udp.
The last one is the pseudo-device we will use to send an UDP message.

The use it’s really simple, the udp device requires two arguments (the destination IP address, and the destination port) and the message to be sent.

So simply execute the following command to send an hello message to localhost at port 1234:

Nothing more.

Gg1

Related Posts

1 thought on “The simplest way to send an UDP message using the bash

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.