Linux Mac

CommandLineFu: Amazing Collection of Command Line Gems [Linux & Mac]

Justin Pot 29-10-2011

Browse an assortment of amazingly useful commands. Whether you’re an veteran system admin or a command-line neophyte striving to discover more, CommandLineFu is a vote-driven collection of commands that serves up thousands of ideas you should have thought of but didn’t.


Some see the command line as Linux’s weak point, the ultimate symbol of a system lacking ease of use. Others know the command line as one of Linux’s best features, giving learned users quick access to features most computer users don’t even know exist. There’s a reason even Mac OS X comes with a full-featured terminal. CommandLineFu is an encyclopedia of exactly those features. A database featuring over 8,000 unique commands, this site can seem overwhelming at first – just like the command line itself. Dig in though, and you will wonder just how you used a computer without the command line.

Sorry, Windows users – the majority of these commands only work on Linux. Some work on Mac OS X as well.


Head over to CommandLineFu to get started. You will immediately see the commands submitted most recently.

You can “grep” (read: search) the archive, if you want, or simply click “All Time Greats” to see the most popular commands. Or if you prefer, simply browse the massive tag cloud that makes up this sites right sidebar.

A Few Highlight Commands

Experienced command line users will immediately find things they are interested in, but what about everyone else? Here is a quick list of my discoveries from this site.


Quick, Temporary Web Server

Want to quickly share a file with someone? Set up your own web server in a few keystrokes with this handy command:

python -m SimpleHTTPServer

Just like that, your current directory will be shared. Here’s what it looks like in a web browser:

linux command line

Naturally, you’re going to need to set up your router properly if you want to share with someone outside your current network. A dedicated IP or a service like DynDNS Connect To Your Home PCs From Anywhere With DynDNS Read More will also be needed. Still, for local file sharing, it’s hard to beat the above command: it’s quick and easy. It worked for me on Ubuntu and OS X.


Run Preview Command As Sudo

This one’s probably only useful for users of Ubuntu, or other systems utilizing sudo. It allows you to re-run the last command you executed as sudo, perfect if you forgot to add that vital preface.

linux command line tools

See Your Unread Emails

Want a quick rundown of your unread emails? this simple command can do the trick, provided your email client of choice is Gmail.

linux command line tools


It worked for me on Ubuntu and OS X; Linux users should make sure “curl” is installed.

See Your Mounted Devices

A mounted device is any storage drive plugged into your system and working. Need to see a full list of them? Simple.

linux command line tools

Watch A Text Version of StarWars

Okay, this one’s not useful. It is, however, awesome. Watch a text-only version of Star Wars, complete with ASCII animated characters:


linux command line

The code for this is simple:


3 Different Feeds

Do you want to know every time a new awesome command is discovered? CommandLineFu offers three different Twitter and RSS feeds for just that purpose. Which one you use depends on how frequently you want updates; check them all out here.


This site is awesome. Exploring it can teach you a great deal about not only the command line but also about computers in general.

Did you learn anything cool? Share links to your favorite commands in the comments below, or just list them yourself.

Affiliate Disclosure: By buying the products we recommend, you help keep the site alive. Read more.

Whatsapp Pinterest

Leave a Reply

Your email address will not be published. Required fields are marked *

  1. Suhel
    November 1, 2011 at 8:10 am

    I did try all the methods before dumping Linux.
    Myth? whatever it maybe I did see a change in my battery life
    Windows 7, 100% Charged, Unplugged = ~4hours till it reached 5% critical battery low warning
    Ubuntu, 100% Charged, Unplugged = ~45mins
    so its not a myth for me.

  2. Suhel
    October 31, 2011 at 6:21 am

    I was going to dump windows and be a full time Linux user but since all the latest releases across the different distros have the power bug, I dumped Linux and am back on Windows. Ayy!! irrelevant to this post. Nice article bring backs old short lived memories lol :)

    • jhpot
      October 31, 2011 at 4:04 pm

      I find my battery lasts longer with Ubuntu 11.10 than it did with 11.04, but it's by no means a scientific study I've done. Anyway, try out Linux again sometime!

  3. Nick Clarke
    October 30, 2011 at 5:45 am

    @the big e No, the last one would execute the first one, which would execute whatever command was above that.

  4. the big e
    October 30, 2011 at 12:07 am

    If you made a mistake and typed sudo !! twice, would you get an unending loop?

    • jhpot
      October 30, 2011 at 6:52 pm

      Like Nick said: no. This wouldn't be a problem.