I have a Centos 7 server with 48 USB to serial devices plugged into it. Using udev
, I was able to write a script that creates symlinks in the /dev
folder that map the ttyUSBx
devices to corresponding ttyDy
names, based on the serial number of the device. I then run an instance of agetty
on the ttyDy
device files.
The problem is, when I log in from a remote terminal, the tty
command outputs the name of the root ttyUSB
device, and not the ttyD
symlink I created (also, ps -e
will output my ttyUSB
port as the tty
of the bash shell). Is there a command I can run as part of my .bashrc
, or an argument sent to login or agetty
that will allow me to change the name of my tty
to my static ttyD
port?