Industry guru Dave Taylor offers free tech support on a wide variety of technical and business topics, including HTML, Apple iPhone, online advertising, Cascading Style Sheets, Web design, management, Unix, Linux, search engine optimization, online dating, Mac OS X, shell script programming and Microsoft Windows.

How do I "open a command prompt" in Microsoft Windows?

I read a set of instructions for Microsoft Windows XP that required me to "open a command prompt" before running/typing in some sort of command. How do I do that?

Dave's Answer:

Most normal Windows programs, like Microsoft Word, can be run by double-clicking an icon on the desktop or a shortcut under the Start Menu. A few programs, however, have to be "run within a command prompt" in order to work. We'll show an example of how to run one of those programs called "ipconfig".

To open a command prompt, first open a "Run" dialog box. To do this, press Windows+R -- in other words, hold down the "Windows" key on your keyboard, and press the R key. (The "Windows" key is the key in the lower left area of the keyboard with the Windows logo on it -- usually between the "Ctrl" and the "Alt" keys.)

When you press Windows+R, the "Run" dialog will appear:

run dialog

In the text space, type "cmd" and hit Enter. Now a window will open, looking something like this:

command prompt

That's the command prompt. An example of a program that can only be run inside a command prompt, is a program called "ipconfig", which is a Windows utility that tells you what your IP address is. You may encounter instructions that say something like, "Open a command prompt and run ipconfig", without giving more specifics that would be useful to a novice. In that case, you would open the command prompt as shown above, and type "ipconfig" in the command prompt, which will give you output that looks something like this:

command prompt ipconfig output

What would have happen if you had run ipconfig outside of a command prompt? Try pressing Windows-R to open the "Run" dialog again, and type "ipconfig" and press Enter:

run dialog ipconfig

You'll probably see a black box appear on the screen and then disappear after a split second. What happened in this case is that the ipconfig program ran, generated its output, and then exited -- and when a Windows program exits, its window closes and leaves no trace behind, just like any other Windows program like Microsoft Word. In this case, however, that behavior isn't what you want, because "ipconfig" prints information to the screen before it exits, so when its window closes, that information disappears too. That's why you run "ipconfig" inside a command prompt, so that after ipconfig exits, the command prompt window is left open to display the output.

Bennett Haselton is a technology and political blogger. If you want to know how to access Facebook from school, he's your man.



Help others find this article at Del.icio.us, Digg, Netscape, Reddit, and Stumble Upon    

Subscribe!

Never miss another useful Q&A article again! Subscribe to AskDaveTaylor with Google Reader.

Comments

i can't able to run my pc to boot because i can't make the command prompt to appear, i doesn't work if i press f8. i want to switch my pc to a safe mode to reset my administrator password, i hope you can help me.

Posted by: cielo at October 28, 2009 4:59 AM

I bought a dandy little Asus eee netbook for road trips, and got the version with Linux on it, as I'd heard it was faster/easier/better. Now I'd like to start putting goodies on the Asus (ebookreader, maybe some apps) but my home computer is Windows XP Pro O/S and I'm leery of hooking up a Linux to a Windows. Is there going to be a problem? If so, any suggestions on how to download apps to the Asus? I don't have a wireless highspeed hookup (college town, too darn scary) although I suppose I could head to the local McDonald's (last I heard they had free Wifi,as opposed to Barnes and Noble whose 'free' system requires the user to have a purchased hookup). Thanks for whatever advice you can offer.

Posted by: Aryn at November 22, 2009 11:39 AM

I have something to say, now that you mention it, but ...
Starbucks coffee cup I do have a lot to say, and questions of my own for that matter, but first I'd like to say thank you for all your efforts on this Web site by buying you a cup of coffee!

I do have a comment, now that you mention it!











Remember personal info?


Please note that I will never send you any unsolicited email. Ever.

While I'm at it, please note that by submitting a question or comment you're agreeing to my terms of service, which are: you relinquish any subsequent rights of ownership to your material by submitting it on this site.








Ask Dave Taylor: The iPhone App: Advertisement



Follow me on Twitter @DaveTaylor

Search
Find just the answers you seek from among our 2300+ free tech support articles by using our Lijit search engine.


Help!





Subscribe to
Ask Dave Taylor!

Add to Google Reader
Add to My Yahoo!
Subscribe in NewsGator Online

RDF   XML

Free Updates!
Sign up and get free weekly updates and special offers on books, seminars, workshops and more.


Recent Entries
Book Links
© 2002 - 2010 by Dave Taylor. All Rights Reserved.

Note: This web site is for the purpose of disseminating information for educational purposes, free of charge, for the benefit of all visitors. We take great care to provide quality information. However, we do not guarantee, and accept no legal liability whatsoever arising from or connected to, the accuracy, reliability, currency or completeness of any material contained on this web site or on any linked site.

[whiteboard marker tray]
"Ask Dave Taylor®" is a registered trademark of Intuitive Systems, LLC.