Hide

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.
Hide

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:

Hide

News

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!
Hide

Top Tags

Hide

Functions

What is my public IP-address?

Terminal - What is my public IP-address?
dig @208.67.222.222 myip.opendns.com
2010-08-01 13:58:54
User: CodSpirit
Functions: dig
5
What is my public IP-address?

Very effective, use only DNS protocol. The @ part is optional if you already set opendns servers as default ns servers.

Alternatives

There are 9 alternatives - vote for the best!

Terminal - Alternatives
curl ifconfig.me
2010-08-01 13:56:01
User: CodSpirit
Tags: ip address
36

Short command, easy to remember

curl ifconfig.me
2010-08-01 13:56:01
User: CodSpirit
Tags: ip address
36

Short command, easy to remember

curl ipinfo.io
2016-09-04 08:23:25
User: MrTux
18

Return IP information about your external ip address with JSON format

wget -qO- icanhazip.com
2010-06-24 03:49:14
Functions: wget
12

Curl is not installed by default on many common distros anymore. wget always is :)

wget -qO- ifconfig.me/ip
curl -s 'http://checkip.dyndns.org' | sed 's/.*Current IP Address: \([0-9\.]*\).*/\1/g'

Know a better way?

If you can do better, submit your command here.

What others think

I Like

curl icanhazip.com

the most, its short and nothing else then my ips comes out

Comment by peshay 384 weeks and 6 days ago

Just add the +short option to the dig command and you'll get only the IP :) I like the fact that this uses OpenDNS since it's proven itself to be quite reliable.

Comment by michaelmior 384 weeks and 5 days ago

http://www.nfljerseys.us/ Cheap NFL Jerseys

http://www.yeezy-boost350v2.com/ Yeezy 350 Boost V2

http://www.raybanoutletclearance.com/ Ray Ban Outlet

http://www.longchampbags.us.com/ Longchamp Outlet

http://www.tomsoutlet-online.us.com/ Toms Outlet

http://www.adidas-uk.org.uk/ Adidas

http://www.yeezy.com.co/ Yeezy

http://www.raybansunglasses.ca/ Ray Ban Sunglasses

http://www.yeezys.org/ Yeezys

http://www.kade-sapde.us.com/ Kade Sapde

http://www.adidasoutlets.us.com/ Adidas Outlet

http://www.nike-stores.fr/ Nike Store

http://www.underarmouroutlet.us.com/ Under Armour

http://www.timberlanduk.org.uk/ Timberland

http://www.jordan12.us/ Jordan 12

http://www.yeezy-shoes.us.com/ Yeezy Shoes

http://www.yeezyboost350.us.com/ Yeezy 350

http://www.nikeairmax.us/ Nike Air Max

http://www.outlettoms.us/toms-women-c-1/ Toms Outlet

http://www.ultraboostuncaged.us/ Ultra Boost

http://www.mlb-jerseys.us/ Cheap MLB Jerseys

http://www.adidas-nmds.com/ Adidas NMD

http://www.oakleyoutlet.net.co/ Oakley Outlet

http://www.katespadeoutlets.us/ Kate Spade Outlet

http://www.adidas-outlet.org/ Adidas Outlet

http://www.nikeairmax-90.com/ Nike Air Max 90

http://www.timberland-outlet.us/ Timberland Outlet

http://www.adidas-nmd.org.uk/ Adidas NMD

http://www.adidaseqt.com/ Adidas EQT

http://www.ralphlaurens.org.uk/ Ralph Lauren UK

http://www.jordan4.us/ Jordan 4

http://www.cheapjordan-shoes.com/ Cheap Jordan

http://www.adidasnmdoutlet.com/ Adidas NMD

http://www.katespadeoutlet.us.org/ Kate Spade Outlet

http://www.longchamp-outlet.ca/ Longchamp Outlet

http://www.adidasnmdsales.us/ Adidas NMD R1

http://www.nike-airmax90.com/ Nike Air Max90

http://www.running-shoes.top/ Running shoes

http://www.starboots.us/ Basketball Shoes

http://www.michael-kors-bags.us/ Michael Kors bags

http://www.yeezy-outlet.us/ Adidas Yeezy

http://www.asics.us.com/ Asics shoes

http://www.coach-online.us/ Coach online

http://www.timberland-outlets.org/ Timberland shoes

http://www.jordan-air.us/ Jordan Shoes

http://www.adidasyeezy.org/ Adidas Yeezy Shoes

http://www.vapor-max.com/ Nike Air Vapor Max

http://www.rayban.com.co ray ban sunglasses

http://www.nike-store.us Nike Outlet

http://www.longchamp--bags.com longchamp bags

http://www.adidas-shoes.us Adidas Shoes

http://www.nike-outletstore.com Nike Shoes

