Working with Basic Windows Commands

Parth Narvekar
6 min readJun 4, 2023

--

In this blog, we’ll explore all the windows commands

PING: Shows a Website IP Address, Lets you Know How Long it Takes to Transmit Data and a Get Response

TRACERT: Traces an IP address to a particular website and gives a count of hops to reach the website.

IPCONFIG: Shows Information about PC IP Addresses and Connections

SYSTEMINFO: Shows Your PC’s Details

If you want to see more detailed information about your system you won’t see in the GUI, this is the command for you

SET: Shows your PC’s Environment Variables

ASSOC: Lists Programs and the Extensions They are Associated With

DRIVERQUERY: Lists All Installed Drivers

It is important to have access to all drivers because they often cause problems.

That’s what this command does — it shows you even the drivers you won’t find in the device manager

PROMPT: Changes the Default Text Shown before Entering Commands

By default, the command prompt shows the C drive path to your user account.

You can use the prompt command to change that default text with the syntax prompt prompt_name $G:

CLIP: Copies an Item to the Clipboard

For example, dir | clip copies all the content of the present working directory to the clipboard.

TITLE: Changes the Command Prompt Window Title Using the Format title window-title-name

FC: Compares Two Similar Files

If you are a programmer or writer and you want to quickly see what differs between two files, you can enter this command and then the full path to the two files. For example fc “file-1-path” “file-2-path”.

CIPHER: Wipes Free Space and Encrypts Data

On a PC, deleted files remain accessible to you and other users. So, technically, they are not deleted under the hood.

You can use the cipher command to wipe the drive clean and encrypt such files.

NETSTAT -AN: Shows Open Ports, their IP Addresses and States

COLOR ATTR: Changes the Text Color of the Command Prompt

Enter color attr to see the colors you can change to:

for /f "skip=9 tokens=1,2 delims=:" %i in ('netsh wlan show profiles') do @echo %j | findstr -i -v echo | netsh wlan show profiles %j key=clear – Shows All Wi-Fi Passwords

SFC: System File Checker

This command scans your computer for corrupt files and repairs them. The extension of the command you can use to run a scan is /scannow.

POWERCFG HELP: Controls Configurable Power Settings

You can use this command with its several extensions to show information about the power state of your PC.

You can enter powercfg help to show those extensions.

DIR: Lists Items in a Directory

DEL: Deletes a File

attrib +h +s +r folder_name – Hides a Folder

You can hide a folder right from the command line by typing in attrib +h +s +r folder_name and then pressing ENTER.

To show the folder again, execute the command – attrib -h -s -r folder_name

START WEBSITE-ADDRESS: Logs on to a Website from the Command Line

VER: Shows the Version of the OS

TREE: Shows the Tree of the Current Directory or Specified Drive

TASKLIST: Shows Open Programs

You can do the same thing you do with the task manager with this command:

TASKKILL: Terminates a Running Task

To kill a task, run taskkill /IM "task.exe" /F. For example, taskkill /IM "chrome.exe" /F:

DATE: Shows and Changes the Current Date

TIME: Shows and Changes the Current Time

VOL: Shows the Serial Number and Label Info of the Current Drive

CTRL + C – Stops the Execution of a Command

-help – Provides a Guide to other Commands

ECHO: Shows Custom Messages or Messages from a Script or File

MKDIR: Creates a Folder

RMDIR: Deletes a Folder

MORE: Shows More Information or the Content of a File

MOVE: Moves a File or Folder to a Specified Folder

REN – Renames a File with the Syntax ren filename.extension new-name.extension

CLS: Clears the Command Line

In case you enter several commands and the command line gets clogged up, you can use cls to clear all entries and their outputs.

EXIT:– Closes the Command Line

SHUTDOWN: – Shuts down, Restarts, Hibernates, Sleeps the Computer

CONCLUSION: This article showed you several “unknown-to-many” commands you can use to get access to hidden functionalities on your Windows PC.

Again, you should be careful while working with these commands because they can have a lasting effect on your OS.

If you find the commands helpful, share the article with your friends and family.

--

--