Useful Tips

Windows Command List (Windows CMD) with Description and Examples

Pin
Send
Share
Send
Send


Where is the command line located?

The main command line file is the console cmd.exe translating user commands into an understandable system view, is located in the folder with the installed OS along the path: <буква_системного_диска>: WINDOWS system32 cmd.exe

How to start / open / call the command line?

These methods of launching the command line are relevant for all versions, including those that I consider on my site - windows XP, 7, 8

1) Start - All programs - Accessories - Command line

2) Start - Run - enter cmd.exe

3) keyboard shortcut Win + R - enter cmd

4) Launch from the system folder: <буква_системного_диска>: WINDOWS system32 cmd.exe

In order to run command prompt as administrator, 1 and 4 methods are suitable, you need to click RMB on the shortcut and select "Run as Administrator" in the menu.

Commands / Options / Command Line Keys .
You can learn command line commands directly in it by typing help and pressing the Enter key (after you finish entering all the commands you need to use Enter (ENTER)).

I will not go too deeply, because for this it is better to write a separate article. I will give only a small command line example.
Suppose I have folder 123 on drive E, and in it is the text file test.txt.
Now I want to make this file hidden without going to this drive and not "seeing" this file with the folder.
The team responsible for the "System" attribute is attrib. And she has her own attributes (already teams). You can even look at the screenshot above, I showed it there on an example.
Of all its attributes, I need only two - this is its setting and the attribute itself. Responsible for this + and s.
So my command will be as follows: attrib + s e: /123/test.txt. This is how the correct result will look:

Oh. I just noticed that instead of Hidden, I made it System, and I wonder why it did not disappear in the folder. I specifically did not begin to remove screenshots and edit the article in order to show you how to correct such a mistake (as I did). Good information too.

And finally:
How to edit text in a command window?
The fact is that standard methods using the keyboard shortcuts Ctrl + C and Ctrl + V on the command line do not work.
Here you need to use RMB - Right Mouse Button.
In order to paste text on command line, just click RMB anywhere on the command line, then select Embed.

In order to copy some text from the command line You can use one of two methods:
1) RMB - Select All
All text will stand out, but you can immediately select whatever you want, just as usual holding down LMB
2) RMB - Flag
A blinking cursor will appear at the beginning of the line, which can be controlled by the "arrows" on the keyboard. And when the shift button is pressed, select the text, controlling the “arrows” on the keyboard as well. Or select again with the mouse.

if you wish, you can change command line settingsby selecting the menu item above "Properties"

Other Windows Command Line Resources:

Windows command line setup. - How to change the background color, character color, size and location of the command line window. Copy and paste text in the console window. How to configure the addition of file and directory names when typing at the command line. Using function keys.

Working with the Windows command line - The basic techniques used when working on the Windows command line.

Windows batch files - General principles for using environment variables in batch files. Processing command line options. The use of labels, transitions and cyclic data processing. Practical examples of solving system administration tasks.

Launching applications as administrator without UAC request - How to start an application or batch file from a batch file without prompting for UAC UAC

Work with the network on the command line. - A detailed description of the CMD Windows commands for working with the network and examples of their use.


If you want to share a link to this page on your social network, use the "Share" button

How to run the command line

In Windows 10, it’s not immediately obvious to find the command line, so read this article about the different ways to launch the console in this OS.

There are several ways to run a command line on a Windows operating system, here are the simplest ones:

  • From the "Start" menu, go to "Programs" ("All Programs"), and then to "Tools" (in Windows 7 - "Accessories"), select the application "Command Prompt".
  • In the search field, enter “cmd” (without quotation marks), the command line will appear among the opened results.
  • After pressing “Win” + “R” on the keyboard, in the “Run” window, enter the command to launch the command line “cmd” (without quotes).

In normal mode, the command line is run on behalf of the user. To perform certain actions on the command line, elevated computer administrator privileges are required. In this case, the command line must be run as administrator. Read the article on how to run the command line as administrator in different versions of the Windows operating system.

How to run a command on the command line

Work on the command line is very simple: the user enters a text command, and then presses the Enter key. If you need to enter several consecutive commands, repeat this operation several times.

After starting the command line, the version of the Windows operating system and the place where the user is currently located are displayed in the window of the command line interpreter. When started in normal mode, this is the address of the user profile on the system drive.

When you run the command line as administrator, the path is as follows: "C: Windows system32".

Windows command line commands must be entered in the interpreter window immediately after the ">" sign, at which point the cursor blinks.

To copy a command from a computer, and then paste the command into the command line, use the context menu of the right mouse button. Copy the command to the clipboard, paste the mouse cursor into the command window, click the right mouse button. Windows 10 supports copying and pasting using standard keyboard keys: “Ctrl” + “C” and “Ctrl” + “V”.

