Using Minicom

User documentation

  • Last Updated: 08/10/2018

The most common way to access a switch is through a serial port. This port, usually similar looking to a ethernet or phone port, is (normally) located on the rear of the switch. It should be labeled "Console" as well. Plug in a serial to USB adapter and connect that adapter to a machine. If the user is working on student lab set up or Cisco lab, the USB will need to be plugged into the server.

In order to get direct, physical access to the switch, use the rollover cable seen in the image above. There are 2 methods to connect the Cisco serial cable that will give you access to the switch and allow you to configure the switch how you want:
  • Serial to USB port from switch console to server
  • Serial cable from switch to server

If you are running Windows, use puTTY to serial console into the switch using the USB to serial cable. A guide to puTTY can be found here:

Otherwise, you can use a Linux machine or the server to get into the switch. Follow the guide below for Linux.

The device name you have to configure in minicom depends on the method:

Use /dev/ttyUSB0 for USB to serial cable
Use /dev/ttyS0 for direct server serial port

Install minicom using the following apt-get command if it is not already installed.

example@example-laptop:~$ sudo apt install minicom
sudo: unable to resolve host example-laptop
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  Use 'sudo apt autoremove' to remove it.
  The following NEW packages will be installed:
    0 upgraded, 1 newly installed, 0 to remove and 10 not upgraded.
    Need to get 232 kB of archives.
    After this operation, 928 kB of additional disk space will be used.
    Get:1 xenial/universe amd64 minicom amd64 2.7-1build1 [232 kB]
    Fetched 232 kB in 0s (1,869 kB/s)
    Selecting previously unselected package minicom.
    (Reading database ... 178919 files and directories currently installed.)
    Preparing to unpack .../minicom_2.7-1build1_amd64.deb ...
    Unpacking minicom (2.7-1build1) ...
    Processing triggers for man-db (2.7.5-1) ...
    Setting up minicom (2.7-1build1) ...

Then access minicom using:

example@example-laptop:~$ sudo minicom

If you get an error message about not being able to access /dev/modem

then run the setup on minicom first.

minicom -s
Pick Serial port setup 

(A) Set Serial Device to /dev/ttyS0 (or /dev/ttyUSB0 if using the USB to serial cable)
(E) Set Bps to 9600 8N1
(F) Hardware flow control to Yes
(G) Software flow control to No

Normally I save the config as console.

I.e. save set as ... and enter the word console.

Then the next time you run minicom you can do:

minicom console

And it should remember your serial port settings. You can also select "save setup as dfl" to be able to type "minicom" and it use your desired settings by default.

Exiting Minicom

After you are finished configuring a switch or router, you need to exit minicom and go back to the server's terminal. To do this, type these commands:

Ctrl+a x

Make sure to type the "x" after you enter Ctrl+a. Once you do this, you should get a popup that asks "Leave Minicom?" Select yes, and you will exit out.

Minicom uses "Ctrl+a" to send you into a mode in which you can send special commands to minicom. X (for exit) is just one of those. You can type "Ctrl+a" and then "z" to get a full list of the commands.

Minicom X-ON/X-0FF Characters (screen freezing issue)

Minicom has certain characters that you have to watch out for. They are X-ON X-OFF characters that will freeze your session until you unfreeze it. They are in-band control codes. You can read more about serial protocols if you are interested.

If you inadvertently hit one of these commands, the terminal may freeze up. If this happpens, you can either execute the X-ON key sequence (Ctrl+q) or quit minicom and restart the switch/router.

These problems may be mitigated by disabling "Software Control Flow" in the minicom serial port settings menu.

More information on minicom setup can be found here:


switchRearPorts.jpg (556 KB) switchRearPorts.jpg Anonymous, 07/10/2018 11:18 AM
Rollovercable.jpg (2.77 MB) Rollovercable.jpg Anonymous, 07/10/2018 11:18 AM