Windows Commands Cheat Sheet :)

Windows Commands Cheat Sheet :)

Displays all current TCP/IP network

ipconfig

Display system information

systeminfo

Display all files and folders

dir

Display all TCP connections

netstat -ano | findstr :<port>

Display active processes using PID

tasklist /FI "PID eq <no>"

Terminate particular process by PID

taskkill /PID <no> /F

Check the connectivity

ping <hostname or IP address>

Trace the route

tracert <hostname or IP address>

DNS Lookup

nslookup <hostname>

Check drive

Checks the file system and file system metadata of a volume for logical and physical errors.

chkdsk <drive>:

Scan all files

Scans all protected system files and replaces corrupted files with a cached copy.

sfc /scannow

Disk partitioning

diskpart

Change Directory

cd <directory_path>

Change current drive.

<drive_letter>:

Boot Configuration

Views or makes changes to the Boot Configuration Data (BCD) store.

bcdedit

Set an environment variable temporarily

Displays, sets, or removes environment variables in the current command prompt session.

set
set <variable>=<value>
set <variable>=

Set an environment variable permanently

setx <variable> <value>

Open a website

Opens a website link in the default web browser.

start <website_link>

Display/Set the system date.

date

Display/Set the system time.

time

Cancel the process

<Press Ctrl+C>

Display Message

echo "message"

Create new directory

mkdir <directory_name>

Delete a folder

rmdir <directory_name>

Deletes one or more files.

del <file_path>

Move a file

move <source> <destination>

Rename a file

rename <old_name> <new_name>

Clear

Clears the command prompt screen.

cls

Exit Commannd prompt

Exits the command prompt or a batch script.

exit