Download ArticleDownload Article

The windows command prompt (located at C:\Windows\System32\cmd.exe) is a useful tool to perform various administrative tasks. The prompt is a string of characters (special and non special) that are displayed whenever the command prompt is waiting for input. Making the prompt less boring or more useful can make a lot of difference when working with the command prompt. It can be changed dynamically using the 'prompt' command, or permanently by creating a %prompt% user variable.

Method 1
Method 1 of 2:

Changing the prompt dynamically

Download Article
  1. How.com.vn English: Step 1 Press windows + r.
  2. How.com.vn English: Step 2 Type 'cmd' in the field and hit enter
    Advertisement
  3. How.com.vn English: Step 3 Type 'prompt', followed by the desired prompt string.
  4. 4
    The new prompt is displayed at the new line.
  5. Advertisement

Note that this only changes the prompt of the current command prompt session, which is reset the next time you run the command prompt.

How.com.vn English: Create a Custom Windows Command Prompt Step 4
Method 2
Method 2 of 2:

Changing the prompt permanently

Download Article
  1. How.com.vn English: Step 1 Right-click My Computer > Properties.
  2. How.com.vn English: Step 2 Click on Advanced system settings.
  3. How.com.vn English: Step 3 Click on Environment Variables
  4. How.com.vn English: Step 4 Click New (under user variables).
  5. How.com.vn English: Step 5 Type 'prompt' in the variable name field.
  6. How.com.vn English: Step 6 Type the desired prompt string in the variable value field.
  7. How.com.vn English: Step 7 Click OK on each opened dialog.
  8. Advertisement


Community Q&A

Search
Add New Question
  • Question
    How do I make a website you can't get off of?
    How.com.vn English: Community Answer
    Community Answer
    You can't do that. Simple as that. Why would you want to do that, anyway? It doesn't make sense.
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
      Advertisement

      Tips

      There are special character sequences that can be used in the prompt string to display different variables. The 'prompt /?' command displays a list of these special characters. Environmental variables can also be used in the prompt string, using the standard format % variablename%.

      The default prompt is "$P$G" which simply means "Display the current drive and path ($P), followed by a ">" ($G). For example C:\Windows>. Following is the list of possible special characters.


      $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)

      If Command Extensions are enabled the PROMPT command supportsthe following additional formatting characters:

      $+ zero or more plus sign (+) characters depending upon the depth of the PUSHD directory stack, one character for each level pushed.

      $M Displays the remote name associated with the current drive letter or the empty string if current drive is not a network drive.

      Submit a Tip
      All tip submissions are carefully reviewed before being published
      Thanks for submitting a tip for review!
      Advertisement

      Warnings

      • Avoid typing random gibberish in the command prompt. The Command Prompt is a powerful tool which can make permanent irreversible changes to your computer. It's quite possible to delete all the data on your computer!
      Advertisement

      About This Article

      Tested by:
      How.com.vn Technology Team
      How.com.vn is a “wiki,” similar to Wikipedia, which means that many of our articles are co-written by multiple authors. To create this article, 22 people, some anonymous, worked to edit and improve it over time. This article has been viewed 186,813 times.
      How helpful is this?
      Co-authors: 22
      Updated: August 6, 2020
      Views: 186,813
      Categories: Command Prompt
      Thanks to all authors for creating a page that has been read 186,813 times.

      Is this article up to date?

      ⚠️ Disclaimer:

      Content from Wiki How English language website. Text is available under the Creative Commons Attribution-Share Alike License; additional terms may apply.
      Wiki How does not encourage the violation of any laws, and cannot be responsible for any violations of such laws, should you link to this domain, or use, reproduce, or republish the information contained herein.

      Notices:
      • - A few of these subjects are frequently censored by educational, governmental, corporate, parental and other filtering schemes.
      • - Some articles may contain names, images, artworks or descriptions of events that some cultures restrict access to
      • - Please note: Wiki How does not give you opinion about the law, or advice about medical. If you need specific advice (for example, medical, legal, financial or risk management), please seek a professional who is licensed or knowledgeable in that area.
      • - Readers should not judge the importance of topics based on their coverage on Wiki How, nor think a topic is important just because it is the subject of a Wiki article.

      Advertisement