Linux / UNIX minicom Serial Communication Program

Linux comes with many serial text and gui based serial communication programs. My favorite is minicom – friendly menu driven serial communication program.

If you are addicted to DOS / Windows TELIX (a telecommunications program originally written for DOS and was released in 1986), minicom is for you under Linux / UNIX.

minicom Common features / usage

=> Setting up a remote serial console
=> Access a computer / server if the LAN is down
=> Connect to embedded Linux / BSD device via null modem cable
=> Connect to Cisco routers for configuration
=> Connect to dump device i.e. device w/o keyboard and mouse
=> Dialing directory with auto-redial
=> Support for UUCP-style lock files on serial devices
=> Separate script language interpreter
=> Capture to file
=> Multiple users with individual configurations

Let us see how to configure minicom for my Soekris net4801 Single Board Computer / embedded Linux device.

Install minicom

Use apt-get under Debian / Ubuntu Linux, enter:
$ sudo apt-get install minicom
If you are using Red hat Linux (RHEL) / CentOS / Fedora Linux, enter:
# yum install minicom

How do I use minicom?

First, make sure Linux has detected serial ports. Use setserial command to set and/or report the configuration information associated with a serial port.

Setup minicom

The -s option use to setup minicom. Type the following command at shell prompt:
$ minicom -s
Configure the first time when you run minicom
(Fig. 01: minicom in configuration mode)
Some terminals such as the Linux console support color with the standard ANSI escape sequences. Type the following command start minicom with colours:
$ minicom -s -c on
Minicom in configuration mode with colour console
(Fig: 02: minicom in configuration mode with color console)
When minicom starts, it first searches the MINICOM environment variable for command-line arguments, which can be over-ridden on the command line. Thus, if you have done:
$ export MINICOM="-m -c on"
Start minicom
$ minicom
minicom will assume that your terminal has a Meta or key and that color is supported. You can add MINICOM variable to your shell startup script such as ~/.bash_profile.

minicom keyboard short cut keys

Use the following keys:

  1. UP arrow-up or k
  2. DOWN arrow-down or j
  3. LEFT arrow-left or h
  4. RIGHT arrow-right or l
  5. CHOOSE (select menu) Enter
  6. CANCEL ESCape

Configure serial port

You need to configure serial port. Use up and down arrows to select menus. Press down and select Serial port setup:
Minicom serial port configuration
(Fig. 03: Configure serial port with minicom)

  • Press A to setup serial device name such as /dev/ttyS1
  • Press E to setup Bps/Par/Bits
  • Press [ESC] to exit
  • Save setup as DFL
  • Exit

More on shortcut keys

To activate help menu press [CTRL+A] followed by [Z] for help on special keys:
minicom command summary
(Fig: 04: minicom command help summary)

minicom in action