Some system applications start immediately after entering a command that consists of the name of the application, for example, if you run the calc command, the system program Calculator will start on the computer.

For other programs, you will need to enter the full path to the application executable. If there are spaces in the path to the file, the full path is enclosed in quotation marks, for example, the command to launch the Google Chrome browser looks like this:

After starting a command from the command line, the implementation of the command execution is not always externally noticeable, due to the fact that there are internal changes in the operating system.

Other parameters, keys for performing specific actions, are often added to the main command.

If you enter the wrong command, for example, the one entered with errors, or if the Windows operating system cannot run the command for any reason, a message will appear in the command line interface window.

Windows Command Line Commands

The user can independently learn the basic commands from the Command Line utility itself. To do this, just enter the command: "help".

The command line interface displays a list of basic commands.

To get information about the parameters of an individual command, you need to enter one of the following commands that are executed the same way (do not forget to put a space):

As a result, you will get information about all the parameters of this command.

Windows Command Prompt: List of Basic Commands

Check out the table that summarizes the commands used on the Windows command line. If I missed any important command, write about it in the comments to this article, I add the command to the table.

TeamAction taken
appwiz.cplrunning a system tool to change or remove programs
arpmapping and changing ARP tables of IP-to-physical conversion used by the address resolution protocol
assocdisplay or change mappings by file name extensions
atrunning programs at a specified time
attribdisplay and change file attributes
azman.mscauthorization manager
bcdboottool for creating and restoring boot configuration data files
bcdeditediting changes in the system bootstrap database
breakchanging the processing mode of the key combination “Ctrl” + “C”
blastclnworm cleaning utility
bootcfgconfigure, retrieve, modify, or delete command-line options in the Boot.ini file in Windows XP
callcalling one batch file from another
caclsviewing and editing changing file access control tables (ACLs)
calccalculator application launch
cddisplay name or change current folder
charmaptable of symbols
chcpdisplay or change the active code page
chdirdisplay or change the current folder
copycopying one or more files
chkdskchecking the disk for errors and displaying statistics
chkntfsdisplay or change disk check options at boot time
ciddaemonfile indexing service
cipherfile and folder encryption in NTFS
cleanmgrDisk Cleanup utility
clsscreen cleaning
cmdlaunching another windows command line interpreter
compmgmt.mscopening computer management console
colorset foreground and background colors to default
comexp.msccomponent services
compcomparing the contents of two files or two sets of files
compactviewing and changing file compression settings in NTFS partitions
compmgmt.mscComputer management
computerdefaultsdefault application selection
controlControl Panel
control admintoolsadministration
control desktopscreen customization and personalization
control folderfolder properties in Explorer options
control fontsfonts
control keyboardopening the keyboard properties window
control mousemouse properties
control printerdevices and printers
control schedtasksTask Scheduler
control userpasswords2user account management
convertconverting the FAT volume file system to NTFS (does not work on the current drive)
copycopy files to another location
credwizbackup and restore usernames and passwords
datedisplay or set the current date
debugprogram debugging and editing tool
defragstart disk defragmentation
deldelete one or more files
desk.cplscreen resolution setting
devicepairingwizardadd new device
devmgmt.msdevice Manager
dfrguidisk optimization (defragmentation)
dirlisting files and subfolders from a specified folder
diskmgmt.msopening the Disk Management snap-in
diskpartdisplay and configuration of disk partition properties
diskperfenable or disable performance counter
doskeycommand line editing, recalling Windows commands, creating macros
dpiscalingdisplay settings
dxdiagDirectX Diagnostic Tool
echodisplaying messages and switching the display mode of commands on the screen
endlocalcompletion of local environment changes for a batch file
erasedelete one or more files (overwriting)
esentutlMicrosoft Windows Database Maintenance Utilities
eudceditpersonal character editor
eventcreatecreate a record of a special event in the specified event log
eventvwr.mscview events
expandunpacking compressed files
explorerWindows Explorer
fccomparing files or sets of files, displaying the differences between them
findsearch for a text string in one or several files
findstrsearch text string in file
fingeruser information for the specified system on which the Finger service is running
firewall.cplWindows Defender Firewall
forrunning the specified command for each file in the set
formatdisk formatting
fsmgmt.mscshared folders
fsquirtBluetooth file transfer
fsutilshow and configure file system properties
ftypedisplay or change file types when matching file names
ftpFTP file sharing
gototransferring control to the specified line in the batch file
getmacdisplay of MAC addresses of one or more network adapters
gpresultGroup Policy information for a computer or user
graftabldisplay extended character set in Windows graphics mode
gpedit.mscLocal Group Policy Editor
gpupdateupdating settings for multiple group policies
hdwwizhardware installation wizard
icaclsdisplay, change, backup, restore ACLs for files and directories
iexpresscreating a self-extracting archive
ifconditional processing in batch programs (files)
ipconfigIP address information
joy.cplgaming devices
labelcreate, modify, and delete volume labels for disks
lodctrupdating registry settings related to counter performance
logmanManaging Alerts and Performance Logs
logoffsession end
lpksetupinstall or remove Windows interface languages
lusrmgr.msclocal users and groups
magnifyMagnifier application launch
main.cplmouse properties
makecabarchiving files in a CAB archive
mdcreating a directory (folder)
mdschedrandom access memory checker
mkdircreate directory (folder)
mmsys.cplsound properties
modesystem device configuration
mofcomp32-bit compiler
moreserial data output in one-screen parts
mountvolcreate, view, and delete connection points
movemoving one or more files from one folder to another
mrinfomulticast messaging
mrtLaunch Malicious Software Removal Tool
msconfigsystem configuration
msgsending messages to the user
msinfo32system information
mspaintlaunch of the paint editor
msraWindows Remote Assistance
netnetwork resource management
ncpa.cplnetwork connections
netstatdisplay protocol statistics and current TCP / IP network connections
netplwizuser account management
notepadlaunch Notepad
odbcconfODBC driver setup
openfileslisting of open files and folders opened in the system
optionalfeaturesenable or disable windows components
osklaunch on-screen keyboard
pathoutput or set the path to search for executable files
pausepause batch file execution, message output
perfmonsystem monitor
resmonresource monitor
popdrestore previous value of current folder saved by pushd command
promptchange windows command line
pushdsaving the current directory and then changing the directory
pingsending packets to the specified address
powercfgsystem power management
printprint text file
qprocessprocess information display
qwinstaDisplay Remote Desktop Services Session Information
rddirectory removal
recoverrecovery of saved data on a damaged disk
recdisccreate Windows recovery disk
regteam for working with the registry
regeditRegistry Editor
remputting a comment in a batch file or in a config.sys file
renrenaming files and folders
renamerenaming files and folders
rmdirdirectory removal
replacefile replacement
rstruirestore Windows from system restore points
runasto use applications on behalf of another user
rwinstaresetting the equipment subsystems and session programs to the initial state
secpol.msclocal security policy
services.mscservice
setoutput, set, and delete Windows environment variables
setlocalstart of local environment changes in a batch file
scdisplay and configuration of services (background processes)
sfcchecking the integrity of all protected system files and replacing the wrong ones
sigveriffile signature verification
shiftchanging contents of replaceable parameters for batch file
sluiWindows activation
sndvolvolume mixer
startlaunch the specified program or command in a separate window
schtaskslaunching programs and executing commands on a PC on a schedule
sdbinstcompatibility database installer
shutdownrestart or shut down the computer
sortsorting program
substmapping the drive name to the specified path
sysdm.cplsystem properties
systeminfooperating system configuration information
taskkillforced termination of a process or application
tasklistShow all tasks currently running, including services
taskmgrTask Manager
tcmsetuptelephony client installation
timeview and change the current time
timedate.cpltime and date setting
titleassignment of the title of the current window of the command line interpreter
tracerttrace route to the specified node
treegraphical display of the structure of a given disk or folder
tsconjoin a user session to a remote desktop session
tsdiscondisconnect Remote Desktop Services session
tskilltermination of the process
typetext file output
typeperfdisplay performance information on screen or in a log
utilmanaccessibility center
verWindows version information output
verifierdriver check manager
verifysetting the verification mode in Windows to correctly write files to disk
voldisplay label and serial number of the volume for the disk
vssadmincommand-line tool for administering the volume shadow copy service
w32tmshow current settings for displaying time zone
winverWindows version information on screen
wmicWMI toolkit information in the interactive shell
writeWordPad text editor
wscui.cplsafety and service center
wusastandalone update installer
xcopycopy files and folder tree

