Example usage for prompt.
prompt $P$GSet the text and tokens displayed by the command prompt.
prompt [<text>]The linked Microsoft Learn article is the upstream authority. Availability may depend on Windows release, role, optional feature or interactive tool context.
Example usage for prompt.
prompt $P$G| Option / clause | Description |
|---|---|
<promptText> | Set prompt text; tokens such as $P (path) and $G (>) are expanded. |
No argument | Restore the default prompt format. |
<text> | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
/? | Display command help or the supported command-line usage. |
Character | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
$q | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
$$ | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
$t | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
$d | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
$p | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
$v | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
$n | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
$g | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
$l | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
$b | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
$_ | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
$e | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
$h | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
$a | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
$c | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
$f | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
$s | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
Review a command and its target before running it. Commands that alter files, services, accounts, disks, permissions or databases may be difficult to reverse. Test in a safe environment and keep backups.