Skip to main content

CMD CheatSheet for Developers

RAA (Run As Administrator)

File and Folder Management:

CommandDescription
?Help or sometimes shows related commands to some commands.
lsShowing all the existing folders in current directory
cd- To change directory
- cd directory-name.
copyCopies files to another location
dirList directory content.
delUsed to delete one or more files.
expandDecompresses compressed files.
fcFile compare- fc a.txt b.txt.
findFind files.
ftypeDisplay file type and mapping.
mkdirMake a directory.
moveMoves files from one folder to another.
printPrints out the text file contents.
rm- File remove from any directory
- rm file-name.
rd
rmdir
- Removes the directory
- rmdir [dir]
- rd [dir]
rmdir /s- Remove all the Subfolder from any Main-Folder
- rmdir /s folder-name.
dir /aThis command is help to find all the hidden directories
renRename.
replaceReplaces files in one directory with files of the same name in another directory.
robocopyUses an advanced tool to copy files and directories.
treeShow all system folder in tree manner.
typeDisplays the contents of text files.
xcopyThe xcopy command can copy one or more files or directory trees from one location to another.

Applications and Processes:

CommandDescription
schtasksExecutes a command or start a scheduled application (Task Scheduler).
shutdown- Shutdown your computer, control system shutdown using additional commands
- shutdown
- shutdown/?
- shutdown/i
tasklistDisplay a list of currently-running tasks
taskkill- Kills the running task
- taskkill /im [programme-name]
- taskkill /im notepad.exe
- taskkill /f /im notepad.exe
regStarts registry editor
runasLaunches the task as another user

Disk Management:

CommandDescription
chkdsk- Scan the disk/drive errors
- chkdsk [disk-name]:
- chkdsk C:
defragStarts disk defragmentation.
compactDisplays and change the compression of files in NTFS partitions.
formatFormats the disk.
RecoverRecovers data from a bad or damaged disk.
sfc- System file checker, scans all system files and repairs them if required
- sfc /scannow
volDisplays volume label and serial number for the disk.
wmic logicaldisk get nameGet all the drive name
diskmgmt.mscOpen disk-management system from command prompt

System Information:

CommandDescription
dateShow/Set date.
hostnameShows hostname of the computer.
powercfg- Gives report of the power setting
- powercfg /?
- powercfg /list
systeminfoTo get system-related information.
timeDisplays or sets the system time.
verDisplay operating system version.
fingerInformation about the user.
whoisThis command is useful when users want to find the domain name or the IP address.
ftpTransfer file to a ftp server.
getmacDisplay mac address.
modeUsed to configure system devices.
printPrint a specified text file to a specified printing device.

Network:

CommandDescription
ipconfigDisplay IP network settings.
ping- Test the ability of the source computer to reach a specified destination computer
- Show the list of usage and options in cmd
- Get a response from the website network
- ping [website name]
- ping [ip address]
nslookupFinds IP address by resource name.
routeThis command is used to check and make changes to the route table of the computer.
arpShows a table with IP addresses converted into physical addresses.
netsh- Allows you to display or modify the network configuration of a computer that is currently running
- Commands used for various properties related to network
- netsh (step-1)
- netsh> /?
netsh wlan- Command extension to the netsh
- netsh (step-1)
- netsh> wlan /?

Command Line Setup:

CommandDescription
clsClear screen.
colorChanges text and background color.
echoPrint the after echo text once.
promptChanges the command line prompt (print the after text until you close the cmd)
pausePause your window until you press any key.
titleTitle your command prompt.
timeout xxxCountdown wait in terminal- xxx in seconds.
exitExit from the cmd window.
resetThe reset command executed as reset session.