Windows Command Prompt Basics

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

Which command can be used to see all active connections on a machine, including processes using the internet connection?

  • tracert
  • netstat -ab (correct)
  • ipconfig /all
  • ping

Which command allows you to create a new directory on your hard drive?

  • chkdsk
  • mkdir (correct)
  • sfc
  • cd

What command is used to check for and repair corrupted Windows files?

  • sfc /scannow (correct)
  • chkdsk
  • netstat -ab
  • tasklist

Which command can be used to display detailed information about your PC, including its hardware configuration?

<p>systeminfo (C)</p> Signup and view all the answers

Which of the following commands can be used to stop a running service?

<p>net stop (C)</p> Signup and view all the answers

What command can you use to display the route that a network request takes to reach its destination?

<p>tracert (C)</p> Signup and view all the answers

Which command can you use to show the IP address associated with a given domain name?

<p>nslookup (C)</p> Signup and view all the answers

Which command can be used to change directories on your hard drive?

<p>cd (B)</p> Signup and view all the answers

What command can be used to see the current username and domain name?

<p>whoami (C)</p> Signup and view all the answers

Which command shows all running programs and processes, similar to Task Manager?

<p>tasklist (C)</p> Signup and view all the answers

What command should be used to delete files that end with the '.exe' extension?

<p>del *.exe (D)</p> Signup and view all the answers

Which command can be used to securely delete files, making them virtually unrecoverable?

<p>cipher (C)</p> Signup and view all the answers

What command allows you to view the current version of Windows?

<p>ver (A)</p> Signup and view all the answers

Which command will allow you to manage disk partitions?

<p>diskpart (C)</p> Signup and view all the answers

What is the purpose of the runas command?

<p>Runs a program as a different user (D)</p> Signup and view all the answers

Which command is used to create incremental backups while copying files?

<p>xcopy /d (B)</p> Signup and view all the answers

What does the mmc command do?

<p>Opens a management console (C)</p> Signup and view all the answers

Which command would you use to log off from the current session on a computer?

<p>logoff (B)</p> Signup and view all the answers

What command is helpful for checking if unwanted tasks are running on your computer?

<p>schtasks (B)</p> Signup and view all the answers

Which command is used to rename a file or folder?

<p>ren (A)</p> Signup and view all the answers

Flashcards

ping

Sends request to a device or network location by its IP address and tests whether the device responds.

ipconfig

Displays your local IP address and network information. Useful for troubleshooting and finding out what IP addresses your devices are using.

cls

Clears the text on the command prompt screen. Useful for cleaning up the screen before running new commands.

nslookup

Retrieves IP address associated with a given domain name, or conversely. Useful for understanding the relationship between domain names and their corresponding IP addresses.

Signup and view all the flashcards

tracert

Shows the route that a network request takes to reach its destination. Useful for troubleshooting network problems.

Signup and view all the flashcards

shutdown

Shuts down a machine. Use the -i option for a graphical interface (if you are the administrator of the machine).

Signup and view all the flashcards

netstat -ab

Displays active connections on a machine, including processes using the internet connection. Useful for troubleshooting or detecting malware.

Signup and view all the flashcards

cd

Changes directories on your hard drive.

Signup and view all the flashcards

sfc /scannow

Checks for and repairs corrupted Windows files. Useful for troubleshooting issues.

Signup and view all the flashcards

chkdsk

Scans a hard drive or SSD for errors. Useful for identifying and fixing disk problems.

Signup and view all the flashcards

format

This command allows you to format a disk, erasing all data permanently. Use caution when executing this command.

Signup and view all the flashcards

diskpart

A powerful tool for managing partitions on your hard drive or SSD, enabling you to create, resize, delete, and format partitions.

Signup and view all the flashcards

xcopy

Used to copy files and folders between locations, including creating incremental backups with the /d parameter, which only copies modified files since the last backup.

Signup and view all the flashcards

del

Used to delete files, including specific types (e.g., del *.exe for '.exe' files). Exercise caution as this command permanently removes files.

Signup and view all the flashcards

schtasks

A tool for managing scheduled tasks, which allows you to view and analyze scheduled processes.

Signup and view all the flashcards

hostname

Displays the name of the current computer.

Signup and view all the flashcards

