Monday, May 16, 2022

Command Prompt Commands: All cmd Commands Code in Windows

We use command prompt commands to make our life easy. With the help of the windows command prompt, you can execute text-based order on the Windows screen. Those cmd commands make your products faster. I will provide an extensive list of command prompt codes of Microsoft Windows.

What is Command Prompt?

Windows command prompt is the default command-line interpreter of Windows operating systems. The official name is Windows Command Processor. However, you may know it as a command shell or cmd prompt. Users use it to execute entered text-based commands. It emulates the black screen input field in a text-based user interface to make you faster and more productive. Cmd commands code allows you to perform all the functions as a graphical user interface.

Some Basic Command Prompt commands

Yod does not need to be an expert on computers. Just memorize the following commands. It will give you a greater dividend. Here are some common cmd of Win Command prompt.

1. Shutdown cmd

Shutdown cmdThe most exciting command prompt is shutdown. You can customize the shutdown in various ways. Cmd allows you to create a schedule shutdown command within a second. However, there are many necessities of shutdown/restart-related commands. Here I will show some examples of cmd. 

First of all, the recommended cmd is shutdown /? It will show all the shutdown-related commands of your computer. However, here are some cmd for you:

Shutdown: type shutdown /s

Schedule Shutdown: Type shutdown -s -t 3600

Restart: type shutdown /r

Logout: type shutdown /l

2. Check IP address from CMD ipconfig

Check IP address from CMD ipconfigIpconfig is a console application program to display all the current TCP/IP network configurations. It also refreshes the DHCP and DNS. If there is an assigned IP to your machine, then cmd ipconfig helps see the IPs. In the cmd prompt, if you command ipconfig, you will see the default gateway, subnet mask, and assigned IP. 

3. Windows 10 pro activator cmd

If your PC does not have any genuine Windows key, you may search for the original one. Here, the windows 10 activator cmd will help to activate your product id. To activate, you can follow the instruction:

Open command prompt as Administrator. Run the command: slmgr /ipk NPPR9-FWDCX-D2C8J-H872K-2YT43

If this code does not accept, you can take any of the following images: Windows 10 pro activator cmd

4. Get Windows Install Date

When you are a responsible business owner, you may need to calculate the Windows license renewal date. A simple command prompt will help you show the Windows installation date for your better calculation. Here the command is:

Type: Systeminfo

Get Windows Install DateThe screen will show time zone, total physical memory, virtual memory, network card, and Hyper-V Requirements.

5. Office Activator cmd

In-office 2010 and Office 13, you can activate your Microsoft office key. Here, again you have to open your cmd platform as administrator. If you use any 32 bit or 64 bit PP but a 32-bit office package, you have to command cd \Program Files\Microsoft Office\Office15. The 32bit Office on a 64bit Windows has to command cd \Program Files (x86)\Microsoft Office\Office15. When you press Enter, it will connect to the KMS server on cscript ospp.vbs /

6. Diskpart Windows 10

Diskpart Windows 10 Command Prompt CommandsYou can use the diskpart command for Partition, Remove partitions, Remove formatting, and many other issues. Here are all the cmd diskpart for your study:

Serial Cmd Diskpart Action
1. ACTIVE To mark the selected partition as active
2. ASSIGN  Assign a drive letter
3. ATTRIBUTES Manipulate volume
4. ATTACH virtual disk file attachment
5. AUTOMOUNT automatic mounting (To enable and disable)
6. BREAK To break a mirror set
7. CLEAN Clear all information
8. COMPACT reduce the physical size
9. CONVERT   Convert different disk formats.
10. CREATE  volume, partition and virtual disk creation
11. DELETE To erase any object
12. DETAIL Details Information
13. DETACH virtual disk file detachment
14. EXIT  Exit from DiskPart option

7. Net user administrator

A net user is a command-line tool for Windows users. It is applicable for Windows 7, 8, 10, 11, and vista. You can use the net user administrator command for viewing user account status. Moreover, you can add, delete and edit the users of Windows with this command. Here is the administrator syntax of the net user:

net user [<Enter_UserName> {<Provide_Password> | *} [<Options>]] [/domain]

net user [<Enter_UserName> {<Provide_Password> | *} /add [<Options>] [/domain]]

net user [<Enter_UserName> [/delete] [/domain]]

8. Clear Command Prompt

When you are a beginner, you may face many funny problems. Cleaning the command prompt screen is one of them. You can clock on the X icon and reopen the cmd admin screen again. The easy technique of cmd clear command will erase all of your practice. Type cls and press Enter. You will see all data is deleted. 

