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.

UpGuard checks and validates configurations for every major OS, network device, and cloud provider.

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



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 "[email protected]"' >> /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 is 1 alternative - 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 310 weeks and 6 days ago

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

Comment by symgryph 310 weeks and 4 days 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 310 weeks and 1 day 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 310 weeks and 1 day ago

I can only echo what splante said.

Comment by Norky 310 weeks ago

Your point of view

You must be signed in to comment.