A to Z Windows Commands Everyone Should Know

Deyan Georgiev
Deyan Georgiev

Updated · Jan 27, 2023


Techjury is supported by its audience. When you purchase through links on our site, we may earn an affiliate commission. Learn more.

If there were awards for looks, Command Prompt wouldn’t get any.

After all, plain white text and a blinking cursor set against a black background is nothing special.

If there were awards for speed, however, Command Prompt would win a bagful. Even the intuitive, efficient graphical user interface of Windows 10 is no match for it when it comes to speed.

As a command line interpreter, Command Prompt allows you to directly communicate with your computer using Windows cmd commands.

You can use these text-based commands for various tasks, including automating tasks using script and batch files, performing many advanced functions, and troubleshooting issues.

Sometimes using the Command Prompt is a much quicker way of interacting with the computer than the graphical user interface. On other occasions, it is the only way to access certain information or take advantage of certain features.  

This tool provides you with access to more than 280 command prompt commands. Still, as an average user, you probably don’t need to know that many.

In fact, you’re not likely to ever need more than the handful of text-based commands listed below. 

The command prompt is an unforgiving application. It doesn’t take kindly to mistakes. Nor does it offer any means to undo an action. Once you’ve run a command, there’s no way to call it back. So use Command Prompt sensibly and carefully. 

Common Cmd Commands, Their Syntax, and Purpose

Attrib (syntax: attrib) – You can use the attrib command to display or change the read-only, archive, system, and hidden attributes of any computer file or directory. You can run this command in Command Prompt in all the versions of Windows.

Background Intelligent Transfer Service (syntax: bitsadmin) – The bitsadmin command allows you to create and monitor downloads and uploads. By default, it gives you access to information related to your jobs in the command window. However, if you want to access information about a job created by another user, you’ll have to run the command in Command Prompt with administrative privileges.

Change Directory (syntax: chdir) – You can use the chdir command to display the current directory and to switch directories. For example, if you type chdir and press Enter, you’ll see the current directory. If you want to go to the highest level, type chdir\ and press the Enter key. This command is one of the most basic cmd commands and available in all Windows versions.

A to Z Windows Commands chdir command

Check Disk (syntax: chkdsk) – This is an inbuilt utility in Windows that helps you scan your hard disk for errors and fix them. Depending on the size and health of your hard disk, the chkdsk command can take anything from a few minutes to an hour or even more to run. You can do the same by using a tool like System Mechanic. 

Cmd (syntax: cmd) – You can use the cmd command to launch Command Prompt from the run dialog box.

Color (syntax: color) – This is one of the coolest cmd tricks you’ll come across. It allows you to change the background and text color of Command Prompt window. To see the color options available, run color/ in Command Prompt.

A to Z Windows Commands color command

Delete (syntax: del) – You can use this command to delete files. Mind, when you delete files using the del command, you erase them completely. So use this powerful command carefully.

Directory (syntax: dir) – The dir command is one of the most recognized command line commands and lists all the files and subdirectories in a particular directory. It also shows other useful information, including the total number of files listed in the directory, the total amount of free space, and the drive’s serial number.

Erase (syntax: erase) – This command is the same as the del command. You can use it to permanently remove any file.

Exit (syntax: exit) –Want to end the current Command Prompt session? Simply type exit and press the Enter key.

Find (syntax: find) – This is one of the more popular Windows command line commands. It allows you to search for a specific character sequence in one or multiple files.

Group Policy Results (syntax: gpresult) – With the help of this command, you can view the group policies that apply to your computer.

Help (syntax: help) – If you want to learn about a command’s syntax and usage, you should use the help command.

Internet Protocol Configuration (syntax: ipconfig) – This is one of the most helpful cmd commands for getting network information. It shows the default gateway, subnet mask, and IP address for all network adapters. To run the command, simply type ipconfig and then press the Enter key. You’ll see something like this in Command Prompt.

A to Z Windows Commands ipconfig command

