RaspberryPi #5: your TTY “Desktop” computer

How to use your RPi as a fast text-only (TTY) computer

Rphl-Mstl
Tech notes and Geek stuff
5 min readJul 17, 2021

--

Raspberry Pi 3, TTY session using Tmux (so much fun!)

Prepare your RPi

Basics: configure your RPi, and remember all the setup can be done ‘headless’, without plugging in a keyboard, mouse and screen.

My advice for this project: go for the Raspberry OS Lite version, as we won’t need any desktop environment for this project.

The steps to prepare the SD Card are detailed here, you’ll just need a 4Gb SDcard, any computer, and the Raspberry Imager. The application will take care of downloading and copying the right version on the SDcard:

Once Imager have copied the files on the SDcard, don’t eject it yet. You’ll need to additional files to allow Internet and SSH connections.

SSH connection

This section describes how to configure your RPi with no mouse/keyboard no screen, just using another computer. It’s not necessary if you have the hardware but it’s a fun way to start the project!

So at this point you should have added 2 elements to your SDcard:

  • A wpa_supplicant.conf file at the root of the /boot folder that has your Wifi SSID and password. The file will be erased after the first boot:
  • An empty file named ssh (no extension) at the root of the /boot folder on your SD Card. This file will allow SSH connection to the Raspberry

Start the Pi

Now’s the time to start the RPi!

Now, in order to connect to your Raspberry Pi from another machine using SSH we need to identify the device’s IP address. Since we already activated the Wifi, the Pi should appear on your network. Use the nmap command to identify your devices:

You should find a “Raspberry Pi Foundation” device:

You can now SSH into the Raspberry from your desktop. The default login / password of your Pi is pi / raspberry.

Should you need to reset any old host key and allow connection, enter the following command:

Upgrading your TTY

You start with a standard TTY (6 actually, from Ctrl+Alt F1 to F6).

Set font & size

UTF8 / Latin — Combined / TerminusBold / 10x20

Set the colorscheme

Bash prompt and colorscheme are set in your .bashrc file:

Custom prompt:

Example with Dracula colorscheme:

First look with a simple ls command:

Terminal Multiplexer: TMUX

Create a ~/.tmux.conf file to customize Tmux. Here is my config file including a few tweaks and shortcuts modification:

Start Tmux:

There it is, open new terminal panes with binding ctrl + xfollowed by |ou -to split vertically or horizontally:

On the screen: Vim, Cmus, Exa ls, Ranger.

CLI tools

A few CLI tools to use with your TTY machine:

  • File manager: ranger
  • Text editor: vim
  • Music player: cmus
  • Screenshots: fbcat
  • Process viewer: htop
  • Spec viewer: neofetch
  • LS improvement: exa
  • Fun: cmatrix, lolcat

Have fun!

--

--

Rphl-Mstl
Tech notes and Geek stuff

OS explorer, UI & UX passionate, Voxels crafter, code lover, Video Games player, Podcasts listener, Music amateur // Digital Publishing professional