Virtual Serial Ports Linux

You could look at socat: dest-unreach.org/socat/

I have used it to create virtual serial ports on Linux.

You can search for examples on the Internet, for example:
stackoverflow.com/questions/2053 … y-pty-link

lowlevel.cz/log/cats/english … CP-IP.html