Basic Commands in CMD in Window
Here are some basic commands you can use in Command Prompt (CMD) on Windows:
### **File and Directory Management:**
- **`dir`**: Lists the files and directories in the current directory.
```cmd
dir
```
- **`cd [directory]`**: Changes the current directory.
```cmd
cd C:\Users\YourUsername\Documents
```
- **`cd ..`**: Moves up one directory level.
```cmd
cd ..
```
- **`mkdir [directory]`**: Creates a new directory.
```cmd
mkdir NewFolder
```
- **`rmdir [directory]`**: Deletes a directory (must be empty).
```cmd
rmdir OldFolder
```
- **`del [file]`**: Deletes a file.
```cmd
del example.txt
```
- **`copy [source] [destination]`**: Copies a file to a new location.
```cmd
copy file.txt D:\Backup\
```
- **`move [source] [destination]`**: Moves a file to a new location.
```cmd
move file.txt D:\Backup\
```
### **System Information and Management:**
- **`ipconfig`**: Displays IP configuration information.
```cmd
ipconfig
```
- **`ping [hostname]`**: Checks the network connection to a server.
```cmd
ping google.com
```
- **`systeminfo`**: Displays detailed system information.
```cmd
systeminfo
```
- **`tasklist`**: Lists all running processes.
```cmd
tasklist
```
- **`taskkill /PID [process_id]`**: Terminates a process by its ID.
```cmd
taskkill /PID 1234
```
### **Disk Management:**
- **`diskpart`**: Opens the Disk Partition utility.
```cmd
diskpart
```
- **`chkdsk`**: Checks a disk for errors.
```cmd
chkdsk C:
```
- **`format [drive:]`**: Formats a disk drive.
```cmd
format D:
```
### **Network Commands:**
- **`netstat`**: Displays network connections and listening ports.
```cmd
netstat
```
- **`tracert [hostname]`**: Traces the route to a network host.
```cmd
tracert google.com
```
### **Miscellaneous:**
- **`cls`**: Clears the Command Prompt screen.
```cmd
cls
```
- **`exit`**: Closes the Command Prompt window.
```cmd
exit
```
These commands provide basic functionalities for navigating directories, managing files, and obtaining system and network information.