Keeping The Command Prompt Open

One thing which is really annoying regarding launching a command prompt utility from the Windows Start > Run prompt is the command prompt window is immediately closed once the process is done. This means you can’t see any of the output produced which may include error messages. Of course you could save the output to a file, but then you have to go open the file which creates extra steps.

Instead, if you need to see the output, preface the command in the Start > Run prompt with “cmd /k”. For example, enter this in the Run prompt:

cmd /k ping google.com

You will see the ping command runs, but once it is done, the command prompt stays open so you can either review the output or run more commands.

Free eBook!

Like what you read?

If so, please join over 28,000 people who receive our exclusive weekly newsletter and computer tips, and get FREE COPIES of 5 eBooks we created, as our gift to you for subscribing. Just enter your name and email below:

Post A Comment Using Facebook

  • Carl Walters

    Another way to go is off the Start button i.e. Start – All Programs – Accessories – Command Prompt. This will allow you to input commands and see the response. This also keeps the window open until you type “exit”, then hit enter.

  • Al King

    A more common way is to type cmd at the run command, then enter the desired command. This will keep the command window open until you close it.
    But the /k switch is interesting, I didnt know about it.

What’s Your Preference?

Daily Alerts

Each day we send out a quick email to thousands of PCMECH readers to notify them of new posts. This email is just a short, plain email with titles and links to our latest posts. You can unsubscribe from this service at any time.

You can subscribe to it by leaving your email address in the following field and confirming your subscription when you get an email asking you to do so.

Enter your email address for
Daily Updates:

Weekly Newsletter

Running for over 6 years, the PCMECH weekly newsletter helps you keep tabs on the world of tech. Each issue includes news bits, an article, an exclusive rant as well as a download of the week. This newsletter is subscribed to by over 28,000 readers (many who also subscribe to the other option) - come join the community!

To subscribe to this weekly newsletter simply add your email address to the following field and then follow the confirmation prompts. You will be able to unsubscribe at any time.

Enter your email address for
Free Weekly Newsletter: