How to used command DOS on Windows

How to used command DOS on Windows
CD-ASSOC-. Ver-ECHO-COPY- XCOPY-DIR-DATE-CLS- EXIT-MD-MOV-PATH -PAUSE-PROMPT- RD  RENREM DELTIME  TYPE- VOL- ATTRIB- CHKDSK-CMD-CHOICE- COMP-CONVERT- DRIVERQUERY -EXPAND-FIND-HELP- FORMAT- IPCONFIG-IPCONFIG /ALL - IPCONFIG /Renew- IPCONFIG /Release- IPCONFIG /Flushdns-NSLOOKUP -LABEL -MORE -NET-PING - SHUTDOWN -SORT- FC-TASKKILL-TASKLIST -START - TREE-.SUBST- DISKPART- TITLE - SET

A List of Common DOS Commands
DOS (Disk Operating System) is a command-line operating system that was developed by Microsoft in the 1980s. It is no longer widely used, but it is still important to know some basic DOS commands for troubleshooting and system administration tasks.
  • CD - Changes the current directory.
cd c:\windows
  • ASSOC - Associates a file extension with a file type.
assoc .txt=txtfile
  • Ver - Displays the version of DOS.
ver
  • ECHO - Displays a message on the screen.
echo This is a message.
  • COPY - Copies a file.
copy c:\windows\system32\notepad.exe d:\backup
  • XCOPY - Copies files or directories, even if they are located on different drives or directories.
xcopy c:\windows d:\backup /s /e
  • DIR - Lists the contents of a directory.
dir
  • CLS - Clears the screen.
cls
  • EXIT - Exits the DOS command prompt.
exit
  • MD - Creates a new directory.
md c:\temp
  • MOV - Moves a file.
move c:\windows\notepad.exe d:\backup
  • PATH - Sets the search path for executable files.
path c:\windows;d:\apps
  • PAUSE - Pauses the execution of the DOS command prompt.
pause
  • PROMPT - Changes the prompt.
prompt $p$g
  • RD - Removes a directory.
rd c:\temp
  • REN - Renames a file or directory.
ren c:\windows\notepad.exe notepad.txt
  • REM - Inserts a remark in a batch file.
rem This is a remark.
  • DEL - Deletes a file.
del c:\windows\notepad.txt
  • TIME - Sets or displays the system time.
time
  • TYPE - Displays the contents of a file.
type c:\windows\notepad.txt
  • VOL - Displays the volume label of a disk.
vol c:
  • ATTRIB - Displays or changes the attributes of a file.
attrib c:\windows\notepad.txt +r
  • CHKDSK - Checks a disk for errors.
chkdsk c:
  • CMD - Invokes another instance of the command prompt.
cmd
  • CHOICE - Provides a list of options to the user.
choice /c yn
  • COMP - Compares two files.
comp c:\windows\notepad.txt c:\backup\notepad.txt
  • CONVERT - Converts a volume from FAT16 or FAT32 to NTFS.
convert c: /fs:ntfs
  • DRIVERQUERY - Displays information about installed drivers.
driverquery
  • EXPAND - Extracts a file from a compressed archive.
expand c:\temp\myfile.cab c:\windows
  • FIND - Searches for a string in a file or input.
find "This is a string" c:\windows\notepad.txt
  • HELP - Displays a list of DOS commands.
help
  • FORMAT - Formats a disk.
format c: /q
  • IPCONFIG - Displays network configuration information.
ipconfig
  • IPCONFIG /ALL - Displays all network configuration information, including IP address, subnet mask, default gateway, and DNS servers.
ipconfig /all
  • IPCONFIG /RELEASE - Releases the DHCP lease for the current network adapter.
ipconfig /release
  • IPCONFIG /RENEW - Requests a new DHCP lease for the current network adapter.
ipconfig /renew
  • NSLOOKUP - Performs a DNS lookup.
nslookup www.google.com
  • LABEL - Sets or changes the volume label of a disk.
label c: MyDisk
  • MORE - Displays the contents of a file one screen at a time.
more c:\windows\notepad.txt
  • NET - Provides a variety of network management commands.
net view
  • PING - Sends an ICMP echo request to a computer and waits for a response.
ping www.google.com
  • SHUTDOWN - Shuts down or restarts the computer.
shutdown -s
  • FC - Compares two files and displays the differences between them.
fc c:\windows\notepad.txt c:\backup\notepad.txt
  • TASKKILL - Ends a task.
taskkill /f /im notepad.exe
  • TASKLIST - Lists all tasks running on the computer.
tasklist
  • START - Starts a program or opens a file.
start notepad.exe
  • TREE - Displays a graphical representation of a directory tree.
tree c:\windows
  • SUBST - Assigns a drive letter to a directory.
subst d: c:\temp
  • DISKPART - Provides a graphical interface for managing disk partitions.
diskpart
  • TITLE - Sets the title of the command prompt window.
title This is my title
  • SET - Displays or sets environment variables.
set path=c:\windows;d:\apps

Comments