9. List disk cmd

In the Windows operating system, wmic is an excellent command to see Windows Management Instrumentation. This command will show all the available drives in the directory. Type wmic and press Enter. You will see the command like this: List disk cmd

10. Cmd find

You can find cmd to search both text and folder in Windows Command Prompt. It is a filter command to read from the input, transform and output through a file, screen, and printer. It searches for the string of the text inside any files. The command will display lines of text which have a specific string. 


find [/v] [/c] [/n] [/i] [/off[line]] <“string”> [[<driveOfFile>:][<pathOfFile>]<nameOfFile>[…]]

11. cmd chkdsk

You can check the file system and metadata to find your PC’s logical and physical errors. You can check it by both DEFRAG and CHKDSK. When you use an SSD, it is wise to use DEFRAG because SSD is different from HDD. So, you can run chkdsk after several months.

12. Copy file cmd

When you are aware of a copy unattended task while copying, you can use copy file cmd in the command prompt. The method is different from the traditional copying method. It allows you to save time. You have to decide simultaneously regarding the copying file and destination location. 

Method of copy:

  1. Go to the directory where the file is located. Suppose the file name is fossguru.doc. Now type the command copy c:\fossguru. doc d
  2. The file will copy and paste to the D directory.

cmd xcopy

You can use the xcopy command to transfer one file to another file. For example, type xcopy c:\fossguru. doc d Guru, then the contents of fossguru will be transferred to Guru in the D folder. If the file name is more than one word, use “ ” for the command. Here, the command will be xcopy c:\fossguru. doc “d Foss Guru”. 

13. Command-line windows 10

We use command line windows 10 to provide text-based user input in a graphical user interface-based operating system. You can perform the administrative activities with a command line. Moreover, the command line in the command prompt helps to instant troubleshoot Windows problems.

14. cmd hacking commands

Windows command line commands are used for many unique purposes. Therefore hacking is one of them. There are a lot of commands to connect to another IP. Ping, nslookup, tracert, arp are some common commands for that purpose.

15. Disk cleanup cmd

You have to be an expert in managing your drive. You can clean up your disk with a simple command. Type c:\windows\SYSTEM32\cleanmgr.exe /dDrive. Here, dDrive is the name of your desired drive.

16. Control panel command line

Control panel command lineSometimes you may face computer startup problems. In Windows safe mode, you can solve the problem. To solve it:

  1. Open the command prompt.
  2. Scan the problems by the sfc/scannow command.
  3. Hit Enter. You will find problems, if any.

Suppose the problem is related to bootrec, boot sector, or boot configuration in the Windows Recovery Environment. Execute the bootrec commands. It will scan the Windows drives before installation.

17. taskmanager cmd

taskmanager cmd Windows 10 Command Prompt CommandsWhen your computer is busy with so many programs, you can reduce the load using a task manager. You can easily open the task manager from the command prompt dialogue box. Type taskmgr on command prompt and press enter. Suddenly, you will see the task manager pop up on your PC.

18. TaskKill: Kill process from the command line (CMD)

Once you love the command prompt so much, you will search all the commands through cmd. You can close any of the applications with the command line. To close any operation type taskkill /IM executablename. For example, taskkill /IM videoEditor.exe. Suppose you need to force stop type taskkill /F /IM videoEditor.exe. In both cases, you will get the option to save your data.

19. Get The Tasklist

There is a lot of processes always running out of your eyesight. Sometimes you need to see the ongoing task of your computer. Moreover, there may be spy apps on your PC. To see all the running application type tasklist on your command prompt. When you thank to reduce the memory load of your PC, you have to see the memory used over a particular range. So, type tasklist /fi “memusage gt memorysize”. Replace the memorysize with your desired value. 

20. netsh wlan show interfaces

netsh wlan show interfacesThe netsh wlan show profile command shows all the networks you have connected with your Windows computer in your life. If you want to execute your command, you must return your base cmd platform/interface with the exit command. Now type netsh wlan show profile and press Enter. You will see the text like below:

21. Device manager command line

In your busy schedule, you may need to manage your device manager. A simple command devmgmt.msc will take you to the Windows device manager window. However, you can execute the same command from the run box.

22. check if Windows 32 or 64 bit

When you download any software from the internet, you will think your PC is Windows 32 or 64 bit? You can see it from Windows properties. But the problem is, it will show you a lot of information which is not required for you. So the following command will show you Windows 32 or 64 bit.

Type: wmic os get OSArchitecture

