Internet Relay Chat (IRC) is an instant messaging service that has been used on the internet since the early 1990s. IRC is made possible by the Internet Relay Chat Protocol (IRCP), an application layer protocol. The chat process works on a client/server networking model. IRC clients are computer programs that a user can install on their system. These clients communicate with chat servers to transfer messages to other clients. IRC is mainly designed for group communication in discussion forums, called channels, but also allows one-on-one communication via private messages as well as chat and data transfer, including file sharing.
Many other instant messaging services exist, however many services are proprietary and/or rely on a centralized platform. This does not appeal to organizations that wish to establish a channel of communication that can be adopted by users without fear of unwanted regulations by the service/platform provider. Although open source protocols such as XMPP (formerly Jabber) exist, IRC continues to be used because it is lightweight and stable.
There are many various IRC clients available for many platforms.
Command Line Interface Clients
These clients are intended to be used from the command line interface (CLI), also known as the "terminal".
For those that are new to IRC, it’s a good idea to become familiar with the common commands that IRC programs support. Here are a few:
|/join #channel_name||/join #sudoroom||Join a channel|
|/me <action>||/me waves hello||Announces some action|
|/msg <nickname> <message>||/msg juul Hey! I need some help||Send a direct message to another user|
|/ignore <nickname>||/ignore annoyingperson||Block someone that is harassing you|
Although the above commands are likely to be supported by all IRC client programs, some only apply to specific clients. The following are supported by irssi:
|/help||/help||View documentation on supported commands|
|/help <command>||/help connect||View documentation on a specific supported command|
|/connect <server address> <port>||/connect irc.freenode.net 8001||Connect to an IRC server|
|/set nick <nick>||/set nick someGuy2015||Register your nickname with the IRC server/network|
|/set real_name <real name>||/set nick Bill Murray||Register your real name within the IRC server/network|
|/quit||/quit||Quits IRC program|
|/exit||/exit||Quits IRC program|
See IRSSI Documentation for more commands.
Many programming/hacking communities establish a channel on the FreeNode IRC network to facilitate discussions and provide support to members of their community.
Registering with FreeNode
The FreeNode IRC network allows you to register your nickname and associate it with your email address. This is done by using the following commands:
/msg nickserv REGISTER <password> <email>
You should receive a message informing you that you need to check your email account and obtain instructions to verify yourself.
To make sure that your email address isn’t revealed to other users, use the following command to ensure that it is hidden.
/msg NickServ SET HIDEMAIL ON
You can verify your information with the NickServ by using:
/msg nickserv info
Persistent CLI Client
This section is a guide to setting up a command line based IRC client on a persistently running machine so that it stays connected within a channel even when you are not connected to the machine via SSH. This results in the ability to reconnect and view the messages in the channel that occurred even when you were not connected.
These instructions assume you are using an Ubuntu machine, and will be using the irssi client.
You setup a system at home and configure your home network device(s) to make that machine available via the internet, or alternatively gain shell access to a server on the internet. There are services that provide free or paid shell access, with features and support for IRC that varies. Some of these services even provide support for IRC bots. Alternatively you can pay for a Virtual Private Server (VPS) for as low as $5 a month through services such as [digitalocean.com DigitalOcean], thus providing you with an entire UNIX-like server environment that you can use as you wish.
Install the irssi client using the following command:
apt-get install irssi
After it’s done installing, simply run the program
There is a configuration file in ~/.irssi/config that you can inspect, but you can use commands from within the program to configure IRSSI to automatically perform when you first open the program.
The following commands will configure IRSSI to connect to the Freenode network with an SSL connection, with automatic joining of the #sudoroom channel.
/network add Freenode /server add -auto -ssl -ssl_verify -ssl_capath /etc/ssl/certs -network Freenode irc.freenode.net 7000 /channel add -auto #sudo Freenode /save
After you’ve successfully registered your FreeNode nick name, you can run this command to configure IRSSI to login automatically after connecting to FreeNode.
/network add -autosendcmd "/msg nickserv identify <password> ;wait 2000" Freenode
irssi support separate “windows” for the different channels you are connected to, or for the different people you are chatting with. If for some reason you do not see information on the screen for a command you’ve run, it may be displayed in another window.
An Ubuntu terminal can use the ALT key combined with a number key (e.g. ALT+1, ALT+2, ALT+3, etc) to switch between the different displays in IRSSI. This will not work via SSH however, so you will need to use the /window command instead.
/WINDOW NEW - Create new split window /WINDOW NEW HIDE - Create new hidden window /WINDOW CLOSE - Close split or hidden window /WINDOW HIDE [<number>|<name>] - Make the split window hidden window /WINDOW SHOW <number>|<name> - Make the hidden window a split window /WINDOW SHRINK [<lines>] - Shrink the split window /WINDOW GROW [<lines>] - Grow the split window /WINDOW BALANCE - Balance the sizes of all split windows
Use 'screen' command on the VPS to
CTRL-A, then D - disconnect from the screen instance, and then use `screen -r`.
tmux (terminal multiplexer) is another option