DEV Community


Posted on

Windows cmd commands Command Prompt: Basic Commands You Should Know (CMD)

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
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

03. List Hardware Information (systeminfo)
Use systeminfo to know very basic information about your pc’s hardware, like – motherboard, processor & ram.
Alt Text

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

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
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
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
Use the cd.. command to go one folder up.
Alt Text

08. Change the Drive
If you wanted to change the drive from “C:” to “D:”, type d: and then press Enter.
Alt Text
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

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
To test if it worked, use the dir command. The newly created folder appears in the list.
Alt Text
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

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

Top comments (2)

sarahroxon profile image

The basic commands are easy to write, this will be a useful share for those who are new to cmd. slope game

adarshr29935781 profile image
adarsh rathi

Your content is excellent but I think the codeexampler website javascript tutorial is also the best javascript tutorial