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

Take screenshot through SSH

Terminal - Take screenshot through SSH
DISPLAY=:0.0 import -window root /tmp/shot.png
2010-10-28 12:00:00
User: depesz
25
Take screenshot through SSH

Of course it requires import command, from imagemagick tools, but it's simpler to type, and imagemagick is usefull anyway.

Alternatives

There are 4 alternatives - vote for the best!

Terminal - Alternatives
DISPLAY=":0.0" import -window root screenshot.png
2010-02-17 13:02:24
User: walterl
18

The `export` is unnecessary if it's only applicable to the one command.

ssh [email protected] "DISPLAY=:0.0 import -window root -format png -"|display -format png -
2011-04-08 01:07:41
User: splante
Functions: ssh
12

Admittedly, I'd never have thought of this without the earlier examples, but here's one that you can execute from your workstation to just display the image from another, without separately doing a file transfer, etc. By the way, I hear a loud beep coming from the other room, so I guess it's not too stealthy :-D

xwd -root -display :0.0| xwdtopnm | pnmtopng > Screenshot.png
2010-10-28 07:44:25
User: B4ckBOne
5

When connected to a box via ssh you can do a quick screenshot of that box using this command.

After that you can rscp it over to your box and look at it.

DISPLAY=":0.0"; export DISPLAY; import -window root gotya.png
2010-02-17 09:13:54
User: Abiden
Functions: export
3

Say if you're logged into a remote system via ssh and this system has an x window system, but yet you still want a screen shot of what's going on graphically. This will do it for you. :-)

export DISPLAY=":0.0" && import -window root screenshot.png
2010-02-17 12:13:49
User: fraktil
Functions: export
-3

Like the given command, but combines _DISPLAY=":0.0"_ with _export DISPLAY_ to get _export DISPLAY=":0.0"_ and only imports if DISPLAY is set successfully.

Know a better way?

If you can do better, submit your command here.

What others think

2016-1-26 xiaozhengm

http://www.coachfactory--outletonline.com

http://www.fitflopuk.me.uk

http://www.michaelkorsukbag.co.uk

http://www.get-coachoutletonline.org

http://www.michaelkors-handbag.me.uk

http://www.runningshoes.com.co

http://www.toms-outlet.cc

http://www.ugg-boots-store.com

http://www.louboutinshoes.cc

http://canadagoose.outletmalls.us.com

http://www.nike-blazerlow.fr

http://uggs.uggaustralia.qc.com

http://www.nikestoreuk.me.uk

http://www.true-religionjeans.net.co

http://coach.outletmalls.us.com

http://www.adidasshoes.name

http://michaelkors.adsmall.us.com

http://www.hermesbelt.in.net

http://www.mulberry-bags.org.uk

http://coach.eshopping.us.com

http://louisvuitton.outletmalls.us.com

http://www.hermesuk.org.uk

http://www.katespadeoutletsale.in.net

http://toms.adsmall.us.com

http://www.fitflopssaleclearance.com

http://michaelkors.eshopping.us.com

http://ugg.adsmall.us.com

http://www.louis-vuitton-outlet.us.com

http://www.canadagoosejackets.org.uk

http://ugg.eshopping.us.com

http://www.timberlanduk.me.uk

http://www.jordan13.org

http://christianlouboutin.outletmalls.us.com

http://www.coachoutlet-storeonline.in.net

http://www.instylermax.in.net

http://www.coachfactoryoutletus.in.net

http://www.coachoutlet-storeonline.us.com

http://tiffany.outletmalls.us.com

http://www.louboutin.org.uk

http://www.monclerjacketsoutlet.us.com

http://louboutin.adsmall.us.com

http://www.louisvuitton-borse.it

http://www.mcmhandbags.name

http://www.truereligion-outlet.com

http://www.new-balanceoutlet.us

http://www.louisvuitton-sac-pascher.fr

http://www.outlet-toms.cc

http://canadagoose.shopgioia.com

http://www.coach-factory-outlet-online.us.com

http://www.top-coachoutletstore.org

http://www.edhardy-outlet.name

http://www.jordan6.net

http://www.longchamphandbags.com.co

http://www.chaussurelouboutin-pascher.fr

http://www.ghdstraighteners.me.uk

