Be a CMD Pro: Changing Prompt and Title of Command Prompt
Windows has a great, user-friendly Graphical User Interface, but if you are a CLI junky and just like to do things the old school way – using the old command-line interface, you might be happy to know some of the tweaks you can use to change and edit the look and feel of your Command Prompt window. Windows also has two different command-line utilities now, the Windows PowerShell and the Windows Command Prompt. Microsoft even introduced a new CLI called the Windows Terminal. It’s not an alternative for CMD or PowerShell, instead, it’s an app that comes with a new interface and allows you to use a bunch of different CLIs using the same interface.
We recently covered a guide on how you can change the color of your Command Prompt window. In this guide, we are going to cover how you can edit the Prompt as well as the Title of your Command Prompt window, making it easier to manage when you have a bunch of different CMD windows open on your screen.
Changing Prompt
First, you need to open the Command Prompt. You can do it by pressing the Start button and searching for cmd.
Type the following command,
PROMPT <format of prompt>
For example,
PROMPT abc
This will change the prompt to abc, as seen in the screenshot below,
To move back to the default prompt, just type,
PROMPT
You can also type the following command to get some information about the PROMPT command and how you can use it,
help PROMPT
Prompt can be made up of normal characters and the following special codes: $A & (Ampersand) $B | (pipe) $C ( (Left parenthesis) $D Current date $E Escape code (ASCII code 27) $F ) (Right parenthesis) $G > (greater-than sign) $H Backspace (erases previous character) $L < (less-than sign) $N Current drive $P Current drive and path $Q = (equal sign) $S (space) $T Current time $V Windows version number $_ Carriage return and linefeed $$ $ (dollar sign)
Change Title of Command Prompt Window
This one is very simple and is just a helpful little utility to allow you to manage your Command Prompt windows. You can simply type the following command,
TITLE <your title>
This will change the title of your CMD window, as shown in the screenshot above.