shorter (thus better ;-) Show Sample Output
Returns your external IP address to the command line using only wget Show Sample Output
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 Show Sample Output
This obey that you don't match any broadcast or network addresses and stay between 1.1.1.1 - 254.254.254.254
If you are interested in interfaces other than eth0 you will need to change eth0 to your interface name. You could use this mammoth to nab the ip4 addresses of all your interfaces perl -e '@_=`ifconfig -a`; sort(@_); foreach(@_) { /(inet addr\:)(\d+.\d+.\d+.\d+ )/; $_=$2; @uniq=grep($_ ne $prev && (($prev) = $_), @_);} print join "\n",@uniq,"\n"; ' it seems silly to have all this code when the following will work fine ifconfig -a | grep "inet " | awk -F":" ' { print $2 } ' | cut -d " " -f1 Show Sample Output
ifconfig is dead, long-live iproute2 this also uses only awk to do the grepping and removal of CIDR notation Show Sample Output
Useful for creating MAC addresses for virtual machines on a subnet. 00:16:3e is a standard Xen OID, change as needed. Show Sample Output
Grabs the ip2location site and removes everything but the span tag containing the country value. Place it inside your .bashrc or .bash_aliases file. Show Sample Output
JSON version. Additionally it may give your geolocation if it's known by hostip.info Show Sample Output
Grabs your external public IP. Show Sample Output
Gets the IP and sticks it into the middle-mouse-click buffer
lynx -dump ip.nu
Your IP address is 0.0.0.0
Does a ping scan on the local subnet and returns the IPs that are up Show Sample Output
That's the easiest way to do it. -I (or capital i) display all network addresses of a host
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.
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. Show Sample Output
Gets your IP address and has a shorter URL. Show Sample Output
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.
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
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: