How to get the terminal window to stay open?
September 15, 2006 10:07 PM   Subscribe

How do I get the terminal window to stay open after I run a command line executed program?

I ran a program and wanted to see the results but the program runs and then the window disappears in all of about 2 seconds.
posted by anticlock to Computers & Internet (7 answers total)
 
Best answer: If this is windows, just run the program cmd.exe from where ever you are running your program you need the output from and then run your program from the command box.
posted by ibfrog at 10:11 PM on September 15, 2006


In the run box, use slash-k to connect the commands:

for example;
cmd /k ipconfig

One of my favorite windows tricks.
posted by chrisamiller at 10:31 PM on September 15, 2006 [2 favorites]


If this is a .bat batch file you're running, you can add the word "pause" on the last line.
posted by alexei at 1:25 AM on September 16, 2006


All these answers are OK.

Also, for general purpose use you can open a DOS window by typing cmd in the run box. This window will be stable.

Change to the directory you want the program to run in.
Execute your program. When you've finished either type 'exit' or just close the Dos window in the usual way [click top right].

In WIN98 it was easier because there was a shortcut [with an Icon] for MsDos. You can still create a shortcut in WinXP I think ...?
posted by metaswell at 5:23 AM on September 16, 2006


here's a link to windows "power toys" one of which adds the right click item for a cmd prompt.
posted by alkupe at 7:42 AM on September 16, 2006


If you want to be a little lazier, install Microsoft Power Toys. This will install the Open Command Prompt Here in Explorer.

Then you can browse to the location of your executable, have a cmd prompt open in that specific directory, and run your command rather than having to type out the path.
posted by zerokey at 7:46 AM on September 16, 2006


argh...should have previewed.
posted by zerokey at 7:47 AM on September 16, 2006


« Older Electric Boogaloo   |   Searching for new computer Newer »
This thread is closed to new comments.