Conclusions of the article

The command line in the Windows operating system allows the user to control the computer without using a graphical interface. To perform certain actions on a PC, you must enter special commands into the command line interpreter. This article has published a table with a list of the most requested commands for the Windows command line.

Основные команды командной строки

DIR — сокращение от Directory , эта CMD команда для новичка выводит список всех файлов и папок в определенном каталоге. А также их размер, расширение и свободное пространство, оставшееся на диске. The command can be changed using additional parameters, such as DIR / p (displays a list of pages), DIR / q (displays information about the site owner), DIR / w (displays a list in an extended format with a maximum number of files in one line), DIR / d (displays the list in an expanded format, divided by columns), DIR / n (displays a long list in one line), DIR / l (displays an unsorted list of directory names and file names in lower case), DIR / b (displays a list of files without additional information). DIR / s lists the files and directories of this directory, as well as all subdirectories. By entering DIR /? , you will see a list of all available options.

The CD or CHDIR (Change Directory) command is intended to change the directory. The team performs several operations. The CD takes you to the very top of the directory tree. CD .. moves you to the parent directory relative to the current one. CD directory_name moves you to this directory. Enter a CD to display the name of the current directory.

MD or MKDIR (Make Directory) allows you to create a directory (folder). To create a directory, use the following syntax: MD directory_name.