Ksetup (syntax: ksetup) – The ksetup command allows you to connect to a Kerberos server.

Logoff (syntax: logoff) – Run this command to terminate a user session from Command Prompt. You can also use the logoff command to end sessions on the remote computers.

Make Directory (syntax: mkdir) – As the name suggests, the mkdir command allows you to create one or more new directories in the current directory. In the screenshot below, I’m using it to create a new directory called “computer.”

A to Z Windows Commands mkdir command

Message (syntax: msg) –The msg command is one of the most interesting Command Prompt tricks. You can use it to talk with other users on the network through Command Prompt, like it was done with old computers that didn’t have a graphical user interface.  

Net (syntax: net) – With this command, you can manage different aspects of your network. Its settings include network users, network shares, and network print jobs, among others.

Openfiles (syntax: openfiles) – You can display or disconnect files and directories opened on a computer using the openfiles command.

Ping (syntax: ping) – A popular cmd command, ping is used for finding and troubleshooting networking problems.

Print (syntax: print) – Did you know that you can print a text file from Command Prompt in Windows 10? All you have to do is use the print command, which is also available in other Windows versions. However, you can use this command to only print those files that you can reach from a command line.

Qprocess (syntax: qprocess) – This command gives you information about all running processes.

Rename (syntax: rename) – You can change the name of a file, folder, or directory through Command Prompt using the rename command. However, to complete the command you must have “write” or “modify” permissions to the file, folder, or directory that you are renaming.

System File Checker (syntax: sfc) - If you suspect issues with important Windows files, you can run the sfc command to check and replace them. 

Shutdown (syntax: scandisk) – There are two cmd prompt commands that you can use to log off from your computer. The logoff command is the first, and the shutdown command the second. However, you can do a lot more with the latter, such as shut down, restart, and hibernate not only your computer but also any other computer to which you’ve access over a network.

Start (syntax: start) – Wondering how to open a new cmd window from an existing one? Just type start in Command Prompt and press the Enter key. A new command window will open in a flash.

Systeminfo (syntax: systeminfo) – If you want to know more about your computer configuration, such as its BIOS details, hard drive, processor, operating system, and other specifications, simply run the systeminfo command. You need a Command Prompt with administrative privileges to execute this command.

Taskkill (syntax: taskkill) – You can end one or more processes from the command line using the taskkill command.

Umount (syntax: umount) – You can use the umount command to remove network file system drives.

Ver (syntax: ver) – The ver command is one of the simpler Windows commands and allows you to check the current Windows version number. When I ran the ver command, the following information came up:

A to Z Windows Commands ver command

W32tm (syntax: w32tm) – You can diagnose problems with Windows time using the w32tm command.

Xcopy (syntax: xcopy) – Want to copy files located in one directory to another through Command Prompt? Just execute the xcopy command. It is available in all Windows versions.

Wrapping Up

Much has changed in Windows 10, but Command Prompt remains the same. It’s still a powerful tool and can give you access to several features you can’t find in the otherwise intuitive graphical user interface of Windows 10. This command line interpreter allows you to communicate directly with your system, of course, using the wealth of Windows Cmd Commands available. In this post, I listed many commands that will hopefully prove useful to the average Windows user. Thanks for reading! 


What are CMD Commands?

These are text-based commands that you can run in Command Prompt to talk to your machine on a basic level and execute various actions. Common commands like dir, cd, xcopy, del, and others allow you to complete basic tasks through Command Prompt. There are also many advanced commands that help you identify and troubleshoot problems. For instance, you can run the system file checker command to verify and replace protected Windows files.

How do I use CMD?

