July 07, 2008

An Introduction to IRC on Linux for Beginners

IRC (Internet Relay Chat) is a protocol for text-based internet chat created by Jarkko Oikarinen in 1988. Ever since it was developed, IRC gained more and more popularity and currently it's one of the standard ways for projects and distributions to provide online help, for developers to meet and discuss aspects regarding their work.

Two of the well-known networks dedicated to free software and Linux in general are Freenode and OFTC, the latter being the network of choice for the Debian distribution, which switched from Freenode a couple of years ago.

IRC supports private conversations, channels (sometimes called chat rooms), notices, file transfers through the DCC protocol, and some networks even implement channel/nick or username registration.

To connect to an IRC server, you will first need a client. There are several good IRC clients for Linux, however I will discuss here the basics for two GUI (Graphical User Interface) clients: XChat and Konversation, and one CLI (Command Line Interface) client, and that's the powerful Irssi.

Introduction
The IRC protocol as a concept is very simple: you send in raw lines of text, the server interprets them and eventually performs some action, such as giving a channel list, or sending your message to the users in an entire channel etc. The IRC client is here to ease your work, so instead of sending a little more complicated command in order to send a private message to someone, you will only have to type something like /MSG [nickname] Hi there, what's up? (it doesn't matter if it's case sensitive or not, you could have written /msg as well).

Anyway, the basic commands which will usually work on any IRC client out there are these:

/connect network_address_here
/server network_address_here

Both commands do the same thing, they connect you to the specified server using the default port (6667). Example:

/connect irc.freenode.org
/server irc.oftc.net

Once connected, you will want to join a channel:

/join #debian

You can try this for your distribution (given you are connected to Freenode):

/join #gentoo
/join #ubuntu

When in a channel, you will only have to type your message and press enter in order to be sent to the channel. Alternately, you can type this from any tab in your client:

/msg channel|nickname your message here

Either a channel name or a nickname. If you put a nickname, the message will be sent to the respective user and that's a private conversation. OFTC also implements SSL (Secure Sockets Layer), so the messages will be sent encrypted instead of plain text.

To send a notice to someone, you would issue:

/notice channel|nickname enter message here

You can send notices to channels too, in which case they'll get to all the users on that channel, but unless you are an operator, I strongly advise against using it. Usually it will only get you kicked out of a channel, since nobody wants to be disturbed with mass messages.

To leave a channel, /PART should do it. To quit your IRC client, type /QUIT, some clients may also quit on /EXIT.

A little about the clients...

XChat
XChat uses GTK and is one of the most powerful graphical IRC clients for Linux. Here's a review I made a couple of days ago. The power of XChat stands in the ability to script in Perl, Python, Tcl and to create C plugins. You can expand it to your likings and make the best application for a pleasant IRC experience.

XChat on #bash @ Freenode

If you want to register your nickname on Freenode or OFTC, use:

/msg nickserv register your_password your_email

Make sure to enter a password, not your nickname.

Konversation
I recommend this KDE client for any IRC newbie. Although it doesn't currently support event-based scripting (which can be a good reason for advanced users not to use it), Konversation has all the options a beginner needs, from selecting colours, fonts, to choosing where all the messages go, if notices go to the active window or not, etc.

Server list in Konversation

Konversation on #debian @ OFTC

Konversation is highly configurable via Settings -> Configure

Konversation 1.1 for KDE3 is still in development, and the latest stable version is 1.0.1.

Irssi
Irssi is the only CLI client I ever used, and it's very powerful, configurable and it supports Perl scripting. When it starts, just type:

/connect irc.freenode.org

Or

/connect irc.oftc.net

To get on OFTC, where the official #debian channel is located.


Move from one query to another using ALT+1, ALT+2, and so on, or using the Emacs shortcuts ^N and ^P.

I found Irssi to be the most flexible and powerful IRC client up to now, and that's because it is highly configurable through variables and you can make scripts in Perl for anything.

All of the clients here allow connections to multiple servers.

Conclusion
As an IRC addict I recommend this protocol to anyone. I often read that people learn more in 30 minutes from IRC than in two whole hours in forums and I consider that to be true, real-time chatting can be of great help sometimes.

There are several more clients for Linux, like KVirc, epic4 and the basic clients included in IM (Instant Messaging) applications, like Kopete or Pidgin (previously known as Gaim). You can try any of those and see which fits your taste.

Updated: Jul 08, 2008 (Created: Jul 07, 2008)

9 comments:

Anonymous said...

In my opinion, Chatzilla is the easiest. Since it is integrated into Seamonkey and is available as a Firefox plug-in, you can enter a channel just by clicking a link. an excellent IRC Quickstart using Chatzilla is available at

http://www.gslug.org/index.php/IRC_Quickstart

Anonymous said...

ummm why is there no mention of Pidgin at all ?

Craciun Dan said...

There is, just at the end of the article, where I listed several others clients. I know, there are probably 10 other, or maybe 20, but those are the only ones I used and cared to mention.

Anonymous said...

For newbies like me, lostirc (http://lostirc.sourceforge.net/) is the best: simple, fast, lightweight - gets the job done.

Tom said...

My problem was that my name was used and I had to authenticate or something .. I hoped you would explain how to do that sanely :(

Garoth said...

Good article, thank you much. I'll bookmark this for sending to people wanting to learn IRC.

Craciun Dan said...

@Kragil, usually when your nickname is already used the client will switch automatically to the second alternative (if available, see in your client's options, for example in XChat it's in XChat -> Network List). If not, then you can change your nick manually using /nick new_nickname or just fill in the fields in options and connect again. As for authentication, it's not mandatory, but on several networks like Freenode or OFTC it's recommended to register your nick. Just choose a nickname which is not already in use or registered and type /msg nickserv identify password email.

@Garoth, thanks. Chances are in the near future I'll make a much comprehensive guide, with a little more explanation and eventually include basic instructions for more clients (either editing this post or creating a new one).

Anonymous said...

@kragil. While it's not mandatory on almost all networks that you don't authenticate or register your name (nick) on some of the larger ones like DALnet and Undernet will often check on new nicks they see with a /WHOIS.

The idea here is to stop spammers and related types.

Where I op if you're neither registered or logged in (authenticated) I'll often message you to ask you some questions. Often to determine of you're a bot or something similarly unwanted.

It's also a good security measure for you.

ttfn

John

Mackenzie said...

/connect and /server do *not* do the same thing!

If you are already connected to one server and you /server another, you disconnect from the first and are switched to the second. If you are connected to a server and then /connect another, you are then signed into *both* servers.