Essential Windows Command Prompt Commands
The Windows Command Prompt is a powerful tool that allows users to perform a wide range of tasks using text-based commands. Whether you're troubleshooting, managing files, or configuring system settings, knowing some key commands can enhance your efficiency and productivity. Here is a list of useful commands for the Windows Command Prompt:
Basic Navigation Commands
cd
(Change Directory)- Usage:
cd [directory]
- Example:
cd C:\Users\YourUsername\Documents
- Changes the current directory to the specified path.
- Usage:
dir
(Directory)- Usage:
dir [directory]
- Example:
dir C:\Users\YourUsername\Documents
- Lists the contents of the specified directory.
- Usage:
mkdir
(Make Directory)- Usage:
mkdir [directory]
- Example:
mkdir C:\Users\YourUsername\NewFolder
- Creates a new directory.
- Usage:
rmdir
(Remove Directory)- Usage:
rmdir [directory]
- Example:
rmdir C:\Users\YourUsername\OldFolder
- Removes an empty directory.
- Usage:
File Management Commands
copy
- Usage:
copy [source] [destination]
- Example:
copy C:\Users\YourUsername\File.txt D:\Backup\File.txt
- Copies files from one location to another.
- Usage:
xcopy
- Usage:
xcopy [source] [destination] /s /e
- Example:
xcopy C:\Users\YourUsername\Documents D:\Backup\Documents /s /e
- Copies files and directories, including subdirectories.
- Usage:
move
- Usage:
move [source] [destination]
- Example:
move C:\Users\YourUsername\File.txt D:\Backup\File.txt
- Moves files from one location to another.
- Usage:
del
(Delete)- Usage:
del [file]
- Example:
del C:\Users\YourUsername\File.txt
- Deletes one or more files.
- Usage:
System Information and Configuration Commands
systeminfo
- Usage:
systeminfo
- Description: Displays detailed configuration information about the computer and its operating system.
- Usage:
ipconfig
- Usage:
ipconfig /all
- Description: Displays all current TCP/IP network configuration values and refreshes Dynamic Host Configuration Protocol (DHCP) and Domain Name System (DNS) settings.
- Usage:
ping
- Usage:
ping [hostname or IP address]
- Example:
ping google.com
- Description: Tests connectivity to a specified host.
- Usage:
tracert
- Usage:
tracert [hostname or IP address]
- Example:
tracert google.com
- Description: Traces the path taken to reach the specified host.
- Usage:
tasklist
- Usage:
tasklist
- Description: Displays a list of currently running processes.
- Usage:
taskkill
- Usage:
taskkill /IM [processname] /F
- Example:
taskkill /IM notepad.exe /F
- Description: Terminates a specified process.
- Usage:
Disk Management Commands
chkdsk
(Check Disk)- Usage:
chkdsk [drive:] /f /r
- Example:
chkdsk C: /f /r
- Description: Checks the file system and file system metadata of a volume for logical and physical errors.
- Usage:
diskpart
- Usage:
diskpart
- Description: Opens the Disk Partition utility, which allows you to manage disk partitions.
- Usage:
format
- Usage:
format [drive:] /FS:[filesystem]
- Example:
format D: /FS:NTFS
- Description: Formats a disk to the specified file system.
- Usage:
Network Commands
netstat
- Usage:
netstat -a
- Description: Displays active connections and listening ports.
- Usage:
netsh
- Usage:
netsh [command]
- Example:
netsh wlan show profiles
- Description: Configures network interfaces and settings.
- Usage:
route
- Usage:
route print
- Description: Displays the routing table.
- Usage:
Advanced Commands
powershell
- Usage:
powershell
- Description: Opens the PowerShell command-line interface.
- Usage:
schtasks
- Usage:
schtasks /create /tn "[taskname]" /tr "[taskrun]" /sc [schedule]
- Example:
schtasks /create /tn "MyTask" /tr "C:\Path\To\Script.bat" /sc daily /st 12:00
- Description: Schedules tasks to run at specified times.
- Usage:
shutdown
- Usage:
shutdown /s /f /t [seconds]
- Example:
shutdown /s /f /t 0
- Description: Shuts down the computer.
- Usage:
sfc
(System File Checker)- Usage:
sfc /scannow
- Description: Scans and repairs corrupted system files.
- Usage:
regedit
- Usage:
regedit
- Description: Opens the Windows Registry Editor.
- Usage:
Conclusion
The Windows Command Prompt offers a rich set of commands that can help you perform a wide range of tasks efficiently. Whether you are a novice user or an experienced IT professional, familiarizing yourself with these essential commands can enhance your ability to manage and troubleshoot your Windows environment effectively.
from:
https://intitute.blogspot.com/2018/10/104-useful-commands-for-windows-command.html
A list of some useful commands for windows command
- Add Hardware Wizard - hdwwiz.cpl
- Add/Remove Programs - appwiz.cpl
- Administrative Tools - control admintools
- Bluetooth Transfer Wizard - fsquirt
- Calculator - calc
- Certificate Manager - certmgr.msc
- Character Map - charmap
- Check Disk Utility - chkdsk
- Clipboard Viewer - clipbrd
- Command Prompt - cmd
- Component Services - dcomcnfg
- Computer Management - compmgmt.msc
- Control Panel - control
- Date and Time Properties - timedate.cpl
- DDE Shares - ddeshare
- Device Manager - devmgmt.msc
- Direct X Troubleshooter - dxdiag
- Disk Cleanup Utility - cleanmgr
- Disk Defragment - dfrg.msc
- Disk Management - diskmgmt.msc
- Disk Partition Manager - diskpart
- Display Properties - control desktop
- Display Properties - desk.cpl
- Dr. Watson System Troubleshooting Utility - drwtsn32
- Driver Verifier Utility - verifier
- Event Viewer - eventvwr.msc
- Files and Settings Transfer Tool - migwiz
- File Signature Verification Tool - sigverif
- Findfast - findfast.cpl
- Firefox - firefox
- Folders Properties - control folders
- Fonts - control fonts
- Fonts Folder - fonts
- Free Cell Card Game - freecell
- Game Controllers - joy.cpl
- Group Policy Editor (for xp professional) - gpedit.msc
- Hearts Card Game - mshearts
- Help and Support - helpctr
- HyperTerminal - hypertrm
- Iexpress Wizard - iexpress
- Indexing Service - ciadv.msc
- Internet Connection Wizard - icwconn1
- Internet Explorer - iexplore
- Internet Properties - inetcpl.cpl
- Keyboard Properties - control keyboard
- Local Security Settings - secpol.msc
- Local Users and Groups - lusrmgr.msc
- Logs You Out Of Windows - logoff
- Malicious Software Removal Tool - mrt
- Microsoft Chat - winchat
- Microsoft Movie Maker - moviemk
- Microsoft Paint - mspaint
- Microsoft Syncronization Tool - mobsync
- Minesweeper Game - winmine
- Mouse Properties - control mouse
- Mouse Properties - main.cpl
- Netmeeting - conf
- Network Connections - control netconnections
- Network Connections - ncpa.cpl
- Network Setup Wizard - netsetup.cpl
- Notepad - notepad
- Object Packager - packager
- ODBC Data Source Administrator - odbccp32.cpl
- On Screen Keyboard - osk
- Outlook Express - msimn
- Paint - pbrush
- Password Properties - password.cpl
- Performance Monitor - perfmon.msc
- Performance Monitor - perfmon
- Phone and Modem Options - telephon.cpl
- Phone Dialer - dialer
- Pinball Game - pinball
- Power Configuration - powercfg.cpl
- Printers and Faxes - control printers
- Printers Folder - printers
- Regional Settings - intl.cpl
- Registry Editor - regedit
- Registry Editor - regedit32
- Remote Access Phonebook - rasphone
- Remote Desktop - mstsc
- Removable Storage - ntmsmgr.msc
- Removable Storage Operator Requests - ntmsoprq.msc
- Resultant Set of Policy (for xp professional) - rsop.msc
- Scanners and Cameras - sticpl.cpl
- Scheduled Tasks - control schedtasks
- Security Center - wscui.cpl
- Services - services.msc
- Shared Folders - fsmgmt.msc
- Shuts Down Windows - shutdown
- Sounds and Audio - mmsys.cpl
- Spider Solitare Card Game - spider
- SQL Client Configuration - cliconfg
- System Configuration Editor - sysedit
- System Configuration Utility - msconfig
- System Information - msinfo32
- System Properties - sysdm.cpl
- Task Manager - taskmgr
- TCP Tester - tcptest
- Telnet Client - telnet
- User Account Management - nusrmgr.cpl
- Utility Manager - utilman
- Windows Address Book - wab
- Windows Address Book Import Utility - wabmig
- Windows Explorer - explorer