Connect to the Raspberry PI Serial Port from a Linux PC

Created on: 25 March 2014

The Raspberry PI can be operated without a network connection, keyboard, mouse and screen.

This can be done by connecting the serial port of the Raspberry PI to a RS-232 adapter and then to the serial port of a PC; or a USB to serial converter cable plugged into the PC.

In this article, the Raspberry PI serial port is connected to a Linux PC running minicom – terminal emulation software that connects to the serial port.

Commands can be sent to the Raspberry PI from minicom as if entering commands from a keyboard plugged into the RPI board.

Windows users go to the Windows version of this article.

Installing minicom

On a Debian based Linux distribution such as Ubuntu or Mint, minicom can be installed from the command prompt:

sudo apt-get install minicom

Connecting the Linux PC to the Raspberry PI via the Serial Port

This video shows how to connect a USB to serial port cable to a RS-232 adapter board that is plugged into the Raspberry PI. The command line of the Raspberry PI is then accessed through minicom. The Raspberry PI is then shut down from the command line.

Can't see the video? View on YouTube →

Connecting to the Serial Port and Running minicom

Connect the USB to serial adapter to the PC and then to the Raspberry PI through the Raspberry PI RS-232 adapter board (Or if the PC has a serial port, connect it to the adapter board).

To start minicom, open a command line terminal and enter:

sudo minicom -b 115200 -D /dev/ttyUSB0

This assumes that the device name of the USB to serial adapter cable is /dev/ttyUSB0.

Switch Flow Control Off in minicom

In minicom, press Ctrl + A then press Z. Now press O to configure minicom.

In the menu that appears, press the down arrow to move to Serial port setup and the press then Enter key.

Press F to switch flow control off and then press the Enter key.

Scroll down to Exit and press Enter.

The Raspberry PI can now be powered up. Messages from the Raspberry PI will be displayed in minicom.

Logging In and Entering Commands

After booting, the login prompt from the Raspberry PI will be displayed in minicom. Log in as normal.

Commands can now be entered just as if a keyboard were connected directly to the Raspberry PI.