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.

Most forwarded

Interview with Dave Mohyla, of DTIDATA

Dave Mohyla is the president and founder of dtidata.com, a hard drive recovery facility based in Tampa, Florida.

TM: Where are you based? What does your company do?
DTI Data recovery is based in South Pasadena, Florida which is a suburb of Tampa. We have been here for over 10 years. We operate a bio-metrically secured class 100 clean room where we perform hard drive recovery on all types of hard disks, from laptop hard drives to multi drive RAID systems.

Anybody up to writing good directory software?

Since the very beginning, directories (of any kind) have had a very central role in the internet. (I have recently grown fond of Free Web Directory. Even Slashdot can be considered a directory: a collection of great news and invaluable user-generated comments. As far as software is concerned, doing a quick search on Google about software directories will return the free (as in freedom) software directories like Savannah, SourceForge, Freshmeat and so on, followed by shareware and freeware sites such as FileBuzz, PCWin Download Center and All Freeware (great if you're looking for shareware and freeware, but definitely less comprehensive than their free-as-in-freedom counterparts).

Interview with Mark Shuttleworth

Mark Shuttleworth is the founder of Thawte, the first Certification Authority to sell public SSL certificates. After selling Thawte to Verisign, Mark moved on to training as an astronaut in Russia and visiting space. Once he got back he founded Ubuntu, the leading GNU/Linux distribution. He agreed on releasing a quick interview to Free Software Magazine.

Is better education the key to finding better software?

I read David Jonathon's article Anybody Up To Writing Good Directory Software? the other day, which got me thinking about software directories in general. As David mentioned, many of the software directories one finds when doing a quick google search are free as in beer, not as in freedom. But what interests me is the software directories that already exist, providing a combination of both free as in beer software, and open source software. Sites such as Freeware Downloads and Shareware Download don't advertise themselves as providing free as in liberty software, but each of them have a good selection of open source software available... if you know where to look.

Most emailed

Free Open Document label templates

If you’ve ever spent hours at work doing mailings, cursed your printer for printing outside the lines on your labels, or moaned “There has got to be a better way to do this,” here’s the solution you’ve been looking for. Working smarter, not harder! Worldlabel.com, a manufacture of labels offers Open Office / Libre Office labels templates for downloading in ODF format which will save you time, effort, and (if you want) make really cool-looking labels

Creating a user-centric site in Drupal

A little while ago, while talking in the #drupal mailing list, I showed my latest creation to one of the core developers there. His reaction was "Wow, I am always surprised what people use Drupal for". His surprise is somehow justified: I did create a site for a bunch of entertainers in Perth, a company set to use Drupal to take over the world with Entertainers.Biz.

Update: since writing this article, I have updated the system so that the whole booking process happens online. I will update the article accordingly!

So, why, why do people and companies develop free software?

More and more people are discovering free software. Many people only do so after weeks, or even months, of using it. I wonder, for example, how many Firefox users actually know how free Firefox really is—many of them realise that you can get it for free, but find it hard to believe that anybody can modify it and even redistribute it legally.

When the discovery is made, the first instinct is to ask: why do they do it? Programming is hard work. Even though most (if not all) programmers are driven by their higher-than-normal IQs and their amazing passion for solving problems, it’s still hard to understand why so many of them would donate so much of their time to creating something that they can’t really show off to anybody but their colleagues or geek friends.

Sure, anybody can buy laptops, and just program. No need to get a full-on lab or spend thousands of dollars in equipment. But... is that the full story?

Fun articles

Santa Claus - the most successful open source project

It dawned on me the other day, as I was shopping for the dozens of gifts it seems I have to buy every December, that Santa Claus is the most successful open source project in history. (Bridget @ Illiterarty would agree with that). Santa Claus is essentially a marketing development that is embodied by everyone who stuffs a sock, gives a gift, hosts a dinner or wishes Merry Christmas over the holiday season.

Most emailed

Editorial

When I first started thinking about Free Software Magazine, I was feeling enthusiastic about the dream. I had Dave, Gianluca, and Alan willing to help me, I had established members of the free software community willing to help me out, I had writers volunteering their time and energy for free, and I had a generous offer from OpenHosting for servers, all before I'd proved myself. There was a sense of excitement in the air, and I thought maybe, just maybe, I could make this work.

Free Software Magazine uses Apollo project management software and CRM for its everyday activities!