Command prompt is a powerful tool. You can do much with it, from executing programs to changing settings, accessing files and a lot more. That’s why knowing how to use it can be immensely helpful. Before you can run any command, you need to first open Command Prompt. There are many ways to access it, the easiest being through the Start menu. You can access Command Prompt as a regular user or as an administrator. Much of the time, opening it as a normal user will suffice.  However, certain Windows Cmd Commands do require administrative privileges. To execute such commands, you’ll have to run an elevated Command Prompt, i.e. a Command Prompt with administrative privileges.  Opening Command Prompt Using the Start Menu in Windows 10, 8, & 7 Here are the steps to follow:
  1. Click the Windows icon in the taskbar
  2. Type cmd in the Start Search box (the one with the magnifying glass icon)
  3. Click Command Prompt in the results
Opening Command Prompt as an Administrator Using the Start Menu Here are the steps to follow:
  1. Click the Windows icon in the taskbar
  2. Type cmd in the Start Search box
  3. Right-click Command Prompt in the results and click Run as administrator
  4. A window will open asking you to confirm your action. Click the Yes button
Tips on How to Use Command Prompt To use it, simply type the command you want to run and press the Enter key. Before you run a command, make sure both the spelling and syntax are correct. This is critical because Command Prompt may not give you a chance to correct an error.  And a mistake here can ruin your system. No pressure, though. If you misspell a command or use the wrong syntax, at best the Windows command line may do nothing. Worse, it may execute a different command or run the typed command differently, both of which can be disastrous.  For instance, running the dir command allows you to see all the files and folders located at a specific place on the computer.  In case you spell it as der, nothing will happen because that’s not a legitimate command. However, if you misspell it as del, all hell may break loose. Then you’ll execute the del command, which is used for deleting files, instead of the benign dir command! Correct syntax is no less important when using Windows Command Prompt. A case in point is the del command, where a single extra space in the command line can produce an altogether different result. For example, let’s say you want to delete the photos folder, whose path is c:\files\photos. The correct syntax to delete this folder using Command Prompt is del c:\files\photos But if you leave a space before the last letter and type del c:\files\ photos in the command Window, the system will remove all the files present in the root folder, i.e. files, not the files located in the subfolder photos To make the matter worse, the files deleted through the del command are lost forever.  This is not to scare you from using Command Prompt, but rather to drive home the importance of using the application mindfully.  You should use it only when you’re sure about what you’re doing and even then make sure you first double check the command’s spelling and syntax before running it. 

How do you Ping from CMD?

When you execute the ping command, your computer sends several packets of information to another device or a website and notes the time it takes to get a response. You can use the ping command to check whether:
  • Your computer is able to connect with another device on your local network
  • Your computer is able to connect with another device or a website on the internet
  • Your connection is slow
  • You are experiencing packet loss
The ping command helps identify and troubleshoot networking problems and is one of the most popular Windows Cmd Commands. You can use the ping command with any IP address or URL. Here’s how you can run it:
  1. Click the Windows icon in the taskbar
  2. Type cmd in the Start Search box
  3. Click Command Prompt in the results
  4. In Command Prompt, type ping, followed by the IP address of the device or the URL of the website
In the following example, I used the ping command with hostingtribunal.com and received a normal response. At the bottom of Command Prompt, you’ll see a summary of the result. The first line shows the number of packets sent, received, and lost. The second line shows the minimum, maximum, and average times it has taken for the packets to make the round-trip.

How do I get a CMD prompt in Windows 10?

You can access Command Prompt in more ways than one. Here are 4 simple and quick ways to open this application. Method 1 – Using the Start Menu Follow these steps to open Command Prompt through the Start Menu.
  1. Click the Start button in the task bar
  2. Type cmd in the empty box
  3. Click Command Prompt on the top
Method 2 – Using the Run dialog box This is another shortcut to run Command Prompt commands in a jiffy.
  1. Click the Search button
  2. Type run in the search box and press the Enter key
  3. Type cmd and click the OK button
Method 3 – Using the Search Button You can also open Command Prompt through the Search button.  
  1. Click the Search button (the magnifying glass) in your taskbar
  2. Type cmd in the start search box
  3. Click Command Prompt in the results
