All commands (14,187)

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. 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.

Share Your Commands


Check These Out

print all network interfaces' names and IPv4 addresses
ifconfig can't properly display interface's name longer 9 symbols,also it can't show IPs added thru ip command, so 'ip' should be used instead. This alias properly shows long names, bond interfaces and all interface aliases. loopback interface is ignored, since its IP is obvious

find text in a file
this will find text in the directory you specify and give you line where it appears.

find process associated with a port
e.g. fuser 25/tcp (see which pid is listening on smtp)

Remove invalid key from the known_hosts file for the IP address of a host
Quick shortcut if you know the hostname and want to save yourself one step for looking up the IP address separately.

Generate MD5 of string and output only the hash checksum

draw line separator
Even shorter: $ seq -s '*' 120|tr -d '[0-9]'

Speed up launch of firefox
Compress information DBs of firefox to speed up the launch of browser.

Install pip with Proxy
Installs pip packages defining a proxy

Force the script to be started as root
Place this code at the beginning of your script to ensure that it can only be executed by the root.

Encode text in Base64 using Perl
MIME::Base64 is a part of Perl5 distribution. You can also use decode_base64 for oposite result.


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: