How to completely ditch GUI internet applications for the command line

How to completely ditch GUI internet applications for the command line


Today, terminal-based programs have almost disappeared. GUIs are taking over, whether we like it or not. However, there is still a place for the old command line. Take the internet as an example: everyone’s using Firefox, Thunderbird, and Pidgin for their internet activities. Even though these are great, quality, free software apps, they tend to be bloated. That’s where the terminal comes in.

Introduction

Since most of this article is for the internet, having an internet connection might be useful. Also, you’ll probably need a computer (preferably running GNU/Linux, as many of these programs don’t run on Windows or OS X). Finally, you’ll need a terminal emulator (which most GNU/Linux distributions come with). Windows users have cmd.exe, Mac users have Terminal, GNOME users have gnome-terminal, KDE users mostly use konsole, and Xfce users often use xfce4-terminal. Most operating systems also install xterm or some other terminal program. If your operating system doesn’t have any of these (something I would find hard to believe) there is a list of terminal apps at Wikipedia. And if none of these are installed on your system (something I would find extremely hard to believe), you can always install one using your package manager. As a last resort, try typing Ctrl + Alt + F1 to exit KDE, GNOME, Xfce, or whatever desktop environment you are using (use Alt + F7 to go back).

If you are told to run something in this kind of text, then that means you should copy it into the terminal and hit enter (unless it’s a hotkey like c. In that case, just type c into the terminal and it will run automatically).

Lynx: web browsing from the terminal

Homepage: http://lynx.browser.org/

Back in 1989, a text browser that could browse HTTP and Gopher protocols was born. That browser is still around today. It’s called Lynx. There is absolutely no GUI. All it is is a terminal app with a few different colors. It handles most HTML, supports SSL, and much more. You can even download pictures and movies to view with an external application (like MPlayer). You can use it on servers (which often have no GUI), low resource machines, or just for connecting to the web without all the frills of Firefox. It’s available for Windows, GNU/Linux, and Macintosh (via a fink package or an unofficial build).

Figure 1: Browsing Newsvine.mobi with LynxFigure 1: Browsing Newsvine.mobi with Lynx

wget: Text-based downloader

Homepage: http://www.gnu.org/software/wget/

