Recording an IRC channel on Linux/Ubuntu

There are a ton of Interney Relay Chat (IRC) clients for Linux/Ubuntu, e.g. Gaim (now called Pidgin). One IRC client that makes recording an IRC conversation pretty easy is Irssi. Install Irssi on Ubuntu with a simple command:

sudo apt-get install irssi

Then run the program “irssi” from the command line.

Now suppose you want to record what’s going on in the #iphone channel, which runs on the IRC server Pick a nickname for yourself such as “notanewbie” and run the following commands:

/set nick notanewbie
/set autolog on
/join #iphone

Then just leave the terminal running or type “/quit” when you’re ready to exit. The IRC chat log will automatically be placed in ~/irclogs/osx86/#iphone.log . The chat log includes messages when people join/leave the channel, so you can use this command to peruse what people are actually saying:

cat #iphone.log | egrep -v ‘has quit|has left|has joined’ | less

That should get you recording an IRC channel. For example, if you wanted to record the Webmaster Radio channel from, you’d type “/connect” in the “/connect” line above, and then use “/join #webmasterradio” to join that channel and record it. So the commands would be:

/set nick notanewbie
/set autolog on
/join #webmasterradio

If you join multiple channels, you can switch between them with -#, where # is a number like 0-9

17 Responses to Recording an IRC channel on Linux/Ubuntu (Leave a comment)

  1. Even better is to run the irssi inside screen program to be able to detach the irssi session and log off from console while irssi keeps on running.

    sudo aptitude install screen

    screen irssi

    To detach: Ctrl+A D
    To reattach: screen -r

    Also irssi has ton of handy plugins, for example: – select channels with Alt+[0-9] – set channel mode on new channels – display list of users on a channel like mIRC – reclaims your nick automatically – draws a line each time you switch away from a window

  2. You Google guys… always wanting to archive everything.

    What next? I suppose you’ll want to search it too! πŸ™‚

  3. Jeremy

    There were Google bots crawling all over my IRC servers when I ran them around 4 years ago so i think they have already experimented in this : – ) Anything to say on that Matt?

  4. Jeremy, when I think about all those iphone discussions on IRC flying into the ether, never to be seen or searchable again, well, a little tear comes to my eye. πŸ™‚

    But Matthew Anderson, I think that was an experiment and I’m certainly not personally aware of Google indexing IRC recently.

  5. I see this thread need comments!

    Ok. Here is one: Matt is iPhone freak πŸ™‚

  6. O.K. Since the comments are so slow I will speak up.

    I wikipedia’d IRC, and I still don’t understand what it is.

    Is it just the underlying technology behind what I think of as, or is it some other world where all the cool people chat with each other, and I have been left out of the loop?

    But I still stand by my sworn statement for Matt to have freedom of expression, even when he discusses something that totally confuses me!


  7. Irssi is just so lovely Zen.

    First thing I did after installing Ubuntu was look for an IRC client, and I was like: ‘woah! a terminal IRC client, I need that!’

    I still haven’t dropped my mail client for a terminal one, though. Sadly, you still need the point-click-select-delete to efficiently manage spam. Maybe many of us should switch to whitelists instead of blacklists, set a script and place a “send this subject to whitelist yourself” under our mail adress in our contact pages.

  8. Is this program better than pidgin?

  9. Hi Matt

    From 2003, so around 4 years ago like I said before. We were all hot about it at the time thinking our privacy was about to be invaded but nothing ever came of it, just a little experimentation at the time I think.

  10. I forgot to mention,

    Linux tips 101, use grep properly instead of using cat

    egrep -v β€˜has quit|has left|has joined’ #iphone.log | less

    And yes, less is more πŸ™‚

  11. Ubuntu is impressive as it comes on a bootable CD as I have seen. The structure is simple and nice. Thanks for the tip.

  12. purposeinc, you’ve got it. You can chat/IM using tools like IRC. There’s also web-based chat with things like Meebo.

    Matthew Anderson: ayup. πŸ™‚

    Errioxa, it depends on what you’re looking for. I wanted a simple way to record IRC channels, but most people probably care about ease-of-use more.

    Siddharth, I think the newest version (Hardy Heron) of Ubuntu that comes out this week is going to be pretty sweet. πŸ™‚

  13. Perfect timing. I just installed Ubuntu 7.10 on a spare HD (I’m teaching myself Linux) and was going to head into the IRC support channels to pose questions and get answers. This will come in most handy. πŸ™‚

  14. Ubuntu is great!!. It have been my main operating system on my laptop and office’s workstation since the release of Gutsy. In fact, you can also use XChat to record them too. Just have to enable Scrollback and all conversation will be archived in your ~/.xchat2/scrollback/ folder.

  15. Ghosty, glad I could help! Good tip, ApOgEE.

  16. I swear IRC used to be popular…

    Dammit people. Does no one IRC anymore? ; – /

    Tell me Matt, which servers to you idle on? πŸ˜›

  17. Ha Brilliant Matt!

    I did something similar before but used the content for auto generating sites!