File System Command Prompt

  • Windows Command Prompt (CLI) allows interaction with the OS via typed commands.

  • Most commands can be used with standard user privileges; elevated (administrative) permissions are needed for others.

  • To run Command Prompt as administrator:

    • Search for "cmd" > right-click and select "Run as administrator".

    • Alternatively, type cmd and press Control+Shift+Enter.

  • Common commands include:

    • help: Provides details about commands.

    • dir: Lists files and directories in the current folder.

    • cd (or chdir): Changes the current directory.

    • mkdir (or md): Creates a new directory.

    • rmdir (or rd): Removes a directory.

  • Use cls to clear the command line screen.

  • Commas can be used with .. to move up to it’s direct parent directory.

  • Drive letters designate different storage partitions (e.g., C: for the main storage).

  • The hostname command shows the name of the current computer.

  • The format command establishes a file system on a partition, which can erase existing data; use it cautiously.

  • File copying commands:

    • copy: Copy files, supports /v for verification and /y for overwriting without prompts.

    • xcopy: Copies files and directories, including subdirectories.

    • robocopy: Advanced copy functionality with options for efficiency and bandwidth control.

  • The shutdown command:

    • shutdown /s to shut down.

    • shutdown /r to restart.

    • shutdown /a to abort a scheduled shutdown.

  • The diskpart command manages disks and partitions; use with care due to the risk of data loss.

  • The winver command displays the current Windows version, useful for troubleshooting.

  • gpupdate is used to force a group policy update without logging off.