CLS clears the screen. This CMD command on Windows is used if the command line emulator is populated with a list of commands and their operations.

EDIT file-name allows you to modify the contents of a file.

The DEL command allows you to delete one or more files. Alternatively, you can use the ERASE command. Use the DEL filename syntax to delete a file.

If you want to delete all files with a specific extension, then enter DEL * .doc, and all files with the doc extension will be deleted from the current directory. DEL *. * Deletes all files from the current directory, so be careful with this command.

RD or RMDIR - you can use this command to delete a folder, but the folder should be empty. The syntax is pretty simple. Enter RD FolderName. If you want to delete a folder that is not empty, you can use RD / S folder_name. Be careful with this command, as it deletes the folder and all its contents without recovery.

RENAME, or REN renames a file or directory. The syntax for this computer control CMD command is: RENAME current-name new-name. For example, if you want to rename a file named iPhone.txt to iPad.txt, enter RENAME iPhone.txt iPad.txt.

MOVE allows you to move one or more files from one directory to another. For example, if you want to move the 1.txt file located in the current directory to a folder named Numericals inside the current directory, enter MOVE 1.txt Numericals.
If you tried to rename a directory (folder) using the RENAME command in the above way, then you know that this does not work. The MOVE team will help us with this, as it can also be used to rename directories. Enter MOVE current-name new-name, where the current name is the name of the directory in the current folder.

The COPY command allows you to copy one or more files from one place to another. The command allows you to combine files of the same type. Let's look at various examples of using the COPY command:

  • COPY file-name folder-name will copy file file-name to an existing folder,
  • COPY file-name new-file-name creates a copy of the file with a new name,
  • COPY * .doc Word copies all files with the extension .doc to a folder named Word.

The CMD XCOPY main command is for files and directories, including subdirectories. The easiest way to use it is to copy all files from one drive to another. Syntax: XCOPY Source-drive: Destination-drive: / e, where the / e option allows you to copy all subdirectories, even if they are empty. Use / s to prevent copying empty directories. You can use the folder names of the source or destination drive to simply copy the entire contents of one folder to another.

Additional teams

The FORMAT command in CMD allows you to erase information from the hard drive or prepare it for copying data if you installed a new disk. The syntax for using the command is: FORMAT drive:. If you want to reformat a particular drive to a specific file system, you can do this with the command: FORMAT drive: / FS: file-system, where file-system can be: FAT, FAT32 or NTFS. After applying the command, all data from the disk will be erased without a trace.

FC - used to compare two files with each other. Suppose you have two files gadgets360_1.txt and gadgets360_2.txt. To compare them, you need to enter the following command: FC gadgets360_1.txt gadgets360_2.txt.

IPCONFIG displays detailed information about network settings: the IP address, and also reports the type of network connection of your computer (using Wi-Fi or Ethernet). Enter IPCONFIG / ALL to get an overview of all network settings, including which DNS servers you are using. Enter IPCONFIG / RENEW to get the new IP address from the DHCP server. This can help if you are having problems connecting to the internet.

CMD ping command - if you are not sure if the site you want to visit is available, enter PING followed by an IP address or domain name. For example, PING google.com. If Destination Net Unreachable appears on the screen, you may not have an internet connection. If Host is down or Request timeout messages appear, the site may not be available. If everything is ok, you should see something similar to this: 64 bytes from 173.194.36.73: icmp_seq = 0 ttl = 56 time = 118.355 ms.

The SHUTDOWN command may come in handy if the Shut Down button on the Start menu does not work due to malware. To shut down the computer (for Windows), enter Shutdown / S. To restart the computer - Shutdown / R.

CHKDSK - CMD command is used to check if your operating system can read the hard drive or any other media correctly. Command syntax: CHKDSK C: - replace C with the drive letter you want to check. Enter CHKDKS /? to see other options.

This publication is a translation of the article "CMD Commands Every Windows User Must Know", prepared by the friendly team of the project Internet technology.ru

Pin
Send
Share
Send
Send