http://www.nike-tn-pascher.fr

http://www.saclongchamp-solde.fr

http://www.coachcanadaoutlet.ca

http://burberryoutlet.outletmalls.us.com

http://sunglasses.outletmalls.us.com

http://www.michael--korsoutlet.us.com

http://www.nikefreeruns.uk

http://michaelkors.outletmalls.us.com

http://www.mk-michaelkorsoutletonline.com

http://www.cheaplouisvuittonhandbags.org

http://burberry.eshopping.us.com

http://www.michaelkors-outletonlines.in.net

http://www.airjordan-pascher.fr

http://www.ralphlaurenuk.me.uk

http://www.moncler-jackets.org

http://www.adidassuperstar.co.uk

http://abercrombie.shopgioia.com

http://www.authenticlouisvuittonhandbags.net

http://www.airforce1-nike.fr

http://www.coach-factoryoutlet.cc

http://www.coachoutletonlinespick.org

http://www.coachouletbtf.com

http://rayban.eshopping.us.com

http://www.ghdhairstraighteners.com.co

http://www.ralph-lauren-pas-cher.fr

http://ralphlauren.shopgioia.com

http://rayban.adsmall.us.com

http://www.mcmoutlet.us

http://www.louisvuittonuk.me.uk

http://www.jordan-femmepascher.fr

http://www.toms.in.net

http://burberry.outletmalls.us.com

http://www.cheap-uggsonsale.in.net

http://oakley.adsmall.us.com

http://www.basketballshoes.net.co

http://ugg.shopgioia.com

http://www.raybansoutlet.in.net

http://www.mizunorunningshoes.in.net

http://www.pandoracharms.com.co

http://www.truereligion-outlet.in.net

http://www.michaelkorsoutletoff.in.net

http://www.tomswedges.in.net

http://ugg.outletmalls.us.com

http://www.cheapjordansshoes.in.net

http://www.mymichaelkorssoutlets.org

http://www.airjordan-uk.org.uk

http://www.michaelkors-handbags.me.uk

http://www.nikeblazers.me.uk

http://burberry.shopgioia.com

http://timberland.adsmall.us.com

http://coach.adsmall.us.com

http://www.nike-airmax90.me.uk

http://www.nikesb.uk

http://www.nikerosherunwomen.me.uk

http://www.christianlouboutinuk.me.uk

http://www.ugg-boots-australia.com

http://www.adidas-trainers.me.uk

http://www.michaelkors-discount.com

http://www.polooutlet.us.com

http://www.niketrainers.com.co

http://www.airmax95.org.uk

http://www.montblancpens.us.org

http://www.adidasuk.org.uk

http://www.poloralphlauren.net.co

http://www.rolex-replicawatches.com.co

http://www.ralph-lauren.me.uk

http://www.jordan3.net

http://www.cheapwholesaleuggboots.com

http://hollister.shopgioia.com

http://www.michaelkorshandbags.cc

http://www.fitflops.in.net

http://www.snapbacks-wholesale.us

http://www.edhardyukclothing.me.uk

http://www.michaelkors-outlet-handbags.com

http://www.fitflops.us

http://www.raybans.org.uk

http://northface.outletmalls.us.com

http://nike.outletmalls.us.com

http://www.michaelkorsoutletforus.com

http://www.toryburchoutlet-sale.in.net

http://www.juicy-couture.us

http://www.raybansunglassesdeals.com.co

http://www.louis-vuittonhandbags.us

http://www.quality-outlet.com

http://christianlouboutin.eshopping.us.com

http://www.cheap-tomsoutlet.us

http://www.longchampoutlet.net.co

http://www.michaelkors-bags.me.uk

http://www.louisvuittonoutlets.name

http://www.coach-factoryoutlet.eu.com

http://www.tomsshoes.us.com

http://www.canadagooseoutlet.cc

http://canadagoose.adsmall.us.com

http://www.adidasgazelle.me.uk

http://christianlouboutin.shopgioia.com

http://www.kate-spadeoutlet.com.co

http://www.pradaoutlet.name

http://www.guccioutlet.com.so

http://www.jordan4.net

http://canadagoose.eshopping.us.com

http://www.michael-korshandbags.net.co

