Using the Command Line

Introduction

The command line is an essential tool for systematic PC troubleshooting. It is a text-based interface that allows direct communication with Windows OS to diagnose and repair PC issues. Unlike the Task Manager that provides graphical elements to visualize problems, the CLI uses commands that follow a structured syntax consisting of the command name followed by optional parameters and arguments the system interprets as instructions that modify its behavior.

At the most fundamental level, a Layer 1 technician's use of the command line is rooted in the need to validate whether a physical pathway can actually carry usable traffic. The concepts at play begin with link state, the confirmation that a network interface card (NIC) is detecting signal on the wire, since a lit port LED alone is not sufficient proof. From there, the technician must verify addressing, whether through DHCP lease assignment or manual static configuration, because the presence or absence of an IP reveals if Layer 2 frames are making it to a DHCP server or peer device. Once an address is in place, packet flow can be tested with simple tools like ping, which confirms not only transmission and reception but also the integrity of the path across the immediate cable and switch segment.

Equally important are local validation mechanisms such as loopback testing, which isolates the NIC and TCP/IP stack from external dependencies, and resolution and table states, including ARP and routing entries, which can either confirm or obscure whether a physical link is working as intended. The overarching concept is fault domain isolation: separating the potential points of failure into clear categories -NIC config vs. port, port vs. cable, local stack vs. remote device. The command line is not being used here to solve higher-level routing or application problems but to establish, in an unambiguous and methodical way, whether the wire, the port, and the interface are capable of basic communication. The commands help prove whether the port, cable, and interface are physically passing signal.

General PC Troubleshooting

When your computer has problems, built-in command tools can quickly fix common issues. Slow PC performance can be resolved by checking memory usage and scanning for disk errors. Printer connection problems often fix themselves by restarting the print service and testing network communication. No sound? Windows includes automated troubleshooters that detect and repair audio issues. Keyboard, mouse, or display problems typically resolve by restarting specific services and updating drivers. These simple diagnostic steps solve most everyday computer issues without expensive service calls.

  1. Utility Commands

    List Directories
    dir
    Display DIR Pathways
    tree
    Change Directories
    cd..
    Display Help Info
    help
    Close Command Prompt
    exit
    Display HTML File Contents
    type (filename.html)
    Check Print Spooler
    net stop spooler -> net start spooler
  2. Slow Running PC

    Check Running Processes
    tasklist
    End Processes
    taskkill /programname.exe /f
    Check Disk Usage
    dir C:\
    Scan for Disk Errors
    chkdsk C: /f
    Check System Files
    sfc /scannow
  3. Printer Connectivity Issues

    View Printer Details
    devmgmt.msc (Right-click Printers > Properties > Details > Physical Device Object Name)
    Check Firewall Settings
    firewall.cpl (Allow File/Printer Sharing)
    Test Printer Connection
    ping [printer-ip-address]
    telnet [new-printer-IP] 9100
    Check Printer IP Config
    arp -a (Look for MAC Address)
    Add Printer IP Address
    control printers (Add Printer -> TCP/IP address)
    Check Print Spooler
    net stop spooler -> net start spooler
    Clear Print Queue
    net stop spooler del %systemroot%\System32\spool\printers\*.*
  4. Audio Issues (No Sound)

    Run Audio T/S
    msdt.exe -id AudioPlaybackDiagnostic
    Restart Audio Services
    net stop audiosrv -> net start audiosrv
    Update Audio Drivers
    devmgmt.msc
  5. Keyboard & Mouse Issues

    Restart HID Services
    net stop hidserv -> net start hidserv
    Update Device Drivers
    devmgmt.msc
  6. Display/Resolution Issues

    Check Display Settings
    desk.cpl (Select 'Detect')
    Update Graphics Driver
    devmgmt.msc (Select 'Display Adapters')
    Run DX Diagnostic Tool
    dxdiag (Select 'Display')
Advanced PC Troubleshooting

