Command-line programs for everyday use in Linux

Предыдущая | Следующая


I must admit, I'm a command line geek. Whenever I have the chance, regardless of desktop environment or distribution, I open a terminal and start fiddling something. This does not mean everyone must be like me, of course. If you're the person who is mouse and GUI-oriented, no problems. However, there are situations when all you have at your disposal for a while is the command line. One of those situations might be an upgrade of your kernel/graphics drivers that leave you high and dry until the bug is reported and the developers look at the issue. You have to send a very important e-mail or you have to check the evolution of prices of your favorite laptop. All the essential desktop tasks (with some exceptions, though) that you do on a GUI-enabled machine can be done on a CLI-only machine as well, so if you're interested...

The tasks

The everyday tasks we will refer to are the ones we usually do in a usual day, be it a work day or a weekend. We need to check our mail, maybe watch something on Youtube (yes, it's possible), chat with our friends or simply browse away from URL to URL. These are the kinds of things we are talking about in this article. By the way, another huge advantage of the CLI approach is (besides efficiency and low resources) uniformity. You don't have to worry, if you use many Linux computers, that some of them won't have your favorite desktop installed: these programs we will tell you about work everywhere, GUI available or not, as long as you have a terminal emulator installed, of course. Note that this article is comprised only of ideas and suggestions, and will not guide you step-by-step on how to use the presented applications.



Many of the Linux users I know use Pidgin for their chatting needs, because it supports lots of protocols, it has some history (anyone remember Gaim?) and it has a pretty nice interface. What many don't know is that the developers of Pidgin offer a command-line equivalent called Finch. Yeah, it seems to me that those people really like small birds, but I digress. Finch is again easy to install on most distributions, but beware! As opposed to most CLI programs, Finch will drag along lots of dependencies, because it's related to pidgin, on which it depends, which in turn needs quite a lot. Well, quite a lot for a command-line machine, but absolutely within normal limits for a full-fledged GUI application. I suggest you to take a look at Finch's page to see the keyboard shortcuts, and you're good for chatting, knowing that every protocol Pidgin supports, Finch will support as well. In short, only the interface is different.

The Linux community relies on IRC pretty much when it comes to communication. Even though Finch already supports IRC, I preferred to give a presentation of an IRC-only client, and that is irssi. It is very simple to use, light-weight of course, but it should not be underestimated. irssi can be scripted, supports advanced options and is a complete IRC client for mostly anything you might need. It is, just like the others, easy to find on Linux systems, and at the first run, it creates its' config file in ~/.irssi/ that can be subsequently edited as needed, with almost no help required because there are lots of examples in there already. I prefer to use irssi from the command line directly, like this:

$ irssi -c $host -n $nick



Whoever said that you need X to listen to your favorite music? That is certainly not true, and there are lots of applications that can help you, besides mplayer, of which we already talked about, but it seems a bit overkill if it's only music you want, especially on a resource-constrained system. Although there are lots of applications, I certainly didn't work with all of them, and I usually feel content with mp3blaster. It supports mp3 and ogg, playlists, id3 and has a pretty nice and useful interface.


I found the application on my Debian system, and it's bound to be available also from Ubuntu, Mint or other derivatives' repositories. OpenSUSE users that have the Packman reposotory enabled also will be able to install mp3blaster. It doesn't seem to be available on recent Fedora systems, to there you'll have to compile (or even package yourself).


When I say news, in this case I mean two things: RSS and NNTP, aka Usenet. It's possible with Linux, no doubt, but we have the same issue we had before when it comes to RSS: pictures. So again it depends on your RSS feeds: if it's all about news, you're set, but if you're a webcomic reader... not so fine. Well, anyhow, let's look at the applications, noting that they are in no way, shape or form the only alternatives. It's what I have more experience with, so obviously I will write about that.

For RSS, I use to use Snownews, a really small and portable reader. If you go to the project's website you will get an idea about how the interface looks like, because the site's design is a pretty good copy of the program's interface. Debian users seem to be less lucky this time, as the only Debian version Snownews is available for (aka packaged) is Lenny. Fedora offers it, nonetheless, Gentoo offers it as well, the BSDs and Solaris do as well. What I do like about Snownews is the fact that it's fast, despite the fact that XML parsing is a pretty intensive task.

When it comes to reading Usenet, every Linux veteran must know about Tin, the Threaded Internet News reader. Err, I hope I didn't mess up the acronym, so please correct me if I did. Tin has a pretty venerable history, it's also fast, easy to configure and liberally licensed (BSD). If you want to install it, well, you can find it in every Unix-like system possible. I haven't tried'em all, but I know it's popular and easy to find on Linux, BSD, Solaris or even OpenVMS. I use it as a remote news reader, so I use the -r flag, otherwise tin will try to use the local spool, which is non-existent on my systems. But here's some detail on how to use Tin in a nutshell.

//edit ~/.newsrc and enter the groups you want to subscribe to, one per line 
//if you already have such a file, replace the trailing '!' with a semicolon
//for the groups you want to subscribe to
 $ export NNTPSERVER=$server
 $ tin -Q



Studies say that, despite all the work and development effort to improve graphical interfaces, people are most efficient on the command line. Whether this is true or not, I can't tell, but what I can tell is that I personally feel more efficient, despite the initial learning curve. What do you think?