http://www.soccer-jerseys.us.com

http://www.nikerosheruns.me.uk

http://www.truereligion-outlet.net.co

http://oakley.shopgioia.com

http://www.sunglass-outlet.us

http://www.chiflatiron.in.net

http://www.tomsoutletstore.in.net

http://www.coachoutletstoreonlines.us

http://www.gucci-borse.it

http://www.jordan8.net

http://www.michaelkors-mkoutlet.in.net

http://www.chaussure-louboutin.fr

http://www.michaelkors-outletsale.com

http://www.michael-korsuk.me.uk

http://www.nike-airmax.org.uk

http://burberry.adsmall.us.com

http://www.montblanc-pens.name

http://www.sac-longchamppliage.fr

http://www.saclongchamp--pascher.fr

http://www.michaelkorsoutletvip.in.net

http://www.cheapjordans.com.co

http://www.louisvuitton-outletstores.org

http://www.marc-jacobs.in.net

http://www.pandorajewelryoutlet.name

http://www.christianlouboutinsell.net

http://www.michael-kors-handbags.uk

http://rayban.shopgioia.com

http://www.oakleysunglassesfake.in.net

http://www.kate-spadeoutlet.us

http://www.coach-factoryoutlet.com.co

http://www.gucci-outlet.org

http://www.adidas-shoes.me.uk

http://ralphlauren.eshopping.us.com

http://oakley.eshopping.us.com

http://www.vipmichaelkors-outletonline.com

http://www.canadagooseuk.me.uk

http://www.oakley--sunglasses.us.org

http://www.kate-spadeoutlet.in.net

http://truereligion.adsmall.us.com

http://jordan.outletmalls.us.com

http://www.guccioutlet.net.co

http://www.nikeuk.me.uk

http://www.katespadeuk.me.uk

http://www.christianlouboutinoff.us

http://www.nikecortez.com.co

http://www.nikehuarache.com.co

Comment by xiaozhengm 90 weeks and 4 days ago

http://www.michael-korsoutletonlines.us.com

http://www.truereligionjeansoutlet.name

http://www.dallas-cowboysjerseys.us

http://www.coachoutletonlineinc.us.com

http://www.michaelkorsoutletclearances.us.com

http://www.michaelkorshandbags-outlet.us.org

http://www.fredperrypoloshirts.us

http://www.longchampoutletstore.com

http://www.michaelkorsoutletvip.in.net

http://www.christianlouboutinshoes.us.org

http://www.fendihandbags.us

http://www.officialcoachoutlet.us.com

http://www.coachfactoryoutletonline.in.net

http://www.swarovskicrystal.name

http://www.cheapoakleyssunglasses.com.co

http://www.louis-vuitton-handbags.us.org

http://www.rolex-replicawatches.com.co

http://www.fredperry.us.com

http://www.valentino.in.net

http://www.nike-tn-pascher.fr

http://www.discountoakleysunglasses.com.co

http://www.outlet-coach.us

http://www.michaelkorsofficial.us

http://www.ralph-lauren-pas-cher.fr

http://www.oakley.nom.co

http://www.vansshoes.in.net

http://www.yeezyboost.us.com

http://www.ralph-laurenuk.co.uk

http://www.michaelkorsoutletonlineclearance.in.net

http://www.longchampbags.uk

http://www.yeezy-boost350v3.us.com

http://www.nikeoutletshoes.us

http://www.yeezyboost350.me.uk

http://www.birkenstocksandals.name

http://www.stlouiscardinalsjerseys.us

http://www.nikeroshe.us

http://www.michael-korshandbags.us.com

http://www.bostonredsoxjerseys.us

http://www.christianlouboutinshoes.org.uk

http://www.james-shoes.com

http://www.2017nikeairmax.us

http://www.airmax90.org

http://www.christianlouboutinshoes.us

http://www.chaussure-louboutin.fr

http://www.cheapoakleysunglasses.me.uk

http://www.cheapraybans.com.co

http://www.michaelkorsoutlet.co.uk

http://www.true-religion.us.com

http://www.poloralph-lauren.in.net

http://www.cheaprolexreplicawatches.us

http://www.adidasyeezyboost-350.us

http://www.rolexreplicawatches.name

http://www.seattleseahawksjerseys.us

