give me cmd for windows
- User
give me cmd for windows
Assistant
Here's a comprehensive list of essential Windows Command Prompt (CMD) commands with explanations:
File/Directory Operations
-
Navigate directories
cd [folder]- Change directory (e.g.,cd Documents)
cd ..- Move up one level
cd \- Go to root directory
d:- Switch to drive D: (replace with your drive letter) -
List files
dir- List contents of current directory
dir /a- Show hidden/system files
tree- Display folder structure as a tree -
Create/Delete
mkdir [folder]- Create new folder (e.g.,mkdir NewFolder)
rmdir [folder]- Delete folder (must be empty)
del [file]- Delete a file (e.g.,del oldfile.txt)
del /s *.tmp- Delete all.tmpfiles recursively -
Copy/Move
copy [source] [destination]- Copy files (e.g.,copy file.txt C:\Backup)
xcopy [source] [dest] /s- Copy folders and subfolders
move [source] [destination]- Move files/folders -
File Info
type [file.txt]- Display file contents
attrib- View file attributes (e.g., hidden/read-only)
System Information
-
System Details
systeminfo- Show OS, hardware, and hotfix details
hostname- Display computer name
ver- Show Windows version -
Network
ipconfig- Show IP address, gateway, DNS
ipconfig /release+ipconfig /renew- Release/Renew IP
ping [host]- Test connectivity (e.g.,ping google.com)
tracert [host]- Trace network path
netstat -ano- List active connections and ports
getmac- Show MAC address(es)
Administrative Tools
-
Processes & Services
tasklist- List running processes
taskkill /im [name.exe]- Kill process by name (e.g.,taskkill /im chrome.exe)
taskkill /pid [ID] /f- Force-kill process by ID
sc query- List Windows services
sc stop [service]- Stop a service (admin required) -
Disk Management
chkdsk- Check disk for errors
diskpart- Advanced partition tool (launches interactive prompt)
format [drive:]- Format a drive (use cautiously!) -
User Management
whoami- Show current user
net user- List user accounts
net user [username] *- Change user password
Utilities & Troubleshooting
-
Network Diagnostics
nslookup [domain]- Query DNS records
netsh wlan show profiles- View saved Wi-Fi networks
netsh wlan show profile [name] key=clear- Reveal Wi-Fi password (admin required) -
System Maintenance
sfc /scannow- Scan and repair system files (admin required)
dism /online /cleanup-image /restorehealth- Repair Windows image (admin)
shutdown /s /t 0- Shut down immediately
shutdown /r /t 0- Restart immediately
logoff- Sign out current user -
Environment
set- List environment variables
echo %PATH%- Display the system PATH
Productivity Shortcuts
cls- Clear the screen↑/↓ keys- Cycle through command history[command] > output.txt- Save output to file (e.g.,ipconfig > network.txt)[command1] | [command2]- Pipe output (e.g.,dir | sort)start .- Open current folder in File Explorer
Important Notes
- Run as Administrator: Right-click CMD > "Run as administrator" for commands requiring elevated privileges (e.g.,
sfc,dism, service control). - Wildcards: Use
*(e.g.,del *.log) to target multiple files. - Help: Append
/?to any command for syntax help (e.g.,ping /?).
💡 Pro Tip: Press
Tabto auto-complete file/folder names!Let me know if you need help with a specific task! 🚀
-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.