I'm working on Windows 7 using the cmd console. How do I hide the path in the prompt?
You can use
prompt /? to list all of the available parameters. For example, the following command sets "> (greater-than sign)" as prompt.
prompt $g will indeed set the prompt to a single
> sign. For a full list of special codes you can use there, see
If you want the custom prompt to apply automatically when you start a command prompt, you can set the
PROMPT environment variable. That can be accomplished in the normal Windows UI, or by using the
setx command. For example, this sets the prompt to
setx PROMPT $g$s
On the next launch of the command prompt, you'll see your new prompt.
To restore the normal Windows prompt for one session, type
prompt. To restore the default for all sessions by removing the environment variable, type
setx PROMPT "".