What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again.

Delete that bloated snippets file you've been using and share your personal repository with the world. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Get involved!

You can sign-in using OpenID credentials, or register a traditional username and password.

First-time OpenID users will be automatically assigned a username which can be changed after signing in.

Universal configuration monitoring and system of record for IT.

Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for:



May 19, 2015 - A Look At The New Commandlinefu
I've put together a short writeup on what kind of newness you can expect from the next iteration of clfu. Check it out here.
March 2, 2015 - New Management
I'm Jon, I'll be maintaining and improving clfu. Thanks to David for building such a great resource!

Top Tags



Psst. Open beta.

Wow, didn't really expect you to read this far down. The latest iteration of the site is in open beta. It's a gentle open beta-- not in prime-time just yet. It's being hosted over at UpGuard (link) and you are more than welcome to give it a shot. Couple things:

  • » The open beta is running a copy of the database that will not carry over to the final version. Don't post anything you don't mind losing.
  • » If you wish to use your user account, you will probably need to reset your password.
Your feedback is appreciated via the form on the beta page. Thanks! -Jon & CLFU Team

SSH RPC (transparently run command on remote host)

Terminal - SSH RPC (transparently run command on remote host)
echo -e '#!/bin/bash\nssh [email protected] $0 "$@"' >> /usr/local/bin/ssh-rpc; chmod +x /usr/local/bin/ssh-rpc; ln -s hostname /usr/local/bin/ssh-rpc; hostname
2011-12-28 17:43:34
User: mechmind
Functions: chmod echo hostname ln
SSH RPC (transparently run command on remote host)

It's useful mostly for your custom scripts, which running on specific host and tired on ssh'ing every time when you need one simple command (i use it for update remote apt repository, when new package have to be downloaded from another host).

Don't forget to set up authorization by keys, for maximum comfort.


There are 10 alternatives - vote for the best!

Terminal - Alternatives

Know a better way?

If you can do better, submit your command here.

What others think

Set up your ~/.ssh/config and you don't need this - just

ssh <host> <command>

Even works with scp, too.

Also, 'hostname' is already a command.

Comment by Fudo 251 weeks and 3 days ago

How is this different from running stuff like ssh blah.com ls?

Comment by symgryph 251 weeks ago

This allow's you to use same command on local and remote host, without code modification or teaching end-users. It more simple than aliases (one symlink do all the work, no need to reload all shells when another command is added), it can be configured in one place and it just works.

Comment by mechmind 250 weeks and 5 days ago

I think he means to put in actual host names in place of "hostname". If so it just means you could type

<hostname> <command>

instead of

ssh <hostname> <command>

(assuming you have your .ssh/config set up) and I don't see that as a big enough advantage to outweigh possible conflicts between host names and other commands, and remembering to setup links for all the hosts you use on all your boxes. In terms of teaching end users, a custom system at your site is more of a training hassle than just using the standard commands unless there's a big savings, IMHO.

Comment by splante 250 weeks and 4 days ago

I can only echo what splante said.

Comment by Norky 250 weeks and 4 days ago

Your point of view

You must be signed in to comment.