Command Prompt: Basic Commands You Should Know (CMD)
Tags: cmd, windows
Published: 2020-08-31 21:34:29

**A quick guide to basic cmd commands.**

*NOTE: All command shared in this tutorial applies to Windows 10, Windows 8.1 and Windows 7.*

**01. Lists Installed Drivers** (driverquery)
Drivers are very important in your PC. Missing a important driver can hamper your work. Use `driverquery` command to get a full list of installed drivers in your pc. It’ll help you to find the missing driver.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/tjpr1x4fgqep3z7l93sf.png)
Use `driverquery -v` to obtain more information.

**02. Networking Information** (ipconfig)
`ipconfig` will provide you your ip address along with your local network.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/b25ywxeg8i84nq2gmmj8.png)

**03. List Hardware Information** (systeminfo)
Use `systeminfo` to know very basic information about your pc’s hardware, like – motherboard, processor & ram.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/xbaprl2kz64ai0z5a9hw.png)

**04. Check if Server is Reachable** (ping)
The `ping` command sends packets of data to a specific IP address (or domain) on a network and then lets you know how long it took to transmit that data and get a response.
If you get the response properly then the connection of the device is working properly if not a particular server or your online connection is blocking communication between your computer and another.
`ping <ip or domain>`
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/qf4sw2kr47feh93jgdta.png)

**05. Scan and Repare System Files** (sfc /scannow)
`sfc /scannow` will scan and repare windown system files. But you must be run the console as an administrator.

**06. List Currently Running Tusk** (tasklist)
Use `tasklist` to get currant list of all tasks running on your pc.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/516ygeqkylizl3ufg0eq.png)
Use `tasklist -v` to obtain more detail of all tasks.

**07. Change the Directory / Folder** (cd)
Use `cd\` to go to the top of the directory tree.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/r9k702zom2ayt899r2pr.png)
If you need to go to a specific folder from this drive run the command `CD Folder`. The subfolders must be separated by a backslash character: `\`.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/greiwlwgblsqj48yk7yj.png)
Use the `cd..` command to go one folder up.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/kv2e6x224v8n84ui3nos.png)

**08. Change the Drive**
If you wanted to change the drive from “C:” to “D:”, type `d:` and then press Enter.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/g4uesslq8xzeoydibcnd.png)
If you are now on the “D:” drive and you want to go to the Windows folder from the”C:” drive, you should type cd /d C:\Windows and press Enter.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/rp21nn17ildz1bktt6vf.png)

**09. Create a New Directory / Folder** (mkdir)
You can make a new folder using the `mkdir` (Make Directory) command. The syntax of these commands is `mkdir Folder`.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/ep065flpskw8umjamm6i.png)
To test if it worked, use the `dir` command. The newly created folder appears in the list.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/pg51iqq6vptzc21tclnx.png)
If you are working on the “C:” drive and you want to create a new folder in “D:,” called Google, type `mkdir d:\Google` and then press Enter.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/5qij2k0kkel53kklkade.png)

**10. Clear Screen** (cls)
To clear the existing commands in prompts type `cls` and press Enter.
`cls`