http://www.yeezy-boost350.com Yeezy Shoes

http://www.jamesshoes.org james Sale

http://www.adidas-online.us Adidas NMD

http://www.jordan--shoes.org Jordan 12

http://www.air-max2017.com Air Max Outlet

http://www.asicsgel.org Asics Gel

http://www.flipflops.us.com Flip Flopst

http://www.ray-bans.in.net ray ban sunglasses

http://www.oakleysunglassesoutlet.net oakley sunglasses

http://www.oakleysunglassesstore.us oakley sunglasses

http://www.cheapoakleysunglasses.biz cheap oakley sunglasses

http://www.cheapraybansunglasses.biz cheap rayban sunglasses

http://www.dressesforwomen.us Nike Shoes

Comment by lovelin1987 23 weeks and 6 days ago

http://www.nfljerseys.us/ Cheap NFL Jerseys

http://www.yeezy-boost350v2.com/ Yeezy 350 Boost V2

http://www.raybanoutletclearance.com/ Ray Ban Outlet

http://www.longchampbags.us.com/ Longchamp Outlet

http://www.tomsoutlet-online.us.com/ Toms Outlet

http://www.adidas-uk.org.uk/ Adidas

http://www.yeezy.com.co/ Yeezy

http://www.raybansunglasses.ca/ Ray Ban Sunglasses

http://www.yeezys.org/ Yeezys

http://www.kade-sapde.us.com/ Kade Sapde

http://www.adidasoutlets.us.com/ Adidas Outlet

http://www.nike-stores.fr/ Nike Store

http://www.underarmouroutlet.us.com/ Under Armour

http://www.timberlanduk.org.uk/ Timberland

http://www.jordan12.us/ Jordan 12

http://www.yeezy-shoes.us.com/ Yeezy Shoes

http://www.yeezyboost350.us.com/ Yeezy 350

http://www.nikeairmax.us/ Nike Air Max

http://www.outlettoms.us/toms-women-c-1/ Toms Outlet

http://www.ultraboostuncaged.us/ Ultra Boost

http://www.mlb-jerseys.us/ Cheap MLB Jerseys

http://www.adidas-nmds.com/ Adidas NMD

http://www.oakleyoutlet.net.co/ Oakley Outlet

http://www.katespadeoutlets.us/ Kate Spade Outlet

http://www.adidas-outlet.org/ Adidas Outlet

http://www.nikeairmax-90.com/ Nike Air Max 90

http://www.timberland-outlet.us/ Timberland Outlet

http://www.adidas-nmd.org.uk/ Adidas NMD

http://www.adidaseqt.com/ Adidas EQT

http://www.ralphlaurens.org.uk/ Ralph Lauren UK

http://www.jordan4.us/ Jordan 4

http://www.cheapjordan-shoes.com/ Cheap Jordan

http://www.adidasnmdoutlet.com/ Adidas NMD

http://www.katespadeoutlet.us.org/ Kate Spade Outlet

http://www.longchamp-outlet.ca/ Longchamp Outlet

http://www.adidasnmdsales.us/ Adidas NMD R1

http://www.nike-airmax90.com/ Nike Air Max90

http://www.running-shoes.top/ Running shoes

http://www.starboots.us/ Basketball Shoes

http://www.michael-kors-bags.us/ Michael Kors bags

http://www.yeezy-outlet.us/ Adidas Yeezy

http://www.asics.us.com/ Asics shoes

http://www.coach-online.us/ Coach online

http://www.timberland-outlets.org/ Timberland shoes

http://www.jordan-air.us/ Jordan Shoes

http://www.adidasyeezy.org/ Adidas Yeezy Shoes

http://www.vapor-max.com/ Nike Air Vapor Max

http://www.rayban.com.co ray ban sunglasses

http://www.nike-store.us Nike Outlet

http://www.longchamp--bags.com longchamp bags

http://www.adidas-shoes.us Adidas Shoes

http://www.nike-outletstore.com Nike Shoes

http://www.yeezy-boost350.com Yeezy Shoes

http://www.jamesshoes.org james Sale

http://www.adidas-online.us Adidas NMD

http://www.jordan--shoes.org Jordan 12

http://www.air-max2017.com Air Max Outlet

http://www.asicsgel.org Asics Gel

http://www.flipflops.us.com Flip Flopst

http://www.ray-bans.in.net ray ban sunglasses

http://www.oakleysunglassesoutlet.net oakley sunglasses

http://www.oakleysunglassesstore.us oakley sunglasses

http://www.cheapoakleysunglasses.biz cheap oakley sunglasses

http://www.cheapraybansunglasses.biz cheap rayban sunglasses

http://www.dressesforwomen.us Nike Shoes

Comment by lovelin1987 23 weeks and 6 days ago

Your point of view

You must be signed in to comment.