Method 4 – Using the Quick Access Menu Want to open Command Prompt in just 2 simple steps? Here’s what you need to do.
  1. Press Windows + X hotkeys
  2. Select Command Prompt in the list that appears on your screen

How can I know my IP address using CMD?

Every computer connected to the internet has an IP address—that means your computer as well. Your computer’s IP (Internet Protocol) address is its unique identity in the network. All the websites also have an IP address, even though we know them by their domain names.   Just like you need a mailing address to receive mail from your friends, your computer requires an IP address to communicate with other devices. Without it, your computer will be a lonely guy, with no means to talk to others. You can run the ipconfig command, one of the most popular Windows Cmd Commands, to find out your computer’s IP address. IP4 (Internet Protocol Version 4) is the most common type of IP address. It consists of 4 numbers of 1-3 digits, with each separated from others by a dot. Each number in IP4 can range from 0 to 225. Here’s an example of what an IP4 address looks like: IP4 allows for more than 4 billion IP addresses. This looks enough but actually isn’t. Thanks to the explosive growth of computers and mobile devices, we’ll eventually run out of IP4 addresses. To prevent this from happening, the Internet Society released another version of Internet Protocol, called IP6, in June 2012. Your computer may have both an IPv4 and an IPv6 address or it may only have an IPv4 address. You will see IPv6 address along with IPV4 in the cmd prompt window if both are enabled. If only IPv4 is enabled, you’ll see just that.  An IPv6 address consists of 8 groups of 4 hexadecimal digits, separated from each other by a colon. Here’s an example: 2001:85a3:0bd8:0000:0000:3a4e:0190:5433 You can find out your IP address through Command Prompt by following these steps:
  1. Click the Start button in the task bar
  2. Type cmd in the empty box
  3. Click Command Prompt on the top
  4. In Command Prompt window type ipconfig /all and press the Enter key
Check under Ethernet Adapter or Wireless LAN adapter to find out your IP addresses.

How can I check my Internet speed using CMD?

You can use the basic ping command to test your internet speed. Before you can use the ping program, which comes pre-installed on Windows, you’ll have to open Command Prompt. Here are the steps to access Command Prompt and run this command.  
  1. Click the Start button in the task bar
  2. Type cmd in the empty box
  3. Click Command Prompt on the top
  4. In Command Prompt window type ping google.com
You’ll see results similar to the ones displayed below. Mind, the ping command may take a few seconds to finish. When you see your username with a blinking cursor in the cmd prompt window, it means the command is complete. Understanding the Results Two sets of data that are important for evaluating internet speed are “ping statistics” and “approximate round trip times” Ping Statistics
  • Sent – This shows the number of packets sent to the recipient, which in this case is google.com.
  • Received – This shows the number of packets sent back by the recipient. Ideally, this number should be the same as the above.
  • Loss – This shows the number of packets that the recipient received, but didn’t return. Ideally, the entry here should read zero.
Approximate Round Trip Times The ping command is one of the most useful Command Prompt commands because it gives you a good idea about the speed of your connection without installing any additional software.  
  • Minimum – This tells you the shortest time it took for a packet to complete the round trip, i.e. from your computer to the recipient and back.
  • Maximum - This tells you the maximum time it took for a packet to complete the round trip.
  • Average - This tells you the average time it took for a packet to complete the round trip. You want all of these to be as low as possible.
If you see an extremely long average round-trip time in the Windows Command Prompt, you can safely infer that there’s some issue with the internet connection. A high percentage of packets lost also indicates the same thing.


Deyan Georgiev

Deyan Georgiev

Deyan has been fascinated by technology his whole life. From the first Tetris game all the way to Falcon Heavy. Working for TechJury is like a dream come true, combining both his passions – writing and technology. In his free time (which is pretty scarce, thanks to his three kids), Deyan enjoys traveling and exploring new places. Always with a few chargers and a couple of gadgets in the backpack. He makes mean dizzying Island Paradise cocktails too.

Leave your comment

Your email address will not be published.