Penguin
Blame: WindowsCommandLine
EditPageHistoryDiffInfoLikePages
Annotated edit history of WindowsCommandLine version 1, including all changes. View license author blame.
Rev Author # Line
1 CraigBox 1 The MicrosoftWindows command line is more powerful than you might initially think, especially if you're used to the serious power of bash(1).
2
3 A complete reference of command line programs can be found at C:\WINDOWS\Help\ntcmds.chm. Here is a good summary, taken from a TechTV show.
4
5 Windows XP boasts a number of command line tools that are guaranteed to satisfy even the most Linux hungry among us. I'll show them to you on tonight's show. Here's a list of some new tools mixed up with the old favorites that will make you love the command prompt as much as I do. A lot of these commands are intended for the XP Professional machine administrating a network, but they can serve a purpose for the home user as well.
6
7 ; __bootcfg__ : View your boot loader settings, such as your default OS and selection timeout, as well as your boot entries and load options.
8
9 ; __defrag__ : You probably already guessed that this defrags your hard drive. Type only "defrag" into your command prompt to get a list of possible arguments, such as the drive letter and the type of output.
10
11 ; __diskpart__ : Manages your disk partitions. After you type "diskpart" into your command prompt, your prompt will become "DISKPART." Type a question mark to get a list of possible arguments. Type exit to leave diskpart.
12
13 ; __driverquery__ : Will get you a nice list of your drivers and their properties.
14
15 ; __fsutil__ : This is a handy command. You can do everything from managing your hardlinks to querying the free space in a volume. Type "fsutil" into your command prompt, and you'll see a list of options. I choose "fsinfo" from the list, so I type "fsutil fsinfo" into the prompt. Now I get even more options, but I choose drives by typing "fsutil fsinfo drives." It's fun, it's easy, and you'll get the hang of it. Explore this utility. There are a lot of cool features and hidden twists.
16
17 ; __getmac__ : This gets the MAC (Media Access Control) address.
18
19 ; __gpresult__ : Get the RSoP, user settings, and computer group policy settings.
20
21 ; __netsh__ : A network configuration tool. Type "netsh" to enter the tool, or "netsh /?" to learn more about it. To exit this tool, type "exit" at the "netsh>" prompt.
22
23 ; __openfiles__ : Allows an administrator to display or disconnect open files in XP professional. Type "openfiles /?" for a list of possible parameters.
24
25 ; __recover__ : This command attempts to recover readable information from a damaged disk. Type "recover" to get the syntax.
26
27 ; __reg__ : The console registry tool. Get syntax help when you type "reg" into the prompt. You can export the registry, copy, restore, compare, and more.
28
29 ; __schtasks__ : The administrator can schedule, run, change, or delete tasks on a local or remote machine. Type "schtasks /?" without the quotes for a list of options.
30
31 ; __sfc__ : The system file checker scans protected system files and replaces the ones you (or your applications) hacked beyond repair with the real, official Microsoft versions. Type "sfc" into the command prompt to get a list of options.
32
33 ; __shutdown__ : You can shut down or restart your own computer, or an administrator can shut down or restart a remote computer. Type "shutdown" into your command prompt to see a list of possible arguments.
34
35 ; __systeminfo__ : Basic system configuration information, such as the system type, the processor type, your time zone, your virtual memory settings, and much more.
36
37 ; __tasklist__ : Want to know what's going on behind the scenes? Type "tasklist" into the command prompt, and get a list of current processes.
38
39 ; __taskkill__ : Now that you know what's going on behind the scenes, maybe you want to shut a few of these extraneous tasks down. That's where taskkill comes in. Type "taskkill /?" for a quick lesson in the syntax of the command, then shut down all those random processes. I just killed my MS messenger by typing "taskkill /PID 1680." I got the PID from running tasklist, above.
40
41 See also WindowsNotes and the [Sysinternals website|http://www.sysinternals.com/].