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



alias source .bashrc and nano .bashrc

Terminal - alias source .bashrc and nano .bashrc
alias sbrc="source ~/.bashrc" && alias nbrc="nano ~/.bashrc"
2009-05-13 02:41:37
Functions: alias
alias source .bashrc and nano .bashrc

alias for editing .bashrc and sourcing it with a quick command, very useful for quickly adding and modifying alias' and functions in bashrc, create lots of alias from commandlinefu very quickly, use nano vim or any other edit if you want, very useful if you have a barcode scanner and you want to run commands quickly with barcodes


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

If you want this sort of functionality why would you make two aliases out of it? Why not something like:

alias ebrc="$EDITOR ~/.bashrc && . .bashrc"
Comment by wonko 462 weeks ago

@professoralex I think incremental search could save you from having to define so many aliases. Hitting CTRL-r and then typing a string will incrementally display matching past commands. See here: http://www.network-theory.co.uk/docs/bashref/Searching.html

Comment by bwoodacre 461 weeks and 6 days ago

Why all the negative votes? This was a perfectly good set of commands.I like to tinker with my bashrc and have commands set up like this.

Comment by xizdaqrian 461 weeks and 6 days ago

@bwoodacre, thx I didn't know about ctrl-r, @xizdaqrian thx 4 the support. I also like to mess with my bashrc alot, searching is a great feature, but to be able to alias a command to a shorter name which you can type faster and memorize easier is much better I think, at least for me it is. @wonko, thx your approach is nice

Comment by professoralex 461 weeks and 6 days ago

CTRL-r is really great because it lets you start recalling commands (from the current or past sessions) that you haven't even taken the time to put in .bashrc yet. I can see if you are frequently doing these things then an alias or function makes sense, so then you don't have to depend/bet on it being in your history. However since these are static aliases that take no arguments, the text of the commands can always be recalled with incremental search, and as a bonus, you get to see the actual text of the command when you run it, reminding you of what it actually does rather than hiding it behind some codename that you invented. Just my opinion.

Comment by bwoodacre 461 weeks and 5 days ago

Your point of view

You must be signed in to comment.