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.

If you have a new feature suggestion or find a bug, please get in touch via http://commandlinefu.uservoice.com/

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.

Universal configuration monitoring and system of record for IT.

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:



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!

Top Tags




Terminal - wmi
wmic -U DOMAIN/user --password='password' //IP_HOST "select Caption,CSDVersion,CSName from Win32_OperatingSystem" | grep Windows
2010-09-20 14:23:37
User: dr_gogeta86
Functions: grep

Get windows version with servicepack and hostname


There is 1 alternative - vote for the best!

Terminal - Alternatives

Know a better way?

If you can do better, submit your command here.

What others think

fantastic, thanks


TapeDrive Select * from Win32_TapeDrive

UserAccount Select * from Win32_UserAccount

ComputerSystem Select * from Win32_ComputerSystem

NTEvent Select * from Win32_NTLogEvent


PageFileSet Select * from Win32_PageFileSetting

Voltage Select * from Win32_VoltageProbe

Alias Select * from Msft_CliAlias

NetClient Select * from WIN32_NetworkClient

SysAccount Select * from Win32_SystemAccount

NetLogin Select * from Win32_NetworkLoginProfile

DiskQuota Select * from Win32_DiskQuota


SystemEnclosure Select * from Win32_SystemEnclosure

BootConfig Select * from Win32_BootConfiguration

WMISet Select * from Win32_WMISetting

RecoverOS Select * from Win32_OSRecoveryConfiguration

NetProtocol Select * from Win32_NetworkProtocol

SystemSlot Select * from Win32_SystemSlot

SoftwareFeature Select * from Win32_SoftwareFeature

NetUse Select * from Win32_NetworkConnection

SCSICONTROLLER Select * from Win32_SCSIController

Startup Select * from Win32_StartupCommand

LogicalDisk Select * from Win32_LogicalDisk

SoundDev Select * from WIN32_SoundDevice

SoftwareElement Select * from Win32_SoftwareElement

MemPhysical Select * from Win32_PhysicalMemoryArray

PageFile Select * from Win32_PageFileUsage

Process Select * from Win32_Process

PortConnector Select * from Win32_PortConnector

Job Select * from Win32_ScheduledJob

DCOMAPP Select * from WIN32_DCOMApplication

Service Select * from Win32_Service

BaseBoard Select * from Win32_BaseBoard

LOGON Select * from Win32_LogonSession

SysDriver Select * from Win32_SystemDriver

Temperature Select * from Win32_TemperatureProbe

DeviceMemoryAddress Select * from Win32_DeviceMemoryAddress

NTEventLog Select * from Win32_NTEventlogFile

BIOS Select * from Win32_BIOS

DMAChannel Select * from Win32_DMAChannel

LoadOrder Select * from Win32_LoadOrderGroup

TimeZone Select * from Win32_TimeZone

CPU Select * from WIN32_PROCESSOR

Port Select * from Win32_PortResource

Share Select * from Win32_Share

Partition Select * from Win32_DiskPartition

FSDir Select * from Win32_Directory

NTDOMAIN Select * from Win32_NTDomain

Environment Select * from Win32_Environment

VolumeQuotaSetting Select * from Win32_VolumeQuotaSetting

QuotaSetting Select * from Win32_QuotaSetting

IDECONTROLLER Select * from Win32_IDEController

DiskDrive Select * from Win32_DiskDrive

DataFile Select * from CIM_DataFile

CDROM Select * from Win32_CDROMDrive

QFE Select * from Win32_QuickFixEngineering

OnBoardDevice Select * from Win32_OnBoardDevice

PrintJob Select * from Win32_PrintJob

UPS Select * from Win32_UninterruptiblePowerSupply

CSProduct Select * from Win32_ComputerSystemProduct

Server Select * from Win32_PerfRawData_PerfNet_Server

Printer Select * from Win32_Printer

IRQ Select * from Win32_IRQResource

Product Select * from Win32_Product

PrinterConfig Select * from Win32_PrinterConfiguration

Group Select * from Win32_Group

DesktopMonitor Select * from WIN32_DESKTOPMONITOR

OS Select * from Win32_OperatingSystem

Registry Select * from Win32_Registry

NICConfig Select * from Win32_NetworkAdapterConfiguration

MemLogical Select * from Win32_LogicalMemoryConfiguration

NIC Select * from Win32_NetworkAdapter

Comment by oernii3 292 weeks and 3 days ago

wmic for linux:


Comment by oernii3 292 weeks and 3 days ago

Your point of view

You must be signed in to comment.