Useful Keyboard Shortcuts for the DOS Command Prompt
We look at some useful keyboard shortcuts and commands that will help you personalize the MS-DOS Command Prompt Window without using the mouse.
You will also learn about hotkeys for executing DOS commands more quickly. The keyboard shortcuts are known to work in Windows Vista and XP command prompt.
1. Change the color scheme of the DOS Window
color bf - where b is the background color while f is for the foreground color (they are hex codes).
For instance, if you want to have a white background with black text, type color F0 and press enter. To revert to the original color scheme, type color without any arguments.
For a list of all available colors, type color /? on the command line.
2. Chant the Title of the Window to reflect the current time
Do you know that you can put your name or your blog address in the title of the command prompt window. That’s like a neat watermark when you are using that screenshot for your website.
title your_name %time%
That %time% will append the current timestamp to the Window’s title.
3. Navigate the Command History using Keyboard
If you have a long list of commands in the history, press the function key F7 to navigate through the history list using the arrow keys.
And if you already know the command number, press F9 and directly type that number. Very useful if you have to run some command repeatedly.
4. Typing Long Commands at the DOS Prompt
You know the frustration when you type some long command only to realize that you made a typo or omitted typing some character. Either type the whole command again or a better option is the F1 key.
F1 prints characters of the previous command one by one.
Alternatively, you can press F2 to copy a certain number of characters from the previous command to the current one. Let me illustrate that with an example:
Instead of retyping the whole thing, I can say F2 and then say x. This will print all the characters upto “x”. Then you can press F3 to complete the command or type it manually.
Google Developer Expert, Google Cloud Champion
Amit Agarwal is a Google Developer Expert in Google Workspace and Google Apps Script. He holds an engineering degree in Computer Science (I.I.T.) and is the first professional blogger in India.