What is CMD Commands in Windows
When you refer to the tips on tips on the Internet will come up with some tips that require you to open CMD and enter a certain command. For those who are new to computers, they will not know what CMD is and how to use it. So in the following article of TipsMake.com will help you answer what is CMD? And the commands used in CMD, please follow along!
I. What is CMD?
CMD - Command Prompt is an application used to execute commands available in Windows. CMD in Windows provides a lot of commands, these commands are used to do the job of operating the system from a command prompt interface instead of operating directly on the Windows interface. It is a Windows MS-DOS emulation program with lots of commands available in MS-DOS, but it is not MS-DOS.
To launch CMD we have a lot of ways, but the most popular way is to use Windows + R to open the Run dialog box then type the cmd command and press Enter .
II. Common and useful Cmd commands
1. PING command
Uses : Use up Ping to check whether a computer has no network connection. The PING command sends packets from your computer to the destination computer, you can determine the connection status or determine whether the computer is connected or not.
Syntax : ping ip / host / [/ t] [/ a] [/ l] [/ n]
- Ip: IP address of the machine to be checked; host is the name of the computer to check the network connection (can use the IP address or the name of the computer).
- / t: used to keep the computer "ping" to the destination computer, press Ctrl + C to stop.
- / a: get the IP address from the computer name (host).
- / l: specify the width of the sending packet to check.
- / n: Specify the number of packets to send.
2. Tracert command
Usage : Command helps you see the path of packets from your computer to the destination computer, see which packets go through which servers or routers .
Syntax : tracert ip / host
- ip / host: IP address / computer name.
3. Netstat command
Uses : List outbound connections to your computer.
Syntax : Netstat [/ a] [/ e] [/ n]
- / a: Displays all connections and ports that are listening.
- / e: Ethernet statistical information.
- / n: Display the address and port numbers.
You can refer to other parameters by typing Netstat /?
4. Ipconfig command
Uses : Display the IP configuration of the computer you are using (host name, IP address, DNS .).
Syntax : ipconfig / all
5. Shutdown command
Uses : Turn off and restart the computer.
Syntax (Windows 7):
- Shutdown: Shutdown -s -t [a]
- Restart computer: Shutdown -r -t [a]
+ a: shutdown time (units seconds).
6. The DIR command
Uses : View files, folders.
Syntax : DIR [drive:] [path] [filename]
- Path: Path to file, folder.
- Filename: File name.
7. DEL command
Uses : Delete files.
Syntax : DEL [/ p] [/ f] [/ s] [/ q] [/ a [[:] attributes]] "file name to delete"
- / p: Display file information before deleting.
- / f: Delete files with read-only attribute.
- / s: Delete the file in all directories that contain it.
- / q: Delete without asking.
- / a [[:] attributes]: Delete by file attributes (R: Read-only files, S: System files, H: Hidden files).
Delete all files *. *
8. COPY order
Uses : Copy files from one folder to another in the computer.
Syntax : COPY "address to copy" "address of file copy" / y
- / y: Copy without asking.
9. RD command
Uses : The RD command helps you delete directories.
Syntax : RD / s / q "directory to delete"
- / s: Delete the entire directory.
- / q: Delete without asking.
10. MD command
Use : Create a new folder.
Syntax : MD "path to save the file to create" "directory name to create"
For example: md "C: tailieu" (create tailieu directory in drive C).
11. TASKKILL command
Uses : Turn off a running application.
Syntax : taskkill / f / im "application name" .exe.
For example taskkill / f / im Skype.exe (disable Skype application).
12. REG ADD command
Uses : Create, edit the Registry.
Syntax : REG ADD KeyName [/ v ValueName] [/ t Type] [/ s Separator] [/ d Data] [/ f]
- KeyName: Path to the Key.
- / v ValueName: The value name to create.
- / t Type: Data type.
- / d Data: Value value.
13. REG DELETE command
Uses : Delete the value in the Registry.
Syntax : REG DELETE KeyName [/ v ValueName] [/ f]
- [/ v ValueName]: The value name to delete.
14. REGEDIT.EXT command
Uses : Run the .reg file.
Syntax : Regedit.exe / s "where the .reg file is not"
- / s: No need to ask.
15. ATTRIB command
Uses : Set properties for files and folders.
Syntax : ATTRIB -a -s -h -r "file, directory" / s / d
or ATTRIB + a + s + h + r "files, directories" / s / d
- + sign: Add the attribute.
- Mark -: Remove the attribute.
- a: Archive (storage properties).
- s: System (system property).
- h: Hidden (hidden attribute).
- r: Read- only (attribute read only).
- / s: Perform with all files located in the directory and subfolders.
- / d: Set properties for directories and subfolders.
The above article TipsMake.com has answered for you what CMD is and the common commands used in CMD. Hope you will find the article useful, thanks for watching!
You should read it
- Summary of the common Run CMD commands
- How to Run Linux Commands on Windows with WSL 2
- Summary of DOS commands in MS-DOS
- Common Run commands for Windows you should know
- Extremely dangerous commands on Windows, Linux, Mac, don't try even once
- 10 Netsh commands of Windows Server 2008 should know
- All cmd and dos commands on Windows
- 5 Linux commands every sysadmin needs to know
- How to run Linux commands when starting Windows Subsystem for Linux on Windows 10
- Use commands and some tips for Mac OS X
- Complete list of Rundll32 commands in Windows 11
- Instructions for quickly opening Windows applications using the Run command
Maybe you are interested
How to use the file search command on Windows, find saved files
Why is tldr command better than man command in Linux?
Should I use PowerShell or Command Prompt?
What to do when open command window here does not appear?
How to switch users on the Linux command line
How to fix Mac Homebrew error 'zsh: command not found: brew'