23. Reboot Windows computer from the command line (CMD)

With the help of a Windows built-in command prompt, you can reboot your PC. It is applied to all the versions, including the server edition. Now type shutdown /r and press enter. Moreover, you can set a scheduled time for a reboot. The command is shutdown /r /t timeout_in_seconds. However, you can cancel the command by shutdown /a.

24. Ping windows command prompt command

Ping is a calm cmd command to see your PC’s internet connection. It transmits data to your specified IP address from a network and shows the result of how long it took to send that data and get a response. However, the primary purpose of ping is to see that it can connect with other computers through the network.

Ping windows command prompt command

Image: Ping in command prompt commands windows 10

25. All other cmd codes at a glance for your better practice

In your day-to-day life, you may face difficulty exercising Command prompt commands. Here are the best 50 commands prompt lists to increase your efficiency. All other cmd codes at a glance for your better practice:

Serial Command Execution
General cmd commands list
1. cmd start command prompt
2. cmd cd command-line shell for changing the current working directory
3. Call execute a batch file from within another batch file.
4. color Specifies the color attribute of console output
5. date show/set date
6. echo To display the command prompt, type echo on. To stop type echo off
7. hostname TO show the hostname.
8. pause You can use pause at the end of the script. It will allow the user to read some output text.
9. Runas To “Run as different user” 
10. sort To sort the list of lines that have a specified text.
11. time To display/edit the system time.
12. Timeout To wait for the command processing for some time and then continue
13. title To changes the title for the graphical terminal emulator window
14. ver It shows the version of your OS.
15. w32tm You can configure Windows Time service settings. Moreover, it helps to diagnose computer time problems.
cmd network commands/ Network Related Commands
16. FTP File Transfer Protocol (FTP) allows you to transfer files to and from a computer running a FTP server service.
17. ftype This command lists all Registry keys in HKEY CLASSES ROOT.
18. getmac Most easy ways to get the mac address of your computer.
19. netstat It generates displays to show protocol statistics and network status.
20. nslookup This queries internet domain name servers in two modes like interactive and non-interactive mode.
21. pathping It locates spots that have network latency, tests the connection to a specific IP address, and network loss.
22.  route It allows manual entries into the network routing tables.
23. telnet It helps to establish a Telnet connection
24. tftp This command transfer files to a TFTP server
25. tracert display the consumed time for a packet of data to transmit between a local PC and a destination IP address or domain
Windows cmd list files
26. attrib To change a file`s read/write attribute or set the archive attribute. 
27. comp You can use it to make comparisons of multiple computer files. Moreover, it shows the differences between different files.
28. diskcomp It works only with floppy disks and not for hard disk
29. erase / del it will delete every file (*. *) from every folder (/s)
30. expand It takes a compressed Windows file like .zip and “expand” it to its original form.
31. fc  The FC (file compare) command compares two files.
32. rename It renames the file in cmd prompt.
33. Replace You can use it to replace files.
34. rmdir / rd remove empty directories in MS-DOS.
35. tree It displays directory paths and files in each subdirectory
36. type It displays the contents of a text file.
Media windows command prompt list
37. chkntfs This cmd displays or modifies automatic disk checking during starting your PC.
38. defrag defrag a drive in Windows 10.
39. driverquery Generate a list of Drivers
40. format It is used to format a specified partition. You can use it to format a hard drive (internal or external), or flash drive to a specified file system.
41. label You can use it to view and change the label of a PC’s drives.
42. mode sets the mode of operation for communications
42. vol It shows the volume label and volume serial number of a logical drive. An example can be a hard disk partition.
43. verify Verifies that data written to drive
44. mountvol It assigns or deletes drive mount points.
Miscellaneous useful cmd commands
45. for For loop
46. gpresult It displays group policies
47. gpupdate refreshes a computer’s local Group Policy and updates group policies.
48. perfmon To get to the Performance Monitor you can use this command.
49. reg To open Windows registry in the command prompt, add, view, export, and import registry entries.
50. Exit To exit from the current screen or from the command prompt.

Final Thought

If you are a graphical user interface user, you must use the Windows command prompt. It will save you time and make you more productive. I recommend that slow-speed computer users follow the dos commands list. It will increase their productivity.

I am also a freelance blogger and real worm of Apps. I love to experiments various apps and games on my android and iOS platform. So here I want to share my cumulative experience and findings regarding various types of apps and games. I am optimistic that this apps review will help the online reader to find the best apps and games for the particular OS.

Related Articles


Please enter your comment!
Please enter your name here

Latest Articles