You need to connect your serial device such as router or modem using modem cable. Once connected power on device and type minicom command without -s option:
$ minicom -c on
Minicom in action - connected to one of my dump device
(Fig: 05: minicom connected to one of my embedded Linux device via null modem cable [ click to enlarge image])
The soekris embedded Linux / BSD board with AMD 266 Mhz CPU + 256M RAM. This device connected to my computer using DB9 null modem cable. During the development you need to use minicom to install Linux kernel, format filesystem and configure device.

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 44 comments so far... add one
CategoryList of Unix and Linux commands
Disk space analyzersncdu pydf
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
44 comments… add one
  • Marco Feb 5, 2008 @ 9:27

    I use minicom to connect to Solaris host, recently I got some problems because minicom send somenthing on the wire that the host fell like a break signal going down to the obp(fortunatly didn’t happen on a production system). I already removed all the intitializtion strings…Any ideas?

  • gmo Feb 12, 2008 @ 10:12

    If you do “man minicom”, you’ll find lots of options. I would suggest starting minicom with -o.

    As a side note, I recommend kermit over minicom, it’s way better, as long as you create your own .kermrc containing the options you usually use.

    • Doudou Aug 3, 2010 @ 17:39


      I want to ask you the relationship between comgt and minicom. When i execute the command comgt, why I can find the information in the minicom window ?


  • Dave Uhring Feb 12, 2008 @ 12:35

    Marco needs to edit /etc/default/kbd on his Solaris system to prevent such accidental breaks. Uncomment the line:


  • Net savant Mar 14, 2008 @ 14:14

    I am using a health checkup machine, connected to my redhat linux 4 system with minicom 2.0.0,which sends data to serial port in a hexadecimal format only when it receives a command of 0x68 from the PC. i had tried using stty -F /dev/ttyS0 9600 -parenb cs8 -cstopb but while using cat not getting anything from the port. tried using echo “0x68” > /dev/ttyS0 but in vain. I had tried minicom by configuring it to /dev/ttyS1 and also to /dev/ttyS0 but minicom is showing offline. i am unable to decide the serial port because i have only one serial port which is being used for mouse. to the same port i had connected the machine by unplugging the mouse. Please help me out.
    Thanks in advance

  • panna May 6, 2008 @ 7:09

    i want to use minicom for connection to my GSM modem so that it can send message to particular mobile..
    can u tell me how shud i proceed for this…i only have idea for this.. i dnt know the details for that..

  • rahul singh May 12, 2008 @ 9:48


    Thank you for give the step how to configure serial communicatin on internet . my suggestion please make one website there we can find all the linux/unix help topic with theory and graphically which is not available in books.

    rahul singh ( iiht meeerut ) faculty=N+,REDHAT LINUX

  • Diego Jul 4, 2008 @ 13:30


    I am trying to log on to my Cisco 836, bought second-hand as training material for the CCNA, and I am having a few difficulties with it.
    I was hoping more experienced folks could help me in troubleshooting the problem.

    I installed minicom 2.2 on Vector Linux and configured it following the how=to above. When I run minicom =c on, it shows Initializing modem, then goes back to the main menu and asks to “Press CTRL-A Z for help on special keys”.

    When I do press CTRL-A, it shows me as OFFLINE in the lower right corner. The same happens with both ttyS0 and ttyS1.

    Now a bit background information: Vector Linux kindly starts the serial ports on startup, and a dmesg |grep ttyS reveals that both ttyS0 and ttyS1 are active.
    The router itself is linked to the db25 port via a rolled cable and a RJ45 to DB25 adapter (all self made; I do not exclude that the problem is due to my poor wiring skills).

    I have no way of telling whether the router itself is working correctly or not, but if I connect it to my Lan, I am able to see its IP address.

    Any suggestion as to where the problem might lie would be very welcome.



  • arsene Aug 7, 2008 @ 20:17

    I am interested in learning kernel.

    Currently I have successfully setup virtualbox using serial port (/dev/ttyS0) and minicom (`minicom -s /dev/ttyS0`) looks connect to /dev/ttyS0 as it shows

    OPTIONS: I18n
    Compiled on Jun 6 2008, 22:41:04.
    Port /dev/ttyS0

    Would you please to give me some advice or suggestion on how can I capture message sent to minicom (from virtualbox)? Or how can I send command / debug from minicom?

    Thank you very much,

  • anon Aug 15, 2008 @ 23:17

    You are awesome, thank you for this information.

  • ganesh Nov 11, 2008 @ 8:21

    I have a serial port(15 pin type) and i wanted to find the serial port (S0 or S1), so i tried the following
    dmesg | grep ttyS but no warning or nothing comes up in the console, but i am taken to new prompt
    $dmesg | grep ttyS
    What should be done?

  • Danesh Nov 14, 2008 @ 1:22

    I use it to connect to my storage devices.

  • luis Dec 11, 2008 @ 17:29

    ttyS1: LSR safety check engaged!
    ttyS1: LSR safety check engaged!
    ttyS1: LSR safety check engaged!
    ttyS1: LSR safety check engaged!
    ttyS1: LSR safety check engaged!
    ttyS1: LSR safety check engaged!

    thats what i can see
    minicom sucks
    is there any other way ?

  • Hitesh Bumtariya Apr 1, 2009 @ 11:01

    i want to use minicom for connection to my GSM modem so that it can send message to particular mobile..
    can u tell me how shud i proceed for thisÒ?¦i only have idea for this.. i dnt know the details for that..

  • arunprasad Apr 2, 2009 @ 9:49

    i want send sms using gsm mobile using linux box.i need a C program to send the AT commands to gsm mobile.pls send me the details regrading

  • harshada May 19, 2009 @ 7:53

    I want to configure port no 12 to minicom, but under dev folder I didn’t found ttyS12. But I found ttysc. So I configured port to /dev/ttysc. But after exiting setup, an error is thrown like “cannot open /dev/ttysc: Input/output error”. How to overcome this error.
    Thanks in advance.

  • kuapao Jul 16, 2009 @ 23:29

    >Dave Uhring 02.12.08 at 12:35 pm
    > Marco needs to edit /etc/default/kbd on his Solaris system to prevent such >accidental breaks. Uncomment the line:
    > KEYBOARD_ABORT=alternate

    This was most helpful, especially since I’m rusty in Solaris! Another file to check is /etc/system for the following line:
    set abort_enable = 0

    You want it set to 1 (default), if you want to be able to initiate a break or Stop-A.

  • karuna Aug 8, 2009 @ 12:10

    I am trying to connect router through linux but it is unsuccessful.
    please suggest me what to do . I am using redhat linux 5.1

  • allen Aug 12, 2009 @ 1:44

    I want to use minicom to connect with my embedded systerm,
    ‘dmesg |grep ttyS’ ,display ‘Xen virtual console successfully installed as ttyS0’
    ‘minicom -s /dev/ttyS0’,display ‘minicom: there is no global configuration file /etc/minirc._dev_ttyS0’
    did u have the same problem?
    thanks for help me out!

  • Dave Sep 26, 2009 @ 23:37


    I use minicom on ubunto to connect via USB 2 serial device. When I type minicom -s and reach the Serial port setup I don’t find baud rate of 57600 to select from. Please advise.


  • Martin Paulus Sep 29, 2009 @ 18:23

    In a response to above questions: please realize that minicom does not set up your serial ports, this is the job of your operating system. Also picking a random tty-name is not the best way to get a connection up and running. I would suggest looking up a serial connection howto on (if you’re running Linux), or find some other appropriate documentation.

    p.s. if `dmesg|grep tty` ‘presents you’ with a new prompt this means that there were no results. check greps behaviour by creating a text file and then use `fgrep WORD FILE` or `cat FILE|grep WORD` to check for words you know appear and some you know do not appear in this text file. when in doubt, consult the manual, please

  • tobias Nov 3, 2009 @ 13:35

    pls read some manuals and willingly learn.. “i have trouble please help me very much” is NOT the correct way of asking people to spend their spare time helping you.

  • Saad Usmani Jan 29, 2010 @ 12:19

    Working perfectly fine. JAY Hoo…

  • szmarcek Mar 28, 2010 @ 1:01

    My router is linked to the db25 port via a rolled cable and a RJ45 to DB25 adapter and minicom did not work with /dev/ttyS0 or S1 and dmesg with grep ttyS* did not show anything but I noticed /dev/ttyUSB0 entry under /dev/ and when I set minicom to point to /dev/ttyUSB0 everyhting worked fine!

  • PAgore May 19, 2010 @ 19:20

    Now i can use my grasshopper (ICnova AP7000 Base) in a colorful terminal! πŸ˜€
    $ minicom -c on

    Thank You! πŸ™‚

  • gtr Nov 15, 2010 @ 9:25

    Thank you for sharing this information.
    I like to know if we can use minicom to run in different config to different serial ports in one linux box? I have no problem in using minicom to /dev/ttyS0 (build-in). I add 2 more serial (PCI) and detected it as /dev/ttyS1 and /dev/ttyS2. Problem is when I use this 2 serial ports it says “offline”. cables are ok and devices connected to are all active. check it using /dev/ttyS0. Can anyone help me? TIA

    • mr.thinh Mar 14, 2011 @ 18:37

      dear . . .

      I have ttyS0 , ttyS1, ttyS2 . I can see one of them only . How can i connect and use 3 of them at the same time ?

      Thank you .

  • dustin Mar 1, 2011 @ 21:02

    Thanks – the quick tutorial helped a lot

  • robert Apr 17, 2011 @ 16:48

    I have done of the minicom set up, but when it comes to saving the file it states that i dont have the permissions to save the file as dft. Im not sure if i have to be in root to save the file. Currently using Kubuntu 10.10 at the moment. Trying to set up a Cisco Router.

  • robert Apr 17, 2011 @ 17:26

    Update… i have sorted it…. pressed enter and router>

    • robert Apr 17, 2011 @ 17:37

      I think the issue with the saving of the file is still there, but i think that might be down to not being able to get into root to save the file

  • rajeev Sep 24, 2011 @ 12:24

    Hi all,
    I had installed minicom in my Linux PC with “Linux localhost.localdomain #1 SMP Tue Oct 30 13:55:12 EDT 2007 i686 i686 i386 GNU/Linux” installed. when i run minicom i can watch my unit booting
    Welcome to minicom 2.2

    OPTIONS: I18n
    Compiled on Sep 25 2007, 06:13:56.
    Port /dev/ttyS0

    Press CTRL-A Z for help on special keys

    >Start AT91Bootstrap…

    U-Boot 2008.10 (Sep 19 2011 – 17:57:15)

    DRAM: 64 MB
    Initializing Display
    NAND: 256 MiB
    Nb pages: 8192
    Page Size: 1056
    Size= 8650752 bytes
    Logical address: 0xD0000000
    Area 0: D0000000 to D00041FF (RO) Bootstrap
    Area 1: D0004200 to D00083FF Environment
    Area 2: D0008400 to D0041FFF (RO) U-Boot
    Area 3: D0042000 to D0251FFF Kernel
    Area 4: D0252000 to D083FFFF FS
    *** Warning – bad CRC, using defaul

    but when i try to type from keyboard i am unable to communicate to minicom
    Distribution built by Analogics Tech Ind Limited,Hyderabad
    Kernel 2.6.28-ATIL-H10 for armv5tejl
    ATIL-H10 login:
    i am unable to type a thing on minicom
    pls help..

    • prince May 29, 2014 @ 11:02

      Make the setup..
      Hardware flow control : NO
      software flow control: NO

  • parag dhake Jan 13, 2012 @ 12:02

    hello friends,
    we are doing a project on pci driver.
    our project is write pci driver and use functionality of ARM7 through uart.
    i am done with pci driver, now i want to check our driver for full fledge.
    i have a problem, when i am starting comunication between two pc using db9 connectors, who will first start the communication get full data & another side some data gets lost may be starting data.
    plz tell me that how i will minimizes this problem?
    what will i do in driver?
    i am use platform “linux”………….

  • Swathi Apr 17, 2012 @ 21:50

    When I tried to configure my minicom using minicom -s, it is displaying dev/modem instead of dev/ttyS0. What does this mean? I need to connect my Embedded Linux board (ARM processor) to one of the ports. Hence I need to configure minicom correctly before doing that. Any help is appreciated.

    Thank you

  • yannick Jun 15, 2012 @ 9:52

    I use minicom for modem with smslib. But when i connect, i cannot write the AT’s commands. My linux terminal don’t show me the command AT that i write. Can somedy help me please.

    Thank you

  • Greg Ennis Sep 6, 2012 @ 20:43

    I am trying to use minicom within a bash script to logon to a remote computer, poll it to see if files for downloading are present, and then download the files and process them accordingly. Can minicom be used without user interaction? Is there a tutorial present pertaining the script language that minicom supports? Thanks much, Greg Ennis

  • passing by Jan 14, 2013 @ 17:40

    Don’t bother with minicom unless you need modem functions. Otherwise, you can probably do what you like with a package called “expect” – using the “autoexpect” script. This is a TCL script that allows you to simply type your responses and then gives you an editable script. When combined with bash, you can do a lot.
    Also, have a look at curl and wget.

  • arvid May 22, 2013 @ 11:04

    Hi everyone,

    I’m not getting any output from minicom.. I’ve tried shorting pins 2 and 3 without result, and also checked every pin with o-scope while typing or sending files – no response – just a constant +5V. I’m using a prolific USB-to-serial adapter on OS X. I have no problems with input, so I’m pretty sure I’m on the right serial device, just no output..
    I’ve also tried all possible combinations of hardware/software flow control without any luck.

    Any suggestions much appreciated!


  • Jorge Cruz Nov 20, 2014 @ 2:59

    No puedo instalar el minicom en mi Fedora 14 me sale el siguiente mensaje: PORFAVOR SU AYUDA:

    [root@Servidor Yorch]# yum install minicom
    Complementos cargados:langpacks, presto, refresh-packagekit
    Adding es_ES to language list
    Error: Cannot retrieve repository metadata (repomd.xml) for repository: fedora. Please verify its path and try again

  • Matt Jan 2, 2015 @ 0:15

    When I go to set my ComPort it says “minicom: cannot open /dev/ttyUSB0: Permission denied”

    Am I doing something wrong? I have no 9 Pin Serial ports only a USB to serial port cord.

  • EDUARDO Jan 22, 2015 @ 21:00

    Excelente tutorial

  • Nan Lyu Feb 9, 2016 @ 21:37

    Hi, I am using minicom for the connection of an altera FPGA board. It uses USB blaster. After configuration, it kept giving me offline when I start ‘minicom’. Any idea how to solve this? Thanks.

    My configuration:
    | A – Serial Device : /dev/ttyS0 |
    | |
    | C – Callin Program : |
    | D – Callout Program : |
    | E – Bps/Par/Bits : 38400 8N1 |
    | F – Hardware Flow Control : Yes |
    | G – Software Flow Control : No

    My computer after dmesg | grep tty:
    [ 0.000000] console [tty0] enabled
    [ 0.517646] 00:09: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
    [ 0.538158] 0000:00:16.3: ttyS1 at I/O 0xf0e0 (irq = 19) is a 16550A

  • Nan Lyu Feb 9, 2016 @ 21:50

    And even if when I use ttys1 and it shows online, it hangs after starting minicom and shows nothing. Anybody have a solution?

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum