Basic File and Directory Management
- dir: Lists files and directories in the current folder5.
- cd / chdir: Changes the current directory5.
- cd..: Moves up one level in the directory structure8.
- mkdir / md: Creates a new directory5.
- rmdir / rd: Deletes an empty directory; use
/s
for recursive deletion5. - copy: Copies files from one location to another5.
- xcopy: Advanced copy command that supports copying directories and subdirectories2.
- move: Moves or renames files5.
- del / erase: Deletes one or more files permanently5.
- ren / rename: Renames files or folders5.
- attrib: Displays or changes file attributes (Readonly, Hidden, System, etc.)2.
- fc: Compares the contents of two files for differences5.
- tree: Displays the directory structure in a tree view2.
System Management Commands
- systeminfo: Displays detailed information about the system, including OS, RAM, disk, and updates5.
- tasklist: Lists all active processes5.
- taskkill: Terminates a process by name or PID (use
/F
to force) 5. - shutdown: Shuts down or restarts the computer5.
- sfc / scannow: Scans and repairs system files5.
- chkdsk: Checks and repairs disk errors5.
- diskpart: Manages disk partitions, volumes, and formatting5.
- format: Formats a disk to a specified filesystem5.
- bcdedit / bcdbuild: Manages Boot Configuration Data1.
Networking and Connectivity Commands
- ipconfig: Displays IP configuration of adapters, subnet, and gateway5.
- ping: Tests connectivity to another device or website5.
- tracert: Traces the path packets take to reach a destination5.
- netstat: Displays active network connections and ports5.
- nslookup: Retrieves DNS information for a domain5.
- net / net user: Manages network resources and user accounts, including adding or deleting users7.
- getmac: Retrieves the MAC address of network adapters7.
- pathping: Combines ping and tracert to provide network diagnostics7.
Scripting and Automation Commands
- echo: Displays messages or enables/disables command echoing2.
- pause: Pauses a batch file until a key is pressed5.
- call: Calls another batch script without stopping the parent script1.
- for / forfiles: Loops over files or sets of commands1.
- set / setlocal / setx: Displays or modifies environment variables5.
- cls: Clears the Command Prompt window5.
- exit: Exits CMD5.
- help [command]: Displays detailed usage information for a specific command5.
Disk and File Utilities
- compact: Displays or modifies compression on NTFS files5.
- cipher: Encrypts or decrypts files and directories5.
- diskperf: Enables/disables disk performance counters1.
- defrag: Consolidates fragmented files on a disk1.
- cleanmgr: Cleans temporary files, Recycle Bin, and more1.
Advanced and Administrative Commands
- netsh: Configures network interfaces, firewalls, and Wi-Fi profiles5.
- powercfg: Manages power settings and battery reports7.
- wmic: Provides Windows Management Instrumentation queries, such as checking startup items5.
- reg / regedit / regsvr32: Access, modify, or register Windows Registry entries or DLLs7.
- sc / schtasks: Manages Windows services and scheduled tasks5.
- diskshadow: Manages Windows Volume Shadow Copies8.
Tips for Effective CMD Use
- Use
[command] /?
to get detailed help for any command8. - Run CMD as Administrator for system-level tasks like disk checks or user management5.
- Combine commands in batch scripts to automate repetitive tasks7.
- Use tab completion and arrow keys to navigate command history efficiently5.
No comments:
Post a Comment