Sample Header Ad - 728x90

using ptys from shell

0 votes
0 answers
41 views
In earlier times I was able to open a pair of pseudo terminals /dev/ttyp9 and /dev/ptyp9. It was easy to do something like: $ cat /dev/ptyp9 and in another shell $ echo Hallo > /dev/ttyp9 But on my linux ( fedora 40 ) there is no /dev/pty... anymore :-( I found that there is something different with device files /dev/ptmx and /dev/pts I was able to $ cat /dev/ptmx and $ echo Hallo > /dev/pts0 which has the same effect as with the /dev/ttyp0 and /dev/ptyp0. But if I open /dev/ptmx again to get a second pair of ptys I have no idea what is the corresponding device name. The man page tells me that I have to use ptsname(). But this requires to write a c program. I want to use ptys from shell. Is there any chance to get a pair of ptys which can be used from a shell?
Asked by Klaus (518 rep)
Jan 21, 2025, 10:13 AM