cipher

Securely deletes files by overwriting them multiple times, making them practically unrecoverable.

Signup and view all the flashcards

psexec

Executes commands remotely on other computers, requiring administrator privileges.

Signup and view all the flashcards

mmc

Opens the Management Console, a centralized hub for various tools and system settings.

Signup and view all the flashcards

dir

Lists the contents of a specified folder, providing insights into file and folder structure.

Signup and view all the flashcards

Study Notes

Windows Command Prompt

  • How to get started:
    • Open "Command Prompt" in Windows
    • Select "Run as administrator"
    • To see more details on any command, add a space followed by "/" and a question mark after the command name (ex: ping /?)

Basic commands:

  • ping: Sends requests to a device or network location (like a printer, PC, or Wi-Fi) via its IP address and tests whether the device responds.
  • ipconfig: Shows your local IP address and network information, use /all to see more details.
  • cls: Clears the text on the command prompt screen.
  • nslookup: Retrieves IP address associated with a given domain name, or conversely.
  • tracert: Shows the route that a network request takes to reach its destination.
  • shutdown: Shuts down a machine, use the -i option for a graphical interface (if you are the administrator of the machine).

Network and System Commands:

  • netstat -ab: Displays active connections on a machine, including processes using the internet connection, useful for troubleshooting or detecting malware.
  • net: A versatile command with various sub-commands:
    • net time: Syncing time on a network domain
    • net share: Shows available shared resources on a Windows network
    • net stop: Stops a running service
    • net start: Starts a service
  • systeminfo: Shows detailed information about your PC.
  • getmac: Displays MAC addresses of your local network connections.
  • arp -a: Shows network connections based on their MAC addresses on the local network.
  • whoami: Shows the current username and domain name.
  • set: Displays all environment variables for a user, including information like processor count.
  • cd: Changes directories on your hard drive (use cd .. to move up one level)
  • mkdir: Creates a directory on your hard drive.
  • sfc /scannow: Checks for and repairs corrupted Windows files (very useful for troubleshooting).
  • chkdsk: Scans a hard drive or SSD for errors and attempts to repair them (add /f at the end for automatic fixing).
  • route print: Shows the routing table and how network traffic is directed.
  • tasklist: Shows all running programs and processes, similar to Task Manager.
  • taskkill: Stops a running program by using its PID number (the process ID number).
  • format: Formats a disk, be extremely cautious with this command, as it erases all data.
  • diskpart: Allows you to manage partitions on a hard drive or SSD.

Backup and File Management:

  • xcopy and robocopy: Both allow you to copy files and folders between locations. Adding a parameter like /d creates incremental backups, only copying files that have been modified since the last backup.
  • del: Deletes files, use del *.exe to delete files that end with the '.exe' extension, be cautious with this command as it permanently removes files.

System and Security:

  • schtasks: Displays scheduled tasks, useful for checking if unwanted tasks are running.
  • hostname: Shows the name of the current computer.
  • cipher: Securely deletes files, making them practically impossible to recover.
  • psexec: Executes a command on a remote computer (requires administrator privileges).
  • mmc: Opens a management console where you can add various tools, useful for accessing Windows settings and configurations.
  • dir: Lists the contents of a specific folder, useful for exploring file and folder structure.
  • runas: Runs a program as a different user account (administrators, etc.), helpful for troubleshooting or managing privileges remotely.
  • rmdir: Deletes an empty directory, use /s to also delete its contents. Be cautious as this action cannot be undone.
  • msiexec: Installs MSI-format programs (use /quiet for silent installation).
  • ver: Shows the current version of Windows.

Other:

  • findstr: Searches for a string of text within a file or set of files, providing results in the console window.
  • color: Modifies the text and background colors of the command prompt window.
  • ren: Renames a file or folder.
  • exit: Exits the command prompt window.
  • help: Displays a list of available commands and their basic functionality.
  • logoff: Closes your session by logging you out.

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

More Like This

Windows Command Prompt and Shell Quiz
6 questions
Windows CMD Commands Guide
6 questions
Command Prompt Basics for Beginners
10 questions

Command Prompt Basics for Beginners

HardWorkingAbundance9419 avatar
HardWorkingAbundance9419
Use Quizgecko on...
Browser
Browser