-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcmd_windows_OS
More file actions
132 lines (97 loc) · 3.22 KB
/
cmd_windows_OS
File metadata and controls
132 lines (97 loc) · 3.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# Basic Windows CMD Commands
- wmic memorychip list full
- systeminfo
- wmic memorychip get banklabel, devicelocator, manufacturer, partnumber, speed, capacity
## 1. Navigation Commands
- `cd [directory]`
- Change the current directory to the specified directory.
- Example: `cd C:\Users`
- `cd ..`
- Move up one directory level.
- Example: From `C:\Users\Admin`, `cd ..` takes you to `C:\Users`.
- `dir`
- List all files and directories in the current directory.
- `tree`
- Display the directory structure of the current folder in a tree format.
## 2. File Management Commands
- `copy [source] [destination]`
- Copy files from one location to another.
- Example: `copy file.txt D:\Backup`
- `move [source] [destination]`
- Move files to a new location.
- Example: `move file.txt D:\Backup`
- `del [filename]`
- Delete a file.
- Example: `del file.txt`
- `rmdir [directory] /s /q`
- Remove a directory and all its contents.
- `/s`: Remove all subdirectories and files.
- `/q`: Suppress confirmation prompts.
- `ren [oldname] [newname]`
- Rename a file or directory.
- Example: `ren oldfile.txt newfile.txt`
## 3. System Information Commands
- `ipconfig`
- Display IP configuration details.
- Example: Shows your IP address, subnet mask, and gateway.
- `systeminfo`
- Display detailed system information, including OS version, memory, and hardware.
- `tasklist`
- Show a list of running processes.
- `taskkill /pid [PID] /f`
- Kill a process by its Process ID (PID).
- Example: `taskkill /pid 1234 /f`
## 4. Disk and Drive Management
- `chkdsk [drive:]`
- Check a drive for errors.
- Example: `chkdsk C:`
- `diskpart`
- Launch Disk Partition Manager.
- `format [drive:]`
- Format a drive.
- Example: `format D:`
- `vol [drive:]`
- Display the volume label and serial number.
- Example: `vol C:`
## 5. Network Commands
- `ping [hostname or IP]`
- Test network connectivity to a hostname or IP address.
- Example: `ping google.com`
- `netstat`
- Display active TCP connections and ports.
- `tracert [hostname or IP]`
- Trace the route packets take to a hostname or IP address.
- Example: `tracert google.com`
- `nslookup [domain]`
- Get DNS information for a domain.
- Example: `nslookup google.com`
## 6. Miscellaneous Commands
- `cls`
- Clear the Command Prompt screen.
- `echo [text]`
- Display a message or turn command echoing on/off.
- Example: `echo Hello, World!`
- `exit`
- Close the Command Prompt.
- `help`
- List available commands and their usage.
- `shutdown /s /t [seconds]`
- Shut down the computer after a delay.
- Example: `shutdown /s /t 60`
- `shutdown /r /t [seconds]`
- Restart the computer after a delay.
- Example: `shutdown /r /t 60`
## 7. Advanced Commands
- `fc [file1] [file2]`
- Compare two files and display their differences.
- Example: `fc file1.txt file2.txt`
- `findstr [string] [filename]`
- Search for a string in a file.
- Example: `findstr "error" logfile.txt`
- `set`
- View or set environment variables.
- `assoc`
- Display or change file association for a file extension.
---
### Note:
- Some commands may require **Administrator Privileges**. Right-click on the Command Prompt icon and choose **Run as Administrator**.