Attaching terminals is one way to gain multiple access points to a Unix system. One common use for terminals is with headless servers (i.e. servers with no attached monitor or keyboard).
Terminal configuration involves these steps:
In order to connect a terminal to a Unix system you need to find a free serial port, figure out which device file corresponds to that serial port, and obtain an appropriate serial cable. The first step is pretty self explanatory, the following two just a tad more complicated.
Each serial port has a corresponding device file in /dev through which the system passes information to the device. Unix workstations are likely to have at least one or two built in serial ports. As is typical with device files, the naming conventions for different operating systems can vary widely. The naming conventions for the four Unix flavors we are dealing with are shown in Table 4 (a plain text version is also available).
| System | Device files | Description |
|---|---|---|
| HP-UX | /dev/ttyXpN | X is the number representing the card instance and N is the number representing the port. |
| IRIX | /dev/ttydN | N is the number representing the port. |
| Linux | /dev/ttySN | N is the number representing the port. |
| Solaris | /dev/term/A | A is the letter representing the port. |
What kind of cable you use depends on what kind of connection you are trying to make. As you learned earlier, there are two configurations: DTE and DCE.
For a DTE (e.g. computer) to DCE (e.g. modem) connection, you'd use a straight-through cable where pin 1 on one end of the cable was wired to pin 1 on the other, and so on. For a DTE (e.g. computer) to DTE (e.g. terminal) connection, you'd use what's called a null-modem cable. In a null-modem cable, certain wires are crossed. Pin 2 (transmitted data) on one end is wired to pin 3 (received data) on the other and vice-versa, pin 4 (request to send) is wired to pin 5 (clear to send) and vice-versa, pin 6 (data set ready) is wired to pin 20 (data terminal ready) and vice-versa, and pin 8 (data carrier signal) is wired to pin 20 (data terminal ready) and vice-versa.