Windows provides many commands to accomplish various tasks. Here are some commonly used Windows Command Prompt (CMD) commands:
- 1. dir: List the files and subdirectories in the current directory.
- 2. cd: Change the current directory.
- 3. md: Create a new directory.
- 4. rd: Delete a directory.
- 5. del: delete a file.
- 6. copy: Copy a file.
- 7. xcopy: Copy a directory and its subdirectories and files.
- 8. move: Move a file or directory.
- 9. attrib: Change the attributes of a file or directory.
- 10. type: Display the content of a file.
- 11. ping: Test network connection.
- 12. ipconfig: Display network configuration information.
- 13. netstat: Display network connection status and statistical information.
- 14. tasklist: List the currently running processes.
- 15. taskkill: End a process.
- 16. shutdown: Shut down the computer.
- 17. systeminfo: Display the system information of the computer.
- 18. ver: Display the Windows version number.
- 19. help: Display help information.
- 20. exit: Exit CMD.
This is just a small part of commonly used CMD commands, we can get a complete command list by typing "help" in CMD. As shown in the picture:
The query looks like this:
ATTRIB | Display or change file properties. |
BREAK | Set or clear extended CTRL+C checks. |
BCDEDIT | Set properties in the startup database to control startup loading. |
CACLS | Display or modify the access control list (ACL) of a file. |
CALL | Call this one from another batch program. |
CD | Display the name of the current directory or change it. |
CHCP | Displays or sets the number of active code pages. |
CHDIR | Display the name of the current directory or change it. |
CHKDSK | Check disk and display status report. |
CHKNTFS | Display or modify boot time disk checks. |
CLS | Clear the screen. |
CMD | Open another Windows command interpreter window. |
COLOR | Set the default console foreground and background colors. |
COMP | Compare the contents of two or two sets of files. |
COMPACT | Display or change the compression of files on NTFS partitions. |
CONVERT | Convert FAT volumes to NTFS. You cannot convert the current drive. |
COPY | Copy at least one file to another location. |
DATE | Display or set the date. |
OF THE | Delete at least one file. |
DIR | Display the files and subdirectories in a directory. |
DISKPART | Display or configure disk partition properties. |
DOSKEY | Edit the command line, recall Windows commands and create macros. |
DRIVERQUERY | Displays the current device driver status and properties. |
ECHO | Display a message, or turn command echoing on or off. |
ENDLOCAL | End localization of environment changes in batch files. |
ERASE | Delete one or more files. |
EXIT | Exit the CMD.EXE program (command interpreter). |
FC | Compares two files or two sets of files and displays the differences between them. |
FIND | Searches for a text string in one or more files. |
FINDSTR | Search for a string in multiple files. |
FOR | Runs a specified command for each file in a set of files. |
FORMAT | Format the disk for use with Windows. |
FSUTIL | Display or configure file system properties. |
FTYPE | Displays or modifies the file types used in file extension associations. |
GOTO | Directs the Windows command interpreter to a labeled line in a batch program. |
GPRESULT | Displays group policy information for a computer or user. |
GRAFTABL | Causes Windows to display the extended character set in graphics mode. |
HELP | Provides help information for Windows commands. |
ICACLS | Display, modify, backup or restore ACLs of files and directories. |
IF | Perform conditional processing operations in a batch program. |
LABEL | Create, change, or delete a disk's volume label. |
MD | Create a directory. |
MKDIR | Create a directory. |
MKLINK | Create symbolic and hard links |
MODE | Configure system devices. |
MORE | Display output screen by screen. |
MOVE | Move one or more files from one directory to another. |
OPENFILES | Displays the files opened by the remote user for file sharing. |
PATH | Displays or sets the search path for executable files. |
PAUSE | Pauses batch file processing and displays a message. |
POPD | Restores the previous value of the current directory saved via PUSHD. |
Print a text file. | |
PROMPT | Change the Windows command prompt. |
PUSHD | Save the current directory, then make changes to it. |
RD | Delete the directory. |
RECOVER | Recovers readable information from damaged or defective disks. |
REM | Record comments (Comments) in batch files or CONFIG.SYS. |
REN | Rename the file. |
RENAME | Rename the file. |
REPLACE | Replace the file. |
RMDIR | Delete the directory. |
ROBOCOPY | Advanced utility for copying files and directory trees |
SET | 显示、设置或删除Windows环境变量。 |
SETLOCAL | 开始本地化批处理文件中的环境更改。 |
SC | 显示或配置服务(后台进程)。 |
SCHTASKS | 安排在一台计算机上运行命令和程序。 |
SHIFT | 调整批处理文件中可替换参数的位置。 |
SHUTDOWN | 允许通过本地或远程方式正确关闭计算机。 |
SORT | 对输入排序。 |
START | 启动单独的窗口以运行指定的程序或命令。 |
SUBST | 将路径与驱动器号关联。 |
SYSTEMINFO | 显示计算机的特定属性和配置。 |
TASKLIST | 显示包括服务在内的所有当前运行的任务。 |
TASKKILL | 中止或停止正在运行的进程或应用程序。 |
TIME | 显示或设置系统时间。 |
TITLE | 设置CMD.EXE会话的窗口标题。 |
TREE | 以图形方式显示驱动程序或路径的目录结构。 |
TYPE | 显示文本文件的内容。 |
VER | 显示Windows的版本。 |
VERIFY | 告诉Windows是否进行验证,以确保文件正确写入磁盘。 |
VOL | 显示磁盘卷标和序列号。 |
XCOPY | 复制文件和目录树。 |
WMIC | 在交互式命令shell中显示信息。 |