NewAI Content Creation is now live in Early Access
Turning Point Training Instituteby Training Center
Skip to content
0%
Course Toolkit — Printable ResourcesLesson 5 of 10
7 min readBeginner
Downloads & resources
Download this lesson's materials, ready to use.

Toolkit 5 of 10 · Diagnostic Commands Quick Reference · Adapted from Appendix C and §7.1–7.4 of Dr. Tahseen Al Doori's Troubleshooting Essentials, University Edition (2026). Notes marked Beyond the book are additions by the course, checked against the official sources listed.

How to use this sheet

Find the task you need in the left-hand column, then read across to the command for Windows, macOS or Linux. The second table tells you what to look for in the output. Run commands on a training machine or virtual machine while you are learning. Some commands need administrator rights; repair commands change the system and are marked with a warning.

Repair commands change your system. chkdsk /f, fsck, sfc /scannow and Disk Utility First Aid repair file systems or system files. Never run a disk repair on a drive that may be failing or that holds the only copy of important data: back up first, and if a drive may be failing, stop and escalate. Practise on a training machine or virtual machine.

Part 1 — Command reference

Adapted from Appendix C of the book.

TaskWindowsmacOSLinux
Show IP configurationipconfig /allifconfigip addr
Renew IP addressipconfig /release then ipconfig /renewSystem Settings > Network > Renew DHCPsudo dhclient -r; sudo dhclient
Flush DNS cacheipconfig /flushdnssudo dscacheutil -flushcacheresolvectl flush-caches
Test reachabilityping hostping hostping host
Trace routetracert hosttraceroute hosttraceroute host
DNS lookupnslookup namenslookup namenslookup name / dig name
Connections and portsnetstat -annetstat -anss -tuln
Running processestasklist / Task ManagerActivity Monitor / toptop / ps aux
System logsEvent ViewerConsolejournalctl
Check diskchkdsk /fDisk Utility > First Aidfsck (unmounted)
Repair system filessfc /scannow—Package manager reinstall

Part 2 — What to look for

Based on §7.3 of the book.

CommandPurposeWhat to look for
ipconfig /all, ip addr, ifconfigShow IP configurationA valid IP address, subnet mask, default gateway and DNS servers. An address beginning 169.254 means no DHCP response
pingTest reachabilityReplies with low, stable times. "Request timed out" means no response
tracert / tracerouteShow the path to a hostThe hop where replies stop or delays jump
nslookupTest name resolution (DNS)The correct IP address returned for a name
netstat -anShow connections and listening portsExpected services listening; unexpected connections
ipconfig /release, /renew, /flushdnsRefresh addressing and the DNS cacheA new valid address; stale names cleared

Part 3 — The five-step connectivity test

From §7.3 of the book. Run in order; the first command that fails shows where the fault lies.

code
ping 127.0.0.1            # 1. Is the TCP/IP stack working locally?
ipconfig                  # 2. Do I have a valid IP address and gateway?
ping <default gateway>    # 3. Can I reach my router?
ping 8.8.8.8              # 4. Can I reach the internet by IP address?
ping google.com           # 5. Does name resolution (DNS) work?

Part 4 — Monitoring and recovery tools

From §7.1, §7.2 and §7.4 of the book.

ToolPlatformUse
Task Manager (Ctrl+Shift+Esc)WindowsApplications, CPU, memory, disk and network use; startup programs
Resource MonitorWindowsDetailed per-process use of CPU, memory, disk and network
Activity MonitormacOSProcesses, CPU, memory, energy, disk and network use
top / htopLinux, macOSLive list of processes and resource use in the terminal
Device ManagerWindowsHardware devices and driver status; warning icons for faulty devices
Event ViewerWindowsWindows Logs: Application, System and Security
ConsolemacOSSystem logs
journalctl, /var/logLinuxSystem logs
Safe modeAllStart with minimal drivers and software, for isolation
System Restore / Time MachineWindows / macOSReturn the system to an earlier working state
Automated troubleshooters / Wireless DiagnosticsWindows / macOSCheck common settings automatically

Part 5 — Notes for current systems

Beyond the book (2026 note): netstat on Linux is legacy. The Linux manual page for netstat describes the program as "mostly obsolete" and names ss as its replacement (and ip route in place of netstat -r). This is why the book's table uses ss -tuln for Linux: -t shows TCP sockets, -u UDP sockets, -l only listening sockets and -n numeric ports instead of service names. On Windows and macOS, netstat -an remains the command shown in the book.

Beyond the book (2026 note): ip rather than ifconfig on Linux. The book already gives ip addr for Linux. ip address (which can be shortened to ip addr) shows the IPv4 and IPv6 addresses on every interface. The Linux ifconfig manual page itself points to ip link from the iproute2 package for full link-layer details such as hardware addresses. For macOS, the book gives ifconfig.

Beyond the book (2026 note): Linux DNS cache and DHCP renewal depend on the system's network services. resolvectl flush-caches clears the caches kept by the systemd-resolved service, so it applies only where that service is in use. Likewise, dhclient works only where that DHCP client is installed and managing the interface; if your distribution manages networking with a different service, renew the address with that service's own tool, as described in your distribution's documentation.

Beyond the book (2026 note): renewing a DHCP lease on current macOS. In current versions of macOS the path is: Apple menu > System Settings > Network > choose the network service > Details > TCP/IP > Renew DHCP Lease. The button is available only when the service is set to use DHCP.

Beyond the book (2026 note): chkdsk /f locks the drive. Microsoft's reference states that /f fixes errors only if the disk can be locked; if files are open, chkdsk offers to check the drive at the next restart, and you cannot open files on the drive until it finishes. Run without parameters, chkdsk reports the volume's status without fixing anything, which is the safer first look. Administrator rights are required.

Beyond the book (2026 note): run DISM before sfc /scannow. Microsoft's guidance for current versions of Windows is to run DISM.exe /Online /Cleanup-image /Restorehealth in an elevated Command Prompt before running sfc /scannow. Both commands need administrator rights and should be run only where policy allows.

Beyond the book (2026 note): a PowerShell alternative on Windows. ipconfig, ping, tracert and nslookup are all current on Windows. PowerShell also offers Test-NetConnection, which can run a ping test (Test-NetConnection <host>), a route trace (-TraceRoute) or a TCP port test (-Port <number>), useful when one application cannot connect on its port.

Sources