Critical system failures require advanced diagnostic tools beyond basic troubleshooting. Commands like bootrec /rebuildbcd, bcdedit /enum, and safe mode through msconfig can repair damaged boot configurations and startup problems. Windows Update failures often need cache clearing via service stops and automated troubleshooters. System restore using rstrui.exe provides rollback options for severe corruption, while hardware diagnostics through chkdsk /f /r and SMART status checks identify failing components before complete system failure. Event Viewer and advanced system tools like eventvwr.msc and systeminfo reveal configuration conflicts and hardware issues that prevent normal operation.Retry

  1. System Tools

    Display Logged-In User
    whoami or hostname
    User Credentials
    cmdkey /list
    Windows Version Info
    winver
    Windows Update Check
    wuauclt /detectnow
    Verify Software Auth
    sigverif.exe
    Display PC Config
    systeminfo
    Launch System Info
    msinfo32
    Launch System Config
    msconfig
    Launch System Restore
    rstrui.exe
    Launch Device Manager
    devmgmt.msc
    Launch Disk Manager
    diskmgmt.msc
    Launch Services Console
    services.msc
    Launch Event Viewer
    eventvwr.msc
    Launch Performance Monitor
    perfmon.msc
    Launch Resource Monitor
    resmon.exe
    Display Run Processes
    tasklist
    End Processes
    taskkill /programname.exe /f
  2. Booting Issues

    Try Safe Mode Boot
    msconfig (Select 'Safe Boot' under Boot options)
    Check Hard Drive
    chkdsk C: /f /r
    System Restore
    rstrui.exe
    Use Startup Repair
    bootrec /scanos
    bootrec /rebuildbcd
    Check Boot Config
    bcdedit /enum
    Repair Boot Files
    sfc /scannow /offbootdir=C:\ /offwindir=C:\Windows
    Check Print Spooler
    net stop spooler -> net start spooler
    Clear Print Queue
    net stop spooler del %systemroot%\System32\spool\printers\*.*
  3. Windows Update Failures

    Clear Update Cache
    net stop wuauserv
    rd /s /q C:\Windows\SoftwareDistribution
    net start wuauserv
    Run Windows Update T/S
    msdt.exe -id WindowsUpdateDiagnostic
  4. System Restore & Recovery

    System Restore Status
    vssadmin list shadows
    Enable System Protection
    sysdm.cpl (Configure to Turn On)
    Run System Restore
    rstrui.exe
  5. Hardware Concerns

    Check Disk Health
    chkdsk C: /f /r
    Run System File Check
    sfc /scannow
    Check Disk Space
    dir C:\ (Ensure 15% free space)
    Run System File Check
    sfc /scannow
    Check SMART Status
    wmic diskdrive get status
    Check Logs for Errors
    eventvwr.msc
  6. Software and APP Issues

    Clear Browser Cache and Data (Chrome)
    rd /s /q "%LOCALAPPDATA%\Google\Chrome\User Data\Default\Cache"
    rd /s /q "%LOCALAPPDATA%\Google\Chrome\User Data\Default\Code Cache"
    Clear Browser Cache and Data (Explorer)
    rundll32.exe InetCpl.cpl,ClearMyTracksByProcess 255
    Reset Browser Settings (Chrome)
    chrome.exe --reset-variation-state
    Check Browser Extensions (Chrome)
    chrome.exe --disable-extensions
    Check Defaulat Browser Settings
    appwiz.cpl
    Reset Internet Options
    inetcpl.cpl
    Check for Malware
    msrt.exe -> sfc /scannow
    Delete Temporary Files
    cleanmgr.exe -> del /q/f/s %TEMP%\*
Network Troubleshooting

Network connectivity problems require systematic testing from basic hardware up through application layers. Start by verifying network adapter capabilities with wmic nic commands and checking connection speeds through ncpa.cpl, then test basic connectivity using ping and tracert to identify where communication breaks down. DNS issues often cause slow browsing despite good connectivity - use nslookup to test DNS performance and ipconfig /flushdns to clear corrupted entries, or switch to alternative DNS servers like 8.8.8.8 for testing. Wi-Fi problems require signal strength analysis through netsh wlan show interface and profile management, while complete network resets using netsh winsock reset and IP configuration renewal can resolve stubborn adapter issues. Layer-by-layer troubleshooting prevents wasted time on complex solutions when simple connectivity or DNS problems are the root cause.

  1. NIC Capability

    Ascertain NIC
    wmic nic where (NetEnabled=true) get Name,Speed
    Configure NIC
    devmgmt.msc Expand Network Adapters > Right-click your network adapter > select Properties > Enter Advanced tab > Speed & Duplex > Auto Negotiation or Auto > OK, reboot
  2. Testing Internet Connectivity (Slow Speed)

    Ethernet Speed
    ncpa.cpl Right-click Network Adapter > Status > Details
    Display Cached IPs
    arp -a
    Trace Network Route
    tracert (Address)
    Validate IP (Test Speed)
    ping google.com
    ping (assigned IP)
    Check DNS Performance
    nslookup (hostname)
    Flush and Reset DNS
    ipconfig /flushdns
    netsh int ip reset
    Check Network Usage
    resmon.exe
    Check Network Adapters
    devmgmt.msc
    Test Diff DNS Server
    netsh interface ip set dns "Wi-Fi" static 8.8.8.8
  3. Testing Internet Connectivity (Poor Connection)

    Check Signal Strength
    netsh wlan show interface
    Display Wi-Fi Adapters
    netsh wlan show drivers
    Display Wi-Fi Standards
    netsh wlan show wirelesscapabilities
    Display Network Profiles
    netsh wlan show profiles
    Display Network Details
    netsh wlan show profile "NetworkName"
    Reset Network Adapter
    netsh winsock reset
    netsh int ip reset
    ipconfig /release
    ipconfig /renew
    ipconfig /flushdns (Restart PC)
    Reset Network Settings
    netsh winsock reset catalog
    netsh int ipv4 reset reset.log
    netsh int ipv6 reset reset.log

When troubleshooting, adhere to these best practices:

  1. Test basic connectivity first: verify physical connections before software diagnostics.
  2. Test Ethernet cable, and ensure power cables and ports are investigated prior to testing
  3. Always run Command Prompt as 'Administrator'
  4. Close all unnecessary applicationsbefore running system scans or repairs.
  5. Verify user permissions.
  6. Create backups before making changes
  7. Check Windows Update status before troubleshooting.
  8. System restore points should be created regularly during normal operation
  9. Run hardware diagnostics before assuming software issues.
  10. Restart the computer between major troubleshooting steps
  11. Document all commands used for future reference
  12. Document error messages exactly as they appear
  13. Check Event Viewer logs for error patterns and system warnings.
  14. Provide client education on preventive maintenance and basic troubleshooting.
  15. Verify all changes work after final restart.