Sometimes in our work, we need to copy some text from one to another computer. We can use Netcat in the terminal instead installing some big application just for small needs. Netcat (nc) can be used to do some functions in TCP and UDP connection. You can see more detail in the manual.
In this example. I try to send some message from my office’s laptop with openSUSE installed (A) to my own laptop with Ubuntu installed (B). A and B is connected each other in the Local Area Network (LAN).
The first step is to see the IP address of A. We can use this command in the Terminal.
We know that IP address is 192.168.1.23. Then we can start the receiver in A with this command. Use a port number that is not used by our computer system. I choose port number 1405.
nc -l 1405
Then in the B, use this command in the Konsole with the IP Address from A and port number we have chosen. Then start to send some text.
nc 192.168.1.23 1405
In the A you will receive some text you have sent from B. Then you could copy the text and use it for your needs. In my work, this way is very helpful. I usually use it to send site address, configuration text or some important text.