IRC on RPi

3 minute read Published

Learn to use IRC on your Raspberry Pi. Tutorial and IRC client cheat sheet.

I’m learning how to run IRC on my Raspberry Pi so I can have a distraction in my lab. The setup I’ve got is pretty spartan, but that’s what I was going for on a $35 Linux box running off an 8GB SD card. You can do this too! It’s simple and fun. Why not give it a shot?

Requirements

  • Raspberry Pi with Raspbian or similar installed
  • Booted into a terminal window
  • With network connectivity

Installing Irssi

Irssi is an IRC client program for Linux, FreeBSD, Mac OS X and Microsoft Windows. It was originally written by Timo Sirainen, and released under the terms of the GNU General Public License in January 1999.

To install it on the RPi type the following in the terminal then press Enter:

sudo apt-get update && \ # update to ensure freshness
sudo apt-get install irssi

Fire up the client with the irssi command.

Once connected, join a server and a channel to get connected with chat groups organized around various topics of interest. Here’s an Irssi cheat sheet to get you going:

Irssi Cheatsheet
To switch between open channels / windows

Alt+N where N is the number corresponding to the open window

To ignore joins / quits / nicks changes on a specific channel

/ignore -channels #chan1,#chan2,#chan3 * JOINS PARTS QUITS NICKS

Auto Connect to a Server on startup

/SERVER ADD -auto -network IRCnet irc.freenode.net 6667

Auto Join to Specificed channels

/CHANNEL ADD -auto #doothings IRCnet

To Keep logging all these conversations

/SET AUTOLOG ON

To set Nicks and Real Name etc…

/SET -> This should show all existing configured parameters.

…and to change these just say

/SET param-name value like /SET nick nism-pi

To auto-identify on connecting with NickServ

/network add -autosendcmd “/msg nickserv identify [your-password] ;wait 2000” IRCnet

/SAVE to save the entire configuration.

Staying connected

The first thing I noticed using Irssi was I’d have to /exit the Irssi program to get back to my terminal session, causing the IRC connection to drop. To stay connected to IRC while using your RPi you can use a program like tmux or GNU Screen.

To install tmux on the Pi type the following in the terminal then press Enter:

sudo apt-get install tmux -y

(use -y to auto-accept any interactive prompts)

If you’re running Raspbian on the Pi, you can alternatively switch between terminal windows using Alt and the arrow keys and starting a separate terminal window and session, achieving a similar effect.

Acknowledgments

This post and the cheat sheet were inspired by Using Raspberry Pi as IRC Client from the IoT Pune Community Blog and IRC-client.md by Nishant Modak.