Serial Console in Linux

Serial Console in Linux


This post was last updated on May 26th, 2020 at 10:21 pm

Use a Null Modem Cable or Laplink Cable

Connect the cable between the serial ports of 2 systems. Run minicom, miterm or another terminal program and configure the communications port to use 115200 8 n 1 vt100/vt102.

On the other system, set up serial port communications as follows:

Enabling Grub Serial Console Support

In the global section of /boot/grub/grub.conf enter the following:

serial –unit=0 –speed=115200
terminal –timeout=2 serial console

Displaying kernel messages on one or more consoles

On each kernel line you wish, pass the correct console statement to the kernel (/boot/grub/grub.conf):

kernel /vmlinuz-2.4.20-18.8 ro root=LABEL=/ console=tty1 console=ttyS0,115200

The example above will display the init sequence on both consoles. The last console listed appears as the primary console to initscripts.

Optionally boot to text mode rather than X11 mode

X11 mode uses extra CPU cycles. If the local X11 console will not be used, then boot to text mode. Remember X11 can be started with “startx”. Also remember that this setting will not affect graphical applications that run here but display elsewhere.

In /etc/inittab, find the line that says id:5:initdefault: and change it to:


Provide a login prompt to the serial console

In /etc/inittab, below the 6 mingetty lines, add the following agetty line:

S0:12345:respawn:/sbin/agetty 115200 ttyS0 vt100

Allow root to login via the serial console

To the end of /etc/securetty add the following line:


Disable Serial Port Probing

Serial port probing can cause problems so disable it. In /etc/sysconfig/kudzu, change the “SAFE=no” to the following:


Minicom usage info

Skip modem init with -o:
minicom -o
Exit minicom without reset:
CTRL-a q
Start minicom with logging turned on (and no modem init):
minicom -o -C mylogfile
Start/Stop logging from within minicom:
CTRL-a l

Previous PL 1600 Debian
Next Steps to make a change to a binary (already compiled) kernel

About author

shibaa987 275 posts

Linux kernel developer and a firmware developer with an experience of 10+ years.

View all posts by this author →

You might also like

How To 1Comments

How Manually Partition A Disk During Installation of Ubuntu?

This post was last updated on October 12th, 2020 at 08:31 amA partition is nothing but a logical division of a physical disk. Partition makes it easy to organize and

How To 0 Comments

How To Run A Docker Container In Linux?

This post was last updated on August 1st, 2020 at 07:52 amContainerization is a process that encapsulates an application in a container with its own operating environment. It is a

FreeBSD 0 Comments

How To Add Or Remove A User In FreeBSD?

This post was last updated on August 1st, 2020 at 12:13 pmFreeBSD is a free and open-source Unix-like operating system descended from the Berkeley Software Distribution. It is used to


No Comments Yet!

You can be first to comment this post!

Leave a Reply