Sometimes when downloading a file you don’t need all the bloat of a full download manager like KGet. That’s why I like wget, an HTTP(s) and FTP downloader for Windows and GNU/Linux (with an unofficial build for Mac OS X. It supports incomplete downloads, HTTP or FTP mirroring, proxies, and much more. Just type wget [URL], replacing [URL] with the URL of the file, e.g. http://mirror.cc.columbia.edu/pub/linux/ubuntu/releases/kubuntu/feisty/kubuntu-7.04-desktop-i386.iso, and the Kubuntu CD image will start downloading. You can also use wget to mirror sites with the -m flag.

Figure 2: Downloading Kubuntu Feisty with wgetFigure 2: Downloading Kubuntu Feisty with wget

rtorrent: Torrents without a user interface

Homepage: http://libtorrent.rakshasa.no/

Sometimes, it’s faster to download a file with the BitTorrent technology than wait for the six thousand other users to leave.

But you don’t always need the chrome and glass of KTorrent or Deluge. Also, GUIs can hog more system resources. That’s why rtorrent was created. It’s a torrent client for GNU/Linux (or Macintosh with an unofficial port from Mac OS Forge) that runs in the terminal and claims to seed up to 3 times the speed of the official BitTorrent client. Just open rtorrent and type in the URL of the torrent.

Figure 3: rtorrenting the Kubuntu Feisty torrentFigure 3: rtorrenting the Kubuntu Feisty torrent

Mutt: email without a GUI

Homepage: http://www.mutt.org/

I personally love Thunderbird. However, like most Mozilla apps, it can be rather slow. Luckily, we have Mutt for GNU/Linux (and unofficially, Windows and Macintosh as well). It’s a small email client that runs in the terminal. All you do is run it (mutt), type c to open a mailbox, and type in the location of the mailbox. For connecting to a remote POP box, type something like pop://username@mail.example.com/ (pops://username@mail.example.com/ for SSL). For example, if I had the Gmail account andrewmin@gmail.com, I would connect to Gmail by typing pops://andrewmin@pop.gmail.com. You can also connect to IMAP, mbox, Maildir, MH, and NFS.

Figure 4: Checking my Gmail with MuttFigure 4: Checking my Gmail with Mutt

Finch: IM. No interface required

Homepage: http://developer.pidgin.im/wiki/Using%20Finch

If you don’t live under a rock, you’ll know what Pidgin (formerly GAIM) is: it’s a GNU/Linux program that lets you connect to the multiple instant messaging networks. But what most people don’t realize is that there is a command line version of it called Finch (the older version is called gaim-text) and it is usually bundled with Pidgin. Just open it up, and start typing! You switch between chats (and the buddy list) using M - n/M - p to go to the next/previous window.

Figure 5: Chatting with myself in gaim-text. Yes, I was extremely boredFigure 5: Chatting with myself in gaim-text. Yes, I was extremely bored

Snownews: RSS reading, terminal style

Homepage: http://kiza.kcore.de/software/snownews/

Want to catch up on the latest headlines, but don’t want to fire up a full GUI just to do it? Then Snownews is for you. It’s an RSS reader that supports proxies, update checking, keybindings, categories, plugins, and even a built-in web browser. All from the command line. To run it, type snownews (typing h brings up the help window with some helpful commands to get started). You can even import and export OPML files with the bundled app opml2snow (run opml2snow -h for a short help).

Figure 6: Reading the Newsvine.com feed with SnownewsFigure 6: Reading the Newsvine.com feed with Snownews

Conclusion

By now, you can see that the terminal is a powerful tool—and I’ve hardly scratched the surface of it. There are tons of alternatives to the programs I mentioned, including cURL (a robust download manager), Links (a browser), ELinks (another browser based on Links), W3M (yet another browser), MPlayer (terminal media player), Irssi (IRC client), and naim (an AIM/ICQ/IRC/CMC instant messenger).

Further reading

Category: 
License: 

Comments

Anonymous visitor's picture
Submitted by Anonymous visitor (not verified) on

w3m is another text based browser. http://w3m.sourceforge.net/

Terry Hancock's picture

I also use w3m. As far as I am concerned it completely obsoletes Lynx. The thing is, Lynx has always had the limitation that it does a lousy job of formatting tables, but w3m handles them easily. Most web pages, even ones that are not specially designed for text browsing, are entirely usable with w3m.

w3m can also do a lot of other tricks, like correctly handling cookies, that few text browsers can do. It's also a nice paging program for on-disk browsing.

I consider it an essential shell program on any system I use.

Now, it's not stream-based, you do need to have curses (I don't know whether that's true of Lynx or not).

Anonymous visitor's picture
Submitted by Anonymous visitor (not verified) on

Try elinks - much better than lynx ;P

Wolfric's picture
Submitted by Wolfric (not verified) on

I use a lot of CLI apps in conjunction with ssh and screen.

I also recommend ncftp for ftp transfers and irssi for irc. And for IM I use bitlbee inside irssi :)

Do elinks or w3m support https? As that is an issue for me with links.

Cheers

jhenkins's picture
Submitted by jhenkins (not verified) on

Nice article!

By the way, being in CLI mode does not mean one has to forgo all creature comforts like a browser with inline graphics, links is your best bet. OK, not as "complete" as GUI browsers, but it supports SSL, frames, Javascript and most sensible graphics types. For it's graphical layer it can use X, DirectFB, framebuffer and SVGAlib.

pvdg's picture
Submitted by pvdg on

The more I learn about it, the more I like the command line. Thanks for the excellent tips! You could add mp3blaster for playing music.

kevin22's picture
Submitted by kevin22 on

Here's how you can install lynx on OsX:

wget http://lynx.isc.org/lynx-2.8.3/lynx2.8.3.tar.gz
tar zxvf lynx2.8.3.tar.gz
cd lynx2-8-3
cp /usr/libexec/config.guess .
./configure
make
su
make install

Author information

Andrew Min's picture

Biography

/ˈændruː/ /mi:n/
(n): a Christian.
(n): a student.
(n): a technology enthusiast.
(n): a journalist for several online publications.

Andrew Min is a student, programmer, and journalist from New York City.

My main forte in the technology realm is journalism. I’ve written for a variety of magazines, both print and non-print, with a focus on open source software and the new web. I’ve also been interviewed on a long list of topics, ranging from politicians on Twitter to open source software and homeschooling.

I also have experience with a variety of programming languages (Bash, Batch, CSS, JavaScript, PHP, and (X)HTML) and content management systems (WordPress). I’ve been hired to design and administer several websites. In addition, I’ve been the lead programmer on several small coding projects.