http://www.bostoncelticsjerseys.us

http://www.jordan-femmepascher.fr

http://www.cheapjordans-shoes.us.com

http://www.lebronjamesshoes.org

http://www.christianlouboutinshoesoutlet.com

http://www.coach-outletonlines.us.com

http://www.michaelkorsoutletstore.us.com

http://www.fitflopssaleclearance.com

http://www.sanfranciscogiantsjerseys.us

http://www.adadassupercolor.com

http://www.fitflopsclearance.us.com

http://www.nike-airmax90.me.uk

http://www.swarovski-crystal.uk

http://www.oakleysunglassessale.us.org

http://www.hermesbirkin.in.net

http://www.michael-korsoutlet.ca

http://www.louisvuittonsacpascher.fr

http://www.ralphlaurensaleclearance.me.uk

http://www.monclerjacketsuk.org.uk

http://www.nfljerseyscheap.in.net

http://www.timberlandbootsoutlet.us

http://www.kevindurantshoes.us

http://www.ralphlaurensaleclearance.co.uk

http://www.outletralphlauren.us.com

http://www.adidastrainersuk.org.uk

http://www.michaelkors-outlet.co.uk

http://www.pandora-bracelet.us

http://www.coach--outlet.us.com

http://www.wwwlouisvuittonoutlet.us.com

http://www.michaelkorshandbagsoutlet.in.net

http://www.pandoracharms.us.com

http://www.abercrombieandfitch.in.net

http://www.beatsbydrdre.me.uk

http://www.coachhandbagsoutlet.us.com

http://www.nike-airmax91.me.uk

http://www.coachoutletonlinecoachfactoryoutlet.us.com

http://oakley.sunglassessale.us.com

http://www.poloralphlauren-outlet.co.uk

http://www.polooutlet.com.co

http://www.todsoutlet.name

http://www.newyorkyankeesjerseys.us

http://www.michaelkorsoutletclearance.com.co

http://www.edhardyukclothing.me.uk

http://www.cheapnfl-jerseyswholesale.us.com

http://www.yeezy-boost350v2.us.com

http://www.hollisterclothingstore.us

http://www.texasrangersjerseys.us

http://www.chicagobullsjerseys.us

http://www.nikestoreuk.me.uk

http://www.kobeshoes.name

http://www.discountnikeshoessc.org

http://www.adidasnmd.us.org

http://www.hermesoutletonline.us

http://www.adidas-outlet.us.com

http://www.cheapjerseys.eu.com

http://www.cheapnfljerseys-wholesale.us

http://www.adidasshoes.us

http://www.outletmichaelkorsoutlet.us.com

http://www.greenbaypackersjerseys.us.com

http://www.sanantoniospursjerseys.us

http://www.coachoutletcanada.ca

http://www.ralphlauren-outletonline.us.com

http://www.hollisterclothing.org

http://www.dolceandgabbanaoutlet.com

http://www.burberryoutletstore.us

http://www.coach-factoryoutlet-online.us.com

http://www.airjordan-uk.org.uk

http://www.coachoutlets.eu.com

http://www.michaelkors-handbags.us.com

http://www.michaelkors-handbags.uk

http://www.birkenstocksandals.org.uk

http://www.oakley-sunglassesoutlet.com.co

http://www.cheapjordanshoes.us.com

http://www.chicagocubsjerseys.us

http://www.adidas-shoes.me.uk

http://www.cheapmlbjerseyswholesale.us.com

http://www.louisvuittonoutletus.us.com

http://www.beatsheadphones.name

http://www.christianlouboutinoutletsale.org

http://www.coachfactoryoutletsaleonline.us.com

http://www.yeezy-boost350v2.us

http://www.adidasyeezyshoes.us.com

http://www.todsoutlet.us

http://www.newenglandpatriots-jerseys.us

http://www.mbtshoes.in.net

http://www.levisjeans.name

http://www.yeezyboost.org.uk

http://www.chiflatiron.in.net

http://www.fit-flops.us.com

http://www.coachoutletstore-online.us.com

http://www.yeezyboost-350.us.com

http://www.coachoutlet.in.net

http://www.montblanc-pens.net.co

http://www.gucci--borse.it

http://www.celineoutlet.us

http://www.moncleroutletjackets.us

http://www.red-bottoms.us.com

http://www.chaussurelouboutin-pascher.fr

http://www.gucciuk.co.uk

http://www.nikeoutletonline.us.com

http://www.guccioutlets.us.org

http://www.oklahomacitythunderjerseys.us

http://www.pandorajewelry.me.uk

http://www.longchamp-handbags.us

http://www.tommyhilfiger.in.net

http://www.nfl-jerseyscheap.us.com

http://www.raybansunglassessale.us.org

http://www.miamiheatjerseys.us

http://www.christianlouboutinoutlet.us

http://www.coachoutletsstore.us.com

http://www.louisvuitton-outletonline.us.com

http://www.adidas-nmd.us.com

http://www.michaelkorshandbagsuk.org.uk

http://www.yeezyboost-350.co.uk

http://www.stephcurry-shoes.us

http://www.nikehuarache.com.co

http://www.ultraboost.us

http://www.christianlouboutinsale.us.org

http://www.adidasshoes.me.uk

http://www.pradaoutlets.us

http://www.nike-blazerlow.fr

http://www.moncler-outlet.us.com

http://www.katespadeoutletonline.us.com

http://www.fit-flops.us

http://www.michaelkorsoutletofficial.us

http://www.coach-outletonline.us.org

http://www.poloralphlauren-outlet.us.org

http://www.outletlongchamp.us

http://www.coachfactoryoutletstore.in.net

http://www.edhardy-outlet.name

http://www.adidassuperstar.me.uk

http://www.saclongchamppas-cher.fr

http://www.coachoutletstoreonlineclearances.org

http://www.sac-longchamp-pliage.fr

http://www.mulberry-bags.me.uk

http://www.versaceshoes.in.net

http://www.nikecortez.com.co

http://www.mulberryoutlet.org.uk

http://www.pandoracharms.com.co

http://www.pandoracharmssaleclearance.com

http://www.louisvuittonoutlet.ca

http://www.philadelphiaphilliesjerseys.us

http://www.tiffanyandcojewelry.in.net

http://www.oakley--sunglasses.us.org

http://www.cheapmontblancpens.org

http://www.oakleysunglassesonlines.us.com

http://www.toms.in.net

20170401caiyan

Comment by caiyan12 29 weeks ago

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

http://www.max2017.us/ Air Max 2017

http://www.vapor-max.org/ Nike Vapormax

http://www.yeezyboost350v2.com/ Yeezy Boost 350 V2

http://www.spinnerfidgettoy.us/ Spinner Fidget

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

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

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

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

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

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

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

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

http://www.yeezys.org/ Yeezys

http://www.yeezyboost-350.org.uk/ Yeezy

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

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

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

http://www.adidas-outlet.in.net/ Adidas Outlet

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

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

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

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

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

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

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

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

http://www.yeezy-boost350.com/ Yeezy Boost 350

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.vapor-max.com/ Vapor Max

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

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

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

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

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

http://www.jordan-shoes.in.net/ Jordan Shoes

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

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

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

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

http://www.nike-airmax90.com/ Nike Air Max 90

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 outlet

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

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

http://www.vapor-max.com/ Cheap Nike Shoes 2017

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

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

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

http://www.nikeairvapormax.top/ Nike VaporMax

http://www.airmaxvapor.com/ Air Maxvapor

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

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

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

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

http://www.adidas-online.us/ adidas outlet online

http://www.jordan--shoes.org/ Jordna Shoes

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

http://www.jamesshoes.org/ James Shoes

http://www.flipflops.us.com/ flip flops

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

http://www.asicsgel.org/ Asics

http://www.rayban.com.co/ Ray Ban

http://www.ray-bans.in.net/ Ray Bans

http://www.oakleysunglassesoutlet.net/ oakley sunglasses

http://www.dressesforwomen.us dresses for women

http://www.cheapoakleysunglasses.biz oakley sunglasses

http://www.cheapraybansunglasses.biz ray ban sunglasses

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

http://www.airmax97.com/ Air Max 97

http://www.oakleysunglassesstore.us oakley sunglasses

Comment by lovelin1987 10 weeks and 5 days ago

Your point of view

You must be signed in to comment.