skip to Main Content
info@gooribi.com Customer Login
24/7/365 Technical Support: 1-480-624-2500
For Sales: 1-571-310-4647 | M-F 10AM to 5PM

OS Command Line Tools

OS Command Line Tools

diskpart – Disk Partitioner

  • Replaces the Pre-Windows-XP FDISK command

format – Format a disk


  • Prepare a disk for use by the operating system

chkdsk – Check Disk

  • chkdsk /f – Fixes logical errors on the disk
  • chkdsk /r – Locates bad sectors, recovers information

md, cd, rd

  • md – Make directory
  • cd – Change directory
  • rd – Remove directory

dir – Directory listing

  • List files and directories

del – Delete

  • Remove a file from a directory or disk
  • del names

copy – Duplicate files

  • copy /v – Verifies that new files are written correctly
  • copy /y – Suppresses overwrite prompts

xcopy – Extended copy


  • Copies multiple files and directory trees
  • xcopy source [destination]

robocopy – Robust copy

  • Functionally replaces xcopy
  • Designed to handle NTFS file system details

tasklist – Task List

  • Displays a list of currently running processes
  • Local or remote device

taskkill – Task Kill

  • Terminate tasks by process id (PID) or image name

sfc – System File Checker

  • sfc /scannow – Run the check
  • Scan integrity of all protected system files

shutdown

  • Shutdown a computer

expand Remove files from a Windows cabinet file

  • -d – Display files in a cabinet
  • > expand -d <cabinetname>
  • -f:filename – Extract a file
  • > extract <cabinetname> -f:filename <dest>

gpupdate Force a Group Policy update

  • gpupdate /target:{computer|user} /force

gpresult Verify policy settings for a computer or user

• gpresult /r

Network Troubleshooting At The Command Line

ping – Test reachability

  • ping <ip address> – Test reachability to a TCP/IP address
  • ping -t <ip address> – Ping until stopped with Ctrl-c
  • ping -a <ip address> – Resolve address to a hostname
  • ping -n <count> <ip address> – Send a # of echo requests
  • ping -f <ip address> – Send with Don’t Fragment flag set

ipconfig – Windows TCP/IP configuration

  • ipconfig /all – Show all TCP/IP details
  • ipconfig /release – Release the DHCP lease
  • ipconfig /renew – Renew the DHCP lease
  • ipconfig /flushdns – Flush the DNS resolver cache

ifconfig – Linux/Unix TCP/IP configuration

  • ifconfig <interface> – Show TCP/IP details

tracert (Windows) or traceroute (Linux/Unix)


  • Determine the route a packet takes to a destination
  • Takes advantage of ICMP Time to Live Exceeded error message
  • Not all devices will reply with ICMP Time Exceeded messages

netstat – Network statistics

  • netstat -a – Show active connections
  • netstat -b – Show binaries
  • netstat -n – Do not resolve names

nbtstat – Query NetBIOS over TCP/IP information

  • nbtstat -n – List local NetBIOS names
  • nbtstat -A <ip address> – List remote NetBIOS names
  • nbtstat -a <device name> – List remote NetBIOS IP

net – Windows network commands

  • NET USE – Map a network share to a drive letter
  • net use h: \\<servername>\<sharename>
  • NET STOP – Stop a service
  • net stop spooler
  • NET START – Start a service
  • net start spooler
  • NET VIEW – View network resources
  • net view \\<servername>

netdom – Manage Active Directory database

  • Join a computer to the domain, add a domain account, etc.
  • Reset domain password
  • netdom resetpwd /s:server /ud:domain\User /pd:*

nslookup – Lookup information from DNS servers

  • Canonical names, IP addresses, cache timers, etc.
  • Find an ip address – nslookup www.professormesser.com
  • Find a name – nslookup 8.8.8.8


Back To Top