These commands allow quick interaction with the command prompt and navigation through the file system:
dir : Lists files and folders in the current directory.dir C:\Users\Username to display the folder's contents.cd : Changes the current directory.cd C:\Windows to navigate to the Windows folder.cd .. navigates to the parent directory.cls : Clears the console screen.cls to clean up the screen.exit : Closes the command prompt.exit to quit the session.These commands help you manage files and directories (copy, move, delete, etc.):
copy : Copies files.copy file.txt C:\Destination copies "file.txt" to "C:\Destination".move : Moves files.move file.txt C:\Destination moves "file.txt".del : Deletes files.del file.txt deletes "file.txt" from the current directory.mkdir : Creates a new folder.mkdir new_folder creates a folder named "new_folder".rmdir : Deletes a folder (must be empty).rmdir empty_folder removes the folder "empty_folder".These commands allow monitoring and controlling processes running on the system:
tasklist : Lists active processes.tasklist to view active processes with their PID.taskkill : Terminates a process.taskkill /PID 1234 /F forcefully stops the process with PID 1234.These commands are useful for diagnosing and managing network connections:
ping : Tests the network connectivity to an address.ping www.google.com checks connectivity to Google's servers.ipconfig : Displays network and IP information.ipconfig /all shows detailed network configurations.netstat : Shows active network connections.netstat -a lists all connections and open ports.tracert : Traces the path to a network destination.tracert www.google.com shows the hops to Google.These commands provide system information and allow control over the system:
systeminfo : Displays detailed system information.systeminfo for OS details.wmic : Runs WMI commands for system management.wmic csproduct get name shows the computer model.shutdown : Shuts down or restarts the system.shutdown /r /t 0 restarts the PC immediately.These commands allow managing user accounts on the system:
net user : Manages users.net user Username /add adds a user named "Username".whoami : Displays the current user's name.whoami to find your user identity.These commands are helpful for troubleshooting or performing specific tasks:
sfc /scannow : Checks and repairs corrupted system files.chkdsk : Checks and corrects disk errors.chkdsk C: /f /r scans and repairs the C drive.diskpart : Manages disk partitions.diskpart followed by list disk to view available disks.powercfg : Manages power options.powercfg /hibernate on enables hibernation.You can combine commands with redirections:
command > file.txt : Saves the output to a file.dir > file_list.txt saves the list of files to "file_list.txt".command >> file.txt : Appends the output to an existing file.tasklist >> processes.txt appends active processes to "processes.txt".