# What are the names of the serial ports?

There are 4 serial devices corresponding to COM1 - COM4:

> `

>     /dev/cua0, /dev/ttyS0 (COM1) address 0x3f8 IRQ 4
>     /dev/cua1, /dev/ttyS1 (COM2) address 0x2f8 IRQ 3
>     /dev/cua2, /dev/ttyS2 (COM3) address 0x3e8 IRQ 4
>     /dev/cua3, /dev/ttyS3 (COM4) address 0x2e8 IRQ 3

> `

The `/dev/ttyS*` devices are for dialin and `/dev/cua*` devices for dialout.

On some installations, two extra devices will be created, `/dev/modem` for your modem and `/dev/mouse` for your mouse. Both of these are symbolic links to the appropriate `/dev/cua*` device which you specified during the installation (unless you have a bus mouse, then `/dev/mouse` will point to the bus mouse device).

There has been some discussion on the merits of `/dev/mouse` and `/dev/modem`. I prefer using the real device names, and not the symbolic links. Use them if you like, but make sure they point to the right device.

On the other hand, if you use the links, and they point to the correct devices, using `/dev/modem` may be simpler for some people. It's really up to you what you use.

### Major and minor device numbers of serial devices in `/dev`

> `

>     /dev/ttyS0 major 4, minor 64    /dev/cua0 major 5, minor 64
>     /dev/ttyS1 major 4, minor 65    /dev/cua1 major 5, minor 65
>     /dev/ttyS2 major 4, minor 66    /dev/cua2 major 5, minor 66
>     /dev/ttyS3 major 4, minor 67    /dev/cua3 major 5, minor 67

> `

Note that all distributions come with the devices already made correctly.

### Creating devices with the `mknod` command

If you don't have a device, you will have to create it with the `mknod` command.

Example, suppose you needed to create devices for `/dev/cua0`:

> `

>     linux# mknod /dev/cua0 c 5 64
>     linux# mknod /dev/ttyS0 c 4 64

> `