Wednesday, April 10, 2024

Fixing a computer using the Command Prompt

The Command Prompt (CMD) involves various commands and syntaxes depending on the issue you're encountering. Here's a list of common CMD commands with examples that can help in troubleshooting and fixing computer problems:

 


1.      ipconfig: Displays the IP configuration for all network adapters. Example: ipconfig /all

2.      ping: Tests connectivity to another network device by sending ICMP echo requests. Example: ping google.com

3.      tracert: Traces the route taken by packets across an IP network. Example: tracert google.com

4.      netstat: Displays network connections, routing tables, interface statistics, masquerade connections, and multicast memberships. Example: netstat -a

5.      sfc /scannow: Scans and repairs system files. Example: sfc /scannow

6.      chkdsk: Checks and repairs the file system on a disk. Example: chkdsk C:

7.      diskpart: Disk management tool for managing disks, partitions, and volumes. Example: diskpart (to open diskpart)

8.      bcdedit: Manages boot configuration data. Example: bcdedit /enum

9.      netsh: Network shell command-line utility for various network-related operations. Example: netsh wlan show profiles

10.  shutdown: Shuts down or restarts a computer. Example: shutdown /r /t 0

11.  tasklist: Lists all currently running processes. Example: tasklist

12.  taskkill: Terminates a running process. Example: taskkill /IM notepad.exe

13.  regedit: Registry Editor for viewing and modifying the Windows registry. Example: regedit

14.  attrib: Displays or changes file attributes. Example: attrib -r -s -h myfile.txt

15.  sc: Service Control - communicates with the Service Control Manager and services. Example: sc query

16.  systeminfo: Displays detailed configuration information about a computer and its operating system. Example: systeminfo

17.  robocopy: Robust file copy utility. Example: robocopy sourcedir destdir /MIR

18.  powercfg: Controls power settings and configurations. Example: powercfg /batteryreport

19.  icacls: Displays or modifies discretionary access control lists (DACLs) on specified files. Example: icacls filename /grant Users:(CI)(OI)F

20.  net user: Manages user accounts. Example: net user username password /add

 

These are just a few examples of commands that can be used to fix various issues on a computer through CMD. However, be cautious when using these commands, especially those that modify system settings, as incorrect usage can lead to system instability or data loss. Always ensure you understand the command and its potential consequences before executing it.