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.
If you have a new feature suggestion or find a bug, please get in touch via http://commandlinefu.uservoice.com/
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.
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.
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:
looks for IPs at the beginning of the line or prefixed by a space
also shows the ethernet adapter
May be useful to get user's ip address over the phone, as users struggle to read through a long ipconfig result.
Get your ip address, hostname, ASN and geolocation information. If you want just one field as a text response you can also get that,eg curl ipinfo.io/ip
Returns your external IP address to the command line using only wget
shorter (thus better ;-)
Plain Text Ip Output, independent of Layout change.
Gets your IP address and has a shorter URL.
looks at html for "ip" (it's a CSS class), then a little of cut and egrep to get IPv4 address.
I use this oneliner into conky.
Instead of hard-coding in a check to scrape info from ifconfig based on a specific interface, do it in a more portable way.
This works really well if you switch between wired, wireless, bluetooth or even VPN connections. You can get your current IP in a script (since it'll be something like tun0 instead of eth0 or wlan1).
This uses a well known public ip address 22.214.171.124, but it doesn't actually connect to it, it just shows you the route it would take.
Short list of all ip.
Shows even the newly supported multiple ip address on the same interface (see eth1).
For ipv6 use -6
Asks Google what your current IP address is. Bonus: Remove "@ns1.google.com" and you will instead get the IP address of your DNS server.
That's the easiest way to do it. -I (or capital i) display all network addresses of a host