Skip to content

How To: Use Minicom on Linux for Serial Port Comunication

by Jon on May 28th, 2010

If you need to connect your linux server to a cisco device through the serial port this is the best way to do it. This guide is for Debian/Ubuntu but will work with any linux distribution.

First you need to install minicom this is easy using apt-get or yum, just do the following command.

> apt-get install minicom

Once installed you need to find out what your serial port connection is.

> dmesg | grep tty


[   15.453264] console [tty0] enabled
[   17.339818] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[   17.340257] 00:0c: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A

The seial port in this example is at /dev/tty0

Next configure minicom to use that serial port and connect to the cisco device.

> minicom -s

Choose serial port setup, change the serial device to /dev/tty0, change the Bps/Par/Bits to 9600 8N1. Now choose save setup as… and change the name to whatever you like, for example cisco, now save and exit from minicom.

To use this configuration use the following command.

> minicom cisco

Now the serial connection should open up and it will be connected with the cisco device.

From → Cisco, Linux

  1. sachin Agarwalla permalink

    I need help on “How to do serial port communication at a specific datarate(for example 500kbps)between two computers in linux using c language.”Please help me as soon as possible.

    • how can i help you? are you trying to write a program that does this or using an existing program?

  2. sam permalink

    hello, I followed the procedure but I can not connect to the route.

    it appears
    Tapez CTRL-A Z pour voir l’aide concernant les touches spéciales
    and it stops

  3. Ayse permalink

    Thank you very much, it helped me a lot.

  4. Gloria permalink

    i have installed minicom successfully and it runs well with sudo minicom -s command it however does not connect to the device still…what could be the issue?

    • It might be the baud rate you are using. Check the device for what it supports and make sure to use that. I would say that is the most common issue.

Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS

%d bloggers like this: