Skip to main content
E
EmmaPrep.com
Operating SystemsMEDIUMVerified Curriculum7 min read

Operating Systems

Interactive AI Tutor Study Mode
Ask questions, request worked examples, or test understanding.

Chapter 1

Operating Systems

Course: 220 1202 Comptia A Exam Core 2
Subject: 220 1102 Comptia A Plus Exam Core 2
Chapter: Operating Systems


Overview of Microsoft Command-Line Tools

Microsoft’s command-line interface (CLI) is a powerful tool for users, administrators, and IT professionals, offering advanced control over file management, network diagnostics, and system maintenance. Understanding these tools and commands allows for efficient system navigation, troubleshooting, and configuration from the command prompt.

Command-Line Navigation and Drive Access

  • Navigation Commands

cd (Change Directory): Changes the current directory to the specified folder path. Example: cd C:\Users navigates to the Users directory on the C: drive. dir: Lists all files and directories in the current directory. Example: dir in C:\ shows all files and folders in that drive. md (Make Directory): Creates a new directory within the current path. Example: md Projects creates a folder named "Projects." rmdir (Remove Directory): Deletes an empty directory. Example: rmdir TestFolder removes the folder named "TestFolder" if it's empty.

  • cd (Change Directory): Changes the current directory to the specified folder path. Example: cd C:\Users navigates to the Users directory on the C: drive.
  • dir: Lists all files and directories in the current directory. Example: dir in C:\ shows all files and folders in that drive.
  • md (Make Directory): Creates a new directory within the current path. Example: md Projects creates a folder named "Projects."
  • rmdir (Remove Directory): Deletes an empty directory. Example: rmdir TestFolder removes the folder named "TestFolder" if it's empty.
  • Drive Navigation Inputs

Changing Drives: Typing the drive letter followed by : allows switching to a different drive. Example: Typing D: changes the prompt to the D: drive if it exists on the system.

  • Changing Drives: Typing the drive letter followed by : allows switching to a different drive.
  • Example: Typing D: changes the prompt to the D: drive if it exists on the system.

Essential Command-Line Tools

  • Network and System Diagnostics

ipconfig: Displays current IP configuration, showing IP address, subnet mask, and gateway. Example: Used to check network connectivity issues on Windows systems. ping: Sends packets to a network address to check connectivity. Example: ping google.com checks if Google is reachable from the computer. hostname: Shows the name of the computer. Example: Helpful when identifying a machine within a network. netstat: Shows active network connections and listening ports. Example: Used to troubleshoot network issues, e.g., checking open ports. nslookup: Resolves domain names to IP addresses. Example: nslookup example.com shows the IP for the domain, helping in DNS issues.

  • ipconfig: Displays current IP configuration, showing IP address, subnet mask, and gateway. Example: Used to check network connectivity issues on Windows systems.
  • ping: Sends packets to a network address to check connectivity. Example: ping google.com checks if Google is reachable from the computer.
  • hostname: Shows the name of the computer. Example: Helpful when identifying a machine within a network.
  • netstat: Shows active network connections and listening ports. Example: Used to troubleshoot network issues, e.g., checking open ports.
  • nslookup: Resolves domain names to IP addresses. Example: nslookup example.com shows the IP for the domain, helping in DNS issues.
  • File and Disk Management

chkdsk: Checks for disk errors and repairs issues. Example: chkdsk C: scans the C: drive for issues, used often to fix disk errors. format: Formats a specified drive, erasing all content. Example: format D: prepares the D: drive for a new filesystem. xcopy: Copies files and directories, including subdirectories. Example: xcopy D:\Folder1 E:\Backup /E copies Folder1 to the Backup folder, including all subdirectories. copy: Copies files from one location to another. Example: copy C:\file.txt D:\ copies file.txt to the D: drive. robocopy: A more robust copying tool than xcopy, designed for network environments with advanced options. Example: robocopy C:\Source D:\Destination /MIR mirrors the contents of Source to Destination, useful for backups.

  • chkdsk: Checks for disk errors and repairs issues. Example: chkdsk C: scans the C: drive for issues, used often to fix disk errors.
  • format: Formats a specified drive, erasing all content. Example: format D: prepares the D: drive for a new filesystem.
  • xcopy: Copies files and directories, including subdirectories. Example: xcopy D:\Folder1 E:\Backup /E copies Folder1 to the Backup folder, including all subdirectories.
  • copy: Copies files from one location to another. Example: copy C:\file.txt D:\ copies file.txt to the D: drive.
  • robocopy: A more robust copying tool than xcopy, designed for network environments with advanced options. Example: robocopy C:\Source D:\Destination /MIR mirrors the contents of Source to Destination, useful for backups.
  • User and Group Management

net user: Manages user accounts on the computer. Example: net user John /add adds a user named "John" to the system. net use: Connects or disconnects a computer from a shared network resource. Example: net use Z: \server\share maps a network drive to Z:.

  • net user: Manages user accounts on the computer. Example: net user John /add adds a user named "John" to the system.
  • net use: Connects or disconnects a computer from a shared network resource. Example: net use Z: \server\share maps a network drive to Z:.
  • System and Policy Commands

gpupdate: Updates Group Policy settings. Example: Used after changes in Group Policy to apply settings immediately. gpresult: Displays Group Policy settings for a user or computer. Example: gpresult /R shows which policies are applied to the current user. shutdown: Shuts down or restarts the computer. Example: shutdown /r /t 0 restarts the system immediately. sfc (System File Checker): Scans and repairs corrupted system files. Example: sfc /scannow checks for and attempts to repair system file integrity issues.

  • gpupdate: Updates Group Policy settings. Example: Used after changes in Group Policy to apply settings immediately.
  • gpresult: Displays Group Policy settings for a user or computer. Example: gpresult /R shows which policies are applied to the current user.
  • shutdown: Shuts down or restarts the computer. Example: shutdown /r /t 0 restarts the system immediately.
  • sfc (System File Checker): Scans and repairs corrupted system files. Example: sfc /scannow checks for and attempts to repair system file integrity issues.
  • Other Useful Commands

diskpart: Manages disk partitions, allowing you to create, delete, or modify partitions. Example: diskpart followed by list disk shows all drives on the system. pathping: Combines the functionality of ping and tracert to analyze packet loss over multiple hops. Example: pathping google.com displays hop-by-hop network latency. winver: Displays the Windows version and build information. Example: winver helps determine the specific version of Windows installed.

  • diskpart: Manages disk partitions, allowing you to create, delete, or modify partitions. Example: diskpart followed by list disk shows all drives on the system.
  • pathping: Combines the functionality of ping and tracert to analyze packet loss over multiple hops. Example: pathping google.com displays hop-by-hop network latency.
  • winver: Displays the Windows version and build information. Example: winver helps determine the specific version of Windows installed.
  • Help Command

[command name] /?: Displays information and options for a specified command. Example: ipconfig /? lists all possible switches and uses for the ipconfig command, helpful for learning command syntax.

  • [command name] /?: Displays information and options for a specified command.
  • Example: ipconfig /? lists all possible switches and uses for the ipconfig command, helpful for learning command syntax.

Pic: Command Prompt Interface