PDF download Download Article
Learn to use the Command Prompt with this complete guide
PDF download Download Article

Have you forgotten a certain command that you need to use in the Command Prompt? You can quickly list most commands, allowing you to search the list and find the one you need. You can also get help with how a specific command works. This wikiHow article teaches you how to display a list of commands in the Command Prompt as well as explains some commonly used commands.

How to Check Commands in CMD

Open the Command Prompt program on your computer. Type in "Help" and press Enter to pull up a list of all the available commands. To learn how a specific command works, type the command followed by "/?" and press Enter.

Method 1
Method 1 of 2:

Display a List of Commands

PDF download Download Article
  1. To do so, click the WIndows Start menu and click type "CMD". Click Command Prompt.
    • For access to more functions, right-click the Command Prompt and click Run as Administrator.
  2. To do so, type help and press Enter. A list of all the available commands will be displayed with a short description of each command. The listed is sorted alphabetically.[1]
    Advertisement
  3. If you want more information about what you can do with a command, enter the command followed by /? and press Enter.
  4. To do so, type dir c:/windows/system32/*.exe and press Enter. This displays a list of system programs you can run from the command prompt.
    • To run a program from the command prompt, simply type the program name and press Enter.
  5. Advertisement
Method 2
Method 2 of 2:

Common Commands

PDF download Download Article
  1. Use the following commands to navigate to different folders in the Command Prompt:
    • cd—Change directory or folder. Type "cd" followed the path to a directory (i.e. cd c:\windows\system32) to change to a different directory.
    • cd/—Change to root directory. This takes you back to the beginning folder of whatever drive you are in.
    • Change drive—To change drives, simply type the drive letter (i.e. D:\) and press Enter.
    • dir—Display the contents of current directory you are in.
    • tree—Displays the folder structure of your system.
  2. Use the following commands to copy, create, move, or delete files and folders in the Command Prompt:
    • mkdir—Make directory or folder. To create a new directory in a folder, type mkdir followed by the directory name (i.e. mkdir wikihow and press Enter.
    • rmdir—Deletes a directory or folder. To delete a directory or folder, type rmdir followed by the directory name (i.e. rmdir wikihow.)
    • copy—Copies a file or folder. To copy a file or folder from one location to another type copy followed by the file you want to copy, followed by the location you want to copy it to (i.e. copy C:\Users\Public\Downloads\selfie.jpg C:\Users\Public\Pictures\selfie.jpg
    • move—Moves or cuts a file to another directory. To move a file to another directory, type move followed by the path and file name of the file you want to move, followed by the path and file name you want to move the file to (i.e. move C:\Users\Public\Downloads\selfie.jpg C:\Users\Public\Pictures\selfie.jpg.)
    • rename—Rename a file or folder If you want to rename a file or folder, type rename or ren followed the file you want to rename, followed by the file name you want to rename it to (i.e. rename C:\Users\Public\Pictures\selfie.jpg me.jpg.)
    • del—Deletes a file or folder. If you want to delete a file or folder, type del followed by the location and the file or folder you want to delete (i.e. del sample_text.txt.)
  3. Use the following commands to find information about your system in the Command Prompt:
    • systeminfo—Displays information about your computer, including your Windows version, hardware information BIOS information, and more.
    • winver—Displays which version of Windows you have.
    • getmac—Display your computer's MAC address.
  4. Use the following commands to complete tasks using the command prompt:
    • Start a program—To start a program, navigate to the folder that contains the program executable and then type file executable file name (i.e. cmd.exe) and press Enter.
    • tasklist—Displays a list of tasks and applications that are currently running along with their PID number.
    • taskkill—Kills a task. To forceful kill a task, type taskkill followed by the PID number, followed by /f (i.e. taskkill 13560 /f) and press Enter.
    • diskpart—Runs the disk partition program in the Command Prompt, which you can use to manage, format, and partition disk drives on your computer. Use this command to start Diskpart, and then press ? and press Enter to see all the Diskpart commands.
    • date—Displays and allows you to change the system date. It will first display the current date, and then ask you to enter a new date. Press Enter to skip changing the date.
    • time—Displays and allows you to change the system time. It will first display the current time and then ask you to enter a new time. Press Enter to skip changing the time.
    • color—Changes the color of the command prompt text. Type color followed by the number that corresponds to a color (i.e. color 4) and press Enter to change the color. Type color /? and press Enter to display the color options.
    • shutdown /s—Shuts down your computer.
  5. You can use the following commands to gather information about your network connection and troubleshoot problems with your network:
    • ipconfig:—Displays your IP address, subnet mask, and default gateway.
    • ping—Send test packets. This is useful for troubleshooting connection issues. Type ping followed by a website or IP address to send test packets {{i.e. ping google.com) and press Enter. Press Enter again to stop pinging.
    • tracert—Traces the path packets take to reach the host connection. This is useful for diagnosing where problems occur in a network connection.
    • netsh—Activates Netsh, which allows you to configure your network connection. After activating Netsh, type ? and press Enter to see all Netsh commands.
    • ipconfig /flushdns—Clear your DNS cache and renew your DNS connection.
  6. Use the following commands to troubleshoot problems with your computer:[2]
    • chkdsk—Checks your computer file system for errors. You can enter a drive letter or file name to scan a specific drive or file. To scan your entire filesystem and fix errors, type chkdsk /f and press Enter.
    • sfc /scannow—Runs System File Checker, which scans your Windows file system for errors and attempts to fix them.
  7. Advertisement

Community Q&A

Search
Add New Question
  • Question
    How do I open cmd on a Windows phone?
    Community Answer
    Community Answer
    Since a phone is not a pc, using cmd on it is not possible.
  • Question
    How do I minimize a window?
    MikePlaysGames
    MikePlaysGames
    Community Answer
    You have to click the button in between the - and the x. You can also click and drag the side of the window to make it smaller and drag at the corner of the window to make the height and width minimize or maximize at the same rate.
  • Question
    How do I use CMD for make a folder in C drive?
    Community Answer
    Community Answer
    Navigate to a directory you want to create a folder in (cd c:\{directory}), then create sub-directory (mkdir {nameOfDirectory}).
See more answers
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
Advertisement

Video

Tips

Submit a Tip
All tip submissions are carefully reviewed before being published
Name
Please provide your name and last initial
Thanks for submitting a tip for review!

You Might Also Like

Find the IP Address of Your PC Find Your IP Address on a PC: Windows & Linux
Find System Specs Check PC Specs on a Computer, Phone, or Tablet
Change a Computer Password Using Command Prompt Change a Windows Password Using Command Prompt
See Active Network Connections (Windows) See Active Network Connections (Windows)
Change Directories in Command Prompt Navigate to a Different Folder in the Command Prompt
Format a USB Using Cmd Format a USB Using CMD (Command Prompt)
Reboot from Command Prompt on WindowsReboot from Command Prompt on Windows
Use Windows Command Prompt to Run a Python FileUse Windows Command Prompt to Run a Python File
Run a Batch File from the Command Line on Windows Run a Windows Batch File from the Command Line (CMD)
Open a Folder in Cmd Open a Folder in Command Prompt (CMD)
Add Users from CMDAdd Users from CMD
Open Command Prompt with a Keyboard Shortcut (Windows 8, 8.1, and 10)3 Ways to Open Command Prompt with Keyboard on Windows
Open the Command Prompt in Windows5 Simple Ways to Open the Command Prompt in Windows
Watch Star Wars on Command Prompt Watch Star Wars via Telnet: Windows CMD & Mac Terminal
Advertisement

About This Article

Travis Boylls
Written by:
wikiHow Technology Writer
This article was co-authored by wikiHow staff writer, Travis Boylls. Travis Boylls is a Technology Writer and Editor for wikiHow. Travis has experience writing technology-related articles, providing software customer service, and in graphic design. He specializes in Windows, macOS, Android, iOS, and Linux platforms. He studied graphic design at Pikes Peak Community College. This article has been viewed 606,619 times.
How helpful is this?
Co-authors: 34
Updated: November 25, 2024
Views: 606,619
Categories: Command Prompt
Thanks to all authors for creating a page that has been read 606,619 times.

Is this article up to date?

Advertisement