Technology Insights

What do pts and tty Mean on Linux? What is the Difference Between The Two Terminal Types?

I have been asked the question numerous times of what PTS and TTY mean in Linux regarding terminals. People ask because they may be newer to Linux and learning how to view a process list they may actually see a serial connection, SSH connection, or a telnet connection in the process list that might show something like pts/0, pts/2, tty1, or tty2 in the TTY column. Most processes will just have a question mark in this column but if something is connected to an actual terminal then it will list where it is connected in the TTY column of “ps”.

Technology Insights

How to Reset a Serial Port in Linux, ttyS0, ttyAM0, etc.

When connecting to a Linux device using a serial port there may be times where that connection becomes stuck open and thus will not provide sane output to the TTY port. This issue can be resolved by killing the PID (Process ID) and letting the serial port process restart.

The serial port connection should be configured in inittab which will allow you to specify various configuration options as well as respawning the process. So when you specify respawn the process will automatically restart if it is no longer running as will be the case if you kill the process off. The inittab entry will look similar to one of the two below examples.