Here are answers to some common questions about Command Prompt.

Hiển thị tất cả

What is Command Prompt?

Command Prompt is a feature of Windows that provides an entry point for typing MS‑DOS (Microsoft Disk Operating System) commands and other computer commands. The most important thing to know is that by typing commands, you can perform tasks on your computer without using the Windows graphical interface. Command Prompt is typically only used by advanced users.

When you're using Command Prompt, the term command prompt also refers to the right angle bracket (>, also known as the greater than character) that indicates the command line interface can accept commands. Other important information, such as the current working directory (or location) where the command will be run, can be included as part of the command prompt. For example, if you open the Command Prompt window and see the C:\> command prompt with a blinking cursor to the right of the right angle bracket character (>), you know that the command you enter will be run on the entire C drive of your computer.

How do I get to a command prompt?

Open the Command Prompt window by clicking the Start button Picture of the Start button, clicking All Programs, clicking Accessories, and then clicking Command Prompt.

What commands can I run using Command Prompt?

You can run MS‑DOS commands and other computer commands.

To view a list of common commands, at the command prompt type help, and then press ENTER.

To view more information about each of these commands, type helpcommand name, where command name is the name of the command you want more information about.

How do I change the Command Prompt window?

You can change the appearance of the Command Prompt window by setting Command Prompt options.

To set Command Prompt options

  1. Open the Command Prompt window by clicking the Start button Picture of the Start button, clicking All Programs, clicking Accessories, and then clicking Command Prompt.

  2. Right-click the title bar and do one of the following:

    • To change the settings for all Command Prompt windows, click Defaults.

    • To change the settings for the current Command Prompt window, click Properties.

  3. Select the options you want, and click OK when you are done.

How do I run a command with elevated privileges?

Some commands that you can run using Command Prompt might require elevated or administrative privileges. To run these commands, you can use the Run as administrator command:

  1. Click the Start button Picture of the Start button.
  2. In the Search box, type command prompt.

  3. In the list of results, right-click Command Prompt, and then click Run as administrator. Administrator permission required If you are prompted for an administrator password or confirmation, type the password or provide confirmation.

Can I drag files or shortcuts into the Command Prompt window?

Dragging a file or shortcut to the Command Prompt window is not supported in this version of Windows. However, if you want to quickly enter the path to a file or shortcut in the Command Prompt window, you can use the Copy as Path command.

To use the Copy as Path command

  1. Open the Command Prompt window by clicking the Start button Picture of the Start button, clicking All Programs, clicking Accessories, and then clicking Command Prompt.

  2. In a separate window, navigate to the shortcut or file whose path you want to copy.

  3. Hold down the SHIFT key and right-click the shortcut or file, and then click Copy as Path.

  4. Switch to the Command Prompt window, right-click where you want to enter the path, and then click Paste.