Windows.  Viruses.  Notebooks.  Internet.  office.  Utilities.  Drivers

Recently, I have grown from a fierce enikey into a very big company, to a modest system administrator overseeing a network of 10 PCs. And, as a very lazy system administrator, he faced the tasks of automating his activities. Six months ago, I did not know that there were pipelines in the Windows command line. This was the first shocking discovery. And I went further, and it turned out that where I used to write utilities in C#, Delphi or bulky scripts with nested loops, I could do with a couple of forfiles or robocopy commands.
I will not talk about platitudes, such as listing files and folders with the Tab key. Under the habrakat, I’ll tell you about what can be useful for novice admins and enikeys.

Hotkeys
Let's start with hot keys, because first we need to study what the working environment can give us.

F1- In the console, this key works exactly like the right arrow, i.e. displays one character from the last entered (or selected in the history) command.
F2+<символ> - Displays the last command typed up to the specified character. For example, if the last command you entered looked like this:
ping 192.168.25.1
then after pressing the key combination F2+5 You'll get:
ping 192.168.2
F3- Displays the last, and only the last, command in the history in its entirety.
F5- Displays the last entered commands in order, as well as the up arrow.
F6- Inserts an EOF character at the current position command line, which is the same as pressing Ctrl + Z.
F7- Dialog box containing command history.

Alt+F7- Clears command history.
<символ(ы)>+ F8- Iterates over commands that begin with characters already entered on the command line.
If before pressing F8 do not enter anything, then this key will work like the up arrow, but with a slight difference - the lines will be searched cyclically, i.e. after the first command from the list, the last one will be displayed.
F9+<число> - Inserts a command from the history under the corresponding number. For example, in the situation shown in the screenshot above, when you press the combination F9+4 will appear in the console:
ipconfig

Command Line Operators
I, a long time ago, when I was little, did not even imagine how you can work in the console without a graphical interface. After all, the output of commands sometimes takes dozens of pages, and if you need to select some data from there, then page-by-page output will not save. But one day I installed FreeBSD on an old computer, opened a handbook, and my head just went round from the opportunities that opened up. There you can redirect the output of a command to the input of another command, and this is called a pipeline.

The pipe operator in *nix and cmd is the pipe character.
For example, the output of all text files in the current folder will show the command
dir | find ".txt"

Command Concatenation Operator
&
Example: Command1 & Command2 - Command1 will be executed first, and only then Command2
AND operator
&&
Example: Command1 && Command2 - Command2 will only be executed if Command1 succeeded.
OR operator
||
Example: Command1 || Command2 - Command2 will only be executed if Command1 failed.

Parentheses are used to group commands, examples are:

  • (Command1 & Command2) && Command3 - If Command1 and Command2 succeed, Command3 will be executed.
  • (Team1 & Team2) || Command3 - If Command1 and Command2 fail, Command3 will be executed.

Thank you for your attention! I welcome criticism and suggestions...

UPD1
For those who are not in the subject, the circumflex (this "^" sign here) means pressing a key with Ctrl (^C = Ctrl + C).

^C - Interrupts the command, well, everyone knows that.
^S - Pauses the execution of the command, and then starts.
^I - Similar to Tab, iterates over folders and files.
^M - Analogue of Enter.
^H - Similar to Backspace.
^G - By writing the command echo ^G in a batch file, you can pick the system speaker (speaker).
(Commands ^I and ^H , obtained by me by the method of "scientific poke", there is also ^J but I don't know what it does)

P.S. Other subtleties of the command Windows strings, have already been repeatedly covered on Habré. And I do not see the point of copy-pasting.
P.P.S. Links to interesting posts and articles on other Windows command line features.

Windows to communicate with a computer in a language it understands. However, programs are still launched using the usual command line (console). It is the ancestor of the interface and a means of communication between the user and the PC. The essence of the work is that commands are entered into a line using the keyboard. This control method is often used system administrators. Regular users should also know the basic commands.

Console - what is it?

launch Windows programs carried out using the console - command line. This is one of the types of text interface that has become available to many MS DOS users. Commands are entered on the command line manual mode. The console is considered by many to be an obsolete way of managing that users and system specialists often need. The command line is a black window with a green location label and a blinking cursor. The corresponding command for the computer is entered in the specified place.

The command line is an incredibly handy window for solving a lot of problems. However, to interact with the console, you will need knowledge of writing commands. The advantage is that they reduce the time to complete complex actions. To do this, just enter the desired task in the line.

Why are commands needed?

Commands for the command line are necessary to establish user contact with the operating system and computer. Working with the command line is an urgent need for specialists who deal with system administration. The console is a small part of what can be used as a tool to work with Windows. The command line is convenient, fast, with its help it is easy to solve many issues. To work with it, you will need knowledge of teams and skills that will lead to a positive result.

CMD - there are a lot of commands. Practicing will help you remember the main ones. With the help of commands, you can change, edit files, create, restore partitions, configure, start, restart the computer, delete folders, copy, and much more. Experts advise making a list of important commands in alphabetical order in a notebook. It is convenient and helps to quickly navigate.

How to start?

Commands for the Windows command line run without much difficulty. Despite the graphical interface, the console has always been and is the main control element of the computer. The basics of working with the console will be useful to the average user. To start the command line, open the menu: "Start" - "Run". Enter the word "Cmd" in the window that appears, press "Enter". If in the version operating system there is no "Run" item, then the combination "Win + R".

In Windows 7, click right click mouse on "Start", go to "Properties" - "Customize", check the box next to "Run". If you want to open the console as an administrator, type "Cmd" in the "Start" search bar, right-click on the "Cmd" program, select "Run as administrator". It is convenient to create a shortcut on the desktop that will open the console. The appearance of the line window can be changed at the request of the user (color, font, location).

Sometimes you may have problems copying and pasting text into the command line. In the case of the console, the clipboard buttons do not work. If you want to make a copy, right-click on the window, select "Mark", select the text with the left mouse button, and then right-click. To paste text or caption, right-click on the "Paste" command prompt window. In addition, you can work with the console using "hot" keys on the keyboard, the "up / down" arrows.

Main

The main commands for the command line help the user to solve tasks of paramount importance in a short time.

Additional

The list of commands, which is auxiliary, is often used by system specialists to work with information located on the hard drive.

  • The "Format" command deletes data from the hard drive, prepares it for copying. As an example of a formatting command: "FORMAT drive:/FS:FAT (file system)".
  • "FC" command compares files with each other.
  • "IPCONFIG" - shows full information about the Network settings, and also informs about the type of network connection "IPCONFIG / ALL".
  • The "PING" command will check the availability of the site. Example: "PING fb.ru". The presence of numbers in the answer indicates that everything is in order, the site is available for visiting.

Network Commands

The command-line commands for the Web allow you to efficiently surf the Internet, fix errors, and configure settings. If you need to know your IP address, enter the "ipconfig" command in the console. In different variations of the Internet connection, you can find out complete information about the Network. After entering, the user will receive a list of network connections that are used by the computer. If the user's computer is connected to the Internet via wireless communication Wi-Fi, the main gateway will be selected to communicate with the router. The user can access its settings through a command entered into the console. If the computer is connected to local network, you can find out about the IP address through the command line with the appropriate request.

Using the "Ping" and "Tracert" commands, the user will quickly find and fix problems in the Internet and browser. The "netstat -an" command displays network connections and ports. This is a very useful program, because it displays various network statistics. The "-an" switch opens a list of available network connections, ports and IP addresses. The "Telnet" command connects to the servers of the same name. If you need to get information about network settings, use the "Ipconfig" command. Without additional parameters, the command displays information about the IP address. If you need specific information, complete the "All" command. Entered in the line "Ipconfig / flushdns" - clears the cache in Windows.

Filters

Filters are command line commands that are used with the channel redirect character. They are needed to sort, view and select information from other teams. Filters organize, divide, highlight part of the information that passes through them. These commands include the following:

  • "More" - displays the contents of the file;
  • "Find" - searches for the specified characters;
  • "Sort" - sorts files alphabetically.

In order to send data from the file, the symbol "L" is used, to direct the channel to the output "I".

Shutdown

In addition to the built-in CMD, the console is used to run regular programs. In order to enter it, just type the desired combination of letters in the "Run" window. If you need to view the results, it's better to use a string. "SHUTDOWN" is a command that terminates Windows work if for some reason the Start button does not work. It will come in handy if the computer is performing a task that cannot be interrupted (and the user needs to leave and not leave the computer turned on for for a long time). The device will automatically turn itself off when the work is completed. It's better than setting a timer.

Type the following command "Shutdown-s-t-1300", press "Enter". The numbers are the time in seconds after which the device will turn off. The command to restart the computer from the command line is as follows: "Shutdown-r". Click "Confirm" to activate. The "At" command - starts the PC at the time specified by the user. This utility reads and groups jobs in the Windows operating system.

Formatting

The list of commands for the console is huge. Many of them are harmless and simple, but there are special ones among them that require caution on the part of the user. Be careful! Sometimes it is necessary to completely format a disk or flash drive. The command to delete all data looks like this: "Format C", auxiliary parameters "/fs" - determine the location of the file system of the formatting disk, "/v" - sets the volume label, "/a" - cluster size. Do not execute the format command if you are not sure of your actions and do not know why this is necessary. The command deletes all information from the PC!

Examination

Some command line commands are designed to check disks for system errors. The "CHKDSK" command without additional parameters displays information about state of hard disk. If errors are found, additionally enter "/f" to correct them. Before checking a disk, block it. If the console is full of commands, type "c/s" into the line to clear the screen.

System files will be checked by the "Sfc" command. It can be used to recover damaged files. The command is supplemented with the parameters "/scannow", "/scanonce", "/scanboot", which check and fix system errors in files.

Other

It is not possible to know all the commands of a line, but some of them will be useful to the user. For example, the "Assoc" command changes the association between extension and file type. If the user wants to know detailed information about the operating system and the state of the computer, he should type "Systeminfo". Using the editor system registry"Regent" can be changed hidden settings OS. However, if you do not know what's what, it is not recommended to do this because of the risk of breaking Windows. Calling the system configuration - special service is easy by typing "Msconfic" at the command line. If you want to learn more about the commands, write "Help" in the console line, taking into account that the seventh or eighth version of Windows acts as the operating system.

TO useful commands for the user, experts include network, system and filters. The "At" command consists of a whole set of commands that are used to install, reinstall, configure the modem. It is also considered the planning team. With its help, you can change, cancel, set up tasks for remote or local computer. In operating system Windows is better use the "SCHTASKS" utility instead of the "At" command. Its possibilities are much wider.

Most users personal computers do not face the need to use any CMD command. Many simply lack the functions provided by the visual shell of the operating system. However, there are situations when you have to manipulate the system directly, and that's when the command line comes to the rescue.

What is command line

This software, which is part of the standard programs of the system. CMD gives the user the ability to work with the system and files directly. The application has a text interface, and the result of the execution is displayed on the screen. Simply put, the command line translates user requests into a form that the system can understand. Outwardly, of course, the program does not look very familiar to a simple user, but at the same time it has a number of positive properties, and besides, it is faster than the visual component. built into every version of the Windows operating system.

Ways to start the command line

The developers of the operating system have provided several options for launching CMD:

  • Go to start menu/ standard programs/ then select "Command line" in the list.
  • Go to the Start menu, select "Run", in the window that appears, enter CMD.exe in the line. You can also call the "Run" window using the Win + R key combination.
  • Go to system folder C:\Windows\system32 and select the CMD.exe program.

Most of the most important commands can be accessed using the Help command. After entering given request Windows CMD commands will appear with information on how to use them. All of them can be divided into several fairly large groups. Their separation occurs according to the principle of application. For example, cmd commands run used commands. Below are the most common ones. They are also the most necessary commands CMD lines.

Basic commands for working with system directories

This list of commands will come in handy if you need to access folders located in the system:

  • Dir - Provides the ability to view folders as a list. With additional command-line criteria, you can sort directories by a number of options.
  • RD - provides the ability to remove an unnecessary directory. With additional options, you can set deletion criteria: for example, delete several folders at once.
  • MD - the command creates a new folder (catalog). Various options allow you to create different types of directories.
  • CD - provides the ability to move from one directory to another, in some cases you will need to use quotes.
  • XCopy - used to copy folders without changing their structure. Unlike Copy, this one has more advanced command capabilities. Through CMD with this request, you can perform quite flexible operations.
  • Tree - provides the ability to display directories in graphical form. By default, the display occurs through pseudographics.
  • Move - used for both moving and renaming a directory. The command makes it possible to move several folders at a time.

Basic commands for working with files

These CMD file commands can be useful for many personal computer users:

  • del - command used to delete. Can be used to delete one or more files. In addition, it is possible to delete read-only files;
  • edit - the command launches a text editor;
  • ren - allows you to rename a file. You can also use rename;
  • move - used to move and rename a file;
  • copy con - allows you to create a new file;
  • fc - allows you to compare what is in two files. The result of the work is the appearing characters that give information about the status of the comparison;
  • type - applicable for text documents. The execution of the command is to display the contents of the file on the screen;
  • copy - allows you to copy as well as merge files.

Commands for diagnosing the hard drive computer and system

In addition to all the above advantages, CMD commands allow you to check for errors in the work hard drives or change volume labels, as well as do defragmentation.

  • Compact - the command allows you to display and configure compression in the NTFS file system. This command can save a lot of disk space.
  • Format - formats a disk or floppy disk. Please note that formatting will result in complete removal all data on the media.
  • Chkdisk - checks and displays information about the media. The command will help you find out about the occupied space, the amount of space on bad sectors, and so on.
  • fsutil - Provides information about the file system and allows you to make changes to it.
  • Chkntfs - allows you to display and configure during Windows startup.
  • Convert - allows you to convert a volume from one file system to another. You cannot change the type of an active volume or disk.
  • Recover - command to recover data from damaged media. This process occurs by reading one sector after another. Reading occurs only from those sectors from which it is possible to read. Data located in physically damaged sectors will not be recovered. Most often restored, thus, text documents from damaged diskettes.
  • Diskpart - allows you to open disk information and make the required settings.
  • Vol - provides information about serial number hard drive.
  • Label - used to view and edit volume labels. Please note that the volume name can contain no more than 11 characters, and NTFS 32 characters.

Information commands

This type of command will help you get information about versions, configurations, and installed drivers:

  • ver - provides information about the system version using the CMD command, Windows 7 also supports this request;
  • driverquery - allows you to view information about installed drivers; The display can be in the form of a list, table or CSV;
  • systeminfo - Provides information about system configurations. Configurations can be viewed both locally and on the same command provides properties about service packs.

processes and applications

Commands for managing and changing operating system settings:

  • shutdown - the command is used to shut down, restart or put the computer into sleep mode. If the user has the necessary rights, it is possible to carry out settings remotely;
  • time - used to display and change the current time;
  • date - used to display and change the current date;
  • tasklist - provides the user with a list of processes currently running on a local or remote personal computer;
  • schtasks - allows you to create, configure or delete scheduled tasks in the operating system. In the graphical interface, the command is represented by the "Task Scheduler" program;
  • taskkill - used to terminate processes by identifiers or names executable files. The tool started with Windows XP.

Commands to customize the command line

This group of commands refers directly to setting up CMD. Commands will help clear the screen, change it appearance and so on:

  • Exit - allows you to close batch data or completely close the command line.
  • Color - provides the ability to change the background color or font in the command line window. The color is given by a hexadecimal digit. The most significant bit indicates brightness, and the subsequent bits indicate color. The default is white letters on a black background.
  • Title - allows you to change the title of the CMD.exe window.
  • CMD - allows you to launch a new Windows command line interpreter window. Usually the need for this command arises when you want to predefine the actual CMD settings.
  • Prompt - allows you to change the command line greeting. If you use the command without parameters, then the prompt text will look like: current drive, directory, and greater than symbol.

CMD network commands

For most users, the need for these requests is extremely rare, but professionals believe that these codes are very helpful when working with a computer:

  • getmac - command provides information about hardware addresses network adapters. At the same time, you can find out both local and remote addresses;
  • netsh.exe - the command performs the opening of another line. With it, if necessary, you can configure the network. Many advanced users consider this program indispensable. To get help about commands, you need to write it with a question mark;
  • ipconfig - allows you to get information about protocol settings. Sometimes the command allows you to update the data in automatic mode. Older operating systems may not support this CMD command;
  • nbtstat - the main purpose of the command is to display NetBt information. in addition, names and contents are displayed;
  • netstat.exe - This command displays information about connections. The output data allows you to see all the information related to

It is worth remembering that, in addition to these network commands, there are some more that will help simplify the work of users. It should be remembered that these commands should be used only when there is confidence in the action being performed. Misuse of CMD commands can lead to serious problems in the operation of a personal computer.

List of useful commands

In addition to the above commands, there are still a huge number of others:

  • break - the command allows you to enable processing of the CTRL + C keys;
  • debug - launches a tool for debugging and other changes to software products;
  • devcon - the command launches a tool that is an alternative to the task manager;
  • exe2bin - the command converts exe applications to binary format;
  • hostname - provides the ability to get the name of the computer;
  • logoff - the command shuts down the Windows system.

All the above CMD commands will make it easier to work with some software tools. The main thing is not to try to use requests for other than their intended purpose in order to avoid the loss of important information and other undesirable consequences.

In Windows 7, there are some operations that are impossible or difficult to perform through a regular graphical interface, but they can be done through the "Command Line" interface using the CMD.EXE interpreter. Consider the main commands that users can use when using this tool.

With the help of commands in the "Command line" various utilities are launched and certain operations are performed. Often, the main command expression is used along with a number of attributes, which are written through a slash ( / ). It is these attributes that initiate the execution of specific operations.

We do not set ourselves the goal of describing absolutely all the commands used when using the CMD.EXE tool. To do this, one would have to write more than one article. We will try to fit on one page information about the most useful and popular command expressions, dividing them into groups.

Launching System Utilities

First of all, let's look at the expressions that are responsible for launching important system utilities.

CHKDSK- launches the Check Disk utility, which checks the computer's hard drives for errors. This command expression can be entered with additional attributes, which, in turn, trigger the execution of certain operations:

  • /f– disk recovery in case of detection of logical errors;
  • /r– restoration of drive sectors in case of detection of physical damage;
  • /x– disable the specified hard drive;
  • /scan– proactive scanning;
  • C:, D:, E: …— specifying logical drives for scanning;
  • /? – call for help about the operation of the Check Disk utility.

SFC- launching the Windows System File Integrity Checker utility. This command expression is most commonly used with the attribute /scannow. It launches a tool that checks OS files against standards. In case of damage, if installation disk it is possible to restore the integrity of system objects.

Working with files and folders

The next group of expressions is designed to work with files and folders.

APPEND– opening files in a user-specified folder as if they were in the desired directory. A prerequisite is to specify the path to the folder to which the action will be applied. The entry is made according to the following pattern:

append [;] [[computer drive:]path[;...]]

The following attributes can be applied when using this command:

  • /e– recording a complete list of files;
  • /? - start help.

ATTRIB– the command is intended for changing the attributes of files or folders. Just like in the previous case, a prerequisite is to enter the full path to the object being processed along with the command expression. The following keys are used to set attributes:

  • h- hidden;
  • s- system;
  • r- only for reading;
  • a- archival.

In order to apply or disable an attribute, the sign is placed before the key, respectively. «+» or «-» .

COPY- used to copy files and directories from one directory to another. When using the command, it is obligatory to specify the full path of the copy object and the folder to which it will be performed. The following attributes can be used with this command expression:

  • /v– checking the correctness of copying;
  • /z– copying objects from the network;
  • /y– rewriting of the target object in case of a coincidence of names without confirmation;
  • /? Help activation.

DEL– deleting files from the specified directory. The command expression provides for the possibility of using a number of attributes:

  • /p– enabling deletion confirmation request before manipulation with each object;
  • /q– disabling the request when deleting;
  • /s– deleting objects in directories and subdirectories;
  • /a:— deletion of objects with the specified attributes, which are assigned using the same keys as when using the command ATTRIB.

RD- is an analogue of the previous command expression, but deletes not files, but folders in the specified directory. When used, the same attributes can be applied.

DIR- displays a list of all subdirectories and files that are located in the specified directory. The following attributes are applied along with the main expression:

  • /q– obtaining information about the owner of the file;
  • /s– displaying the list of files from the specified directory;
  • /w- displaying a list in several columns;
  • /o– sorting the list of displayed objects ( e- by extension; n- by name; d- by date; s- to size);
  • /d– displaying the list in several columns with sorting by these columns;
  • /b– display only file names;
  • /a– display of objects with certain attributes, for which the same keys are used as when using the ATTRIB command.

REN– used to rename directories and files. The path to the object and its new name are specified as arguments to this command. For example, to rename the file file.txt, which is located in the folder Folder located in the root directory of the disk D, in the file file2.txt, you need to enter the following expression:

REN D:\folder\file.txt file2.txt

MD– designed to create a new folder. In the command syntax, be sure to specify the drive on which the new directory will be located, and the directory where it will be located if it is nested. For example, to create a directory folderN, which is located in the directory folder on disk E, enter the following expression:

md E:\folder\folderN

Working with text files

The next block of commands is designed to work with text.

TYPE- displays the contents of text files on the screen. The required argument of this command is the full path to the object, the text of which should be viewed. For example, to view the contents of the file.txt file located in the folder Folder on disk D, you need to enter the following command expression:

TYPE D:\folder\file.txt

PRINT- print content text file. The syntax of this command is similar to the previous one, but instead of displaying the text on the screen, it is printed out.

FIND– searches for a text string in files. Together with this command, the path to the object in which the search is performed, as well as the name of the searched string, enclosed in quotes, must be indicated. In addition, the following attributes apply with this expression:

  • /c– displays the total number of lines containing the search expression;
  • /v- output lines that do not contain the search expression;
  • /I– search is case-insensitive.

Working with accounts

Using the command line, you can view information about system users and manage them.

FINGER– displaying information about users registered in the operating system. The required argument of this command is the name of the user about which you want to get data. Alternatively, you can use the attribute /i. In this case, the output of information will be produced in a list variant.

TSCON- Attaches a user session to a terminal session. When using this command, you must specify the session ID or name, as well as the password of the user to whom it belongs. The password must be specified after the attribute /PASSWORD.

Working with processes

The next block of commands is designed to control processes on the computer.

QPROCESS- providing data on running processes on the PC. Among the output information will be the name of the process, the name of the user who launched it, the name of the session, ID and PID.

TASKKILL– used to terminate processes. The required argument is the name of the element to be stopped. It is specified after the attribute /IM. You can also terminate not by name, but by process ID. In this case, the attribute is used /PID.

Networking

Using the command line, it is possible to control various actions on the network.

GETMAC- starts displaying the MAC address of the connected to the computer network card. If there are multiple adapters, all their addresses are displayed.

NETSH– initiates the launch of the utility of the same name, with the help of which information about the network parameters is displayed and changed. This command, due to its very wide functionality, has a huge number of attributes, each of which is responsible for performing a specific task. For detailed information about them, you can use the help by using the following command expression:

NETSTAT– display statistical information about network connections.

Other commands

There are also a number of other command expressions used when using CMD.EXE that cannot be separated into separate groups.

TIME– view and set the PC system time. When you enter this command expression, the current time is displayed on the screen, which can be changed to any other on the very bottom line.

DATE- the command is completely similar in syntax to the previous one, but is used not to display and change the time, but to start these procedures with respect to the date.

SHUTDOWN- turns off the computer. This expression can be used both locally and remotely.

BREAK- disable or start the processing mode of a combination of buttons ctrl+c.

ECHO- displays text messages and is used to switch their display modes.

This is not a complete list of all commands that are used when using the CMD.EXE interface. Nevertheless, we tried to reveal the names, as well as briefly describe the syntax and main functions of the most popular of them, for convenience, dividing them into groups according to purpose.

In operating rooms Windows system 7.8 or 10 the command line is of course not as strong a tool as the system console in Linux. But nevertheless, it can do a lot and, if used correctly, it is also a very good help in the work of both a professional and a beginner. To start it, just click the "Start" button and type the phrase "Command Prompt". In the results there will be a shortcut to launch the console. But you can do it faster - just press the key combination Win + R, in the "Open" line enter the command cmd and click on "OK".

After that you will see a black window with a blinking cursor. It is where directives must be entered. I will give a list of basic Windows command line commands.

List of Windows cmd line commands:

append is a command that allows you to open data files from the specified folder as if they were in the current folder.
arp- work with the ARP protocol table (Address Resolution Protocol)
assoc- work with associations: view or change file extension associations for applications
at- Windows Task Scheduler
attrib- change the attribute of the desired file
bcdboot is a system utility used to create a system partition or restore a boot environment on a system partition that is created by copying a small set of boot environment files from an installed image. In other words, the command starts copying to system partition boot files and create a new boot configuration (bcd)
bcdedit- editing configuration Windows boot(bcd)
bootcfg- changing the boot parameters of the operating system in the boot.ini file
bootsect- work with boot sectors to ensure that the ntldr or bootmgr bootloaders work
cacls- editing file access control lists (in other words, creating an ACL - Access Control List)
call- call from batch file subroutines or other batch files
cd- change the current directory (short for Change Directory)
change— change the terminal server settings. Contexts - logon, port, user. Similar commands:

Chglogon-chgport-chgusr

chcp- view or change the current code page
chkdsk- a disk check utility (short for Check Disk)
chkntfs- file check NTFS systems error detection and disk check management at OS boot
choice- this command allows you to add an element of interactivity to the batch file, implementing user input in a batch file.
cipher- work with file encryption
clip- redirecting the output of the command line to the Windows clipboard
cls- clearing the contents of the console screen in the command line
cmd or command- launching another copy of the MS-DOS command line
color- access to change the background and text color in the console window
comp- comparison of the contents of the specified files
compact- work with compression and decompression of files in NTFS partitions
convert— converting the disk file system from one file system to another. For example, from FAT to NTFS.
copy- command line command to copy files and directories
date- display or change the current date on the computer
debug- start the Windows debugger
defrag- launch system application for disk defragmentation
del- deleting the selected file or several files at once
devcon- device management through the command console
diantz- creating .cab archives. An analogue of the makecab command.
dir- display a list of files and directories
diskpart- system utility for managing disk partitions
dokey- editing and recall Windows commands, the use of macros.
driverquery- display information about the drivers installed in the system.
echo- displaying text on the console screen
edit- console text editor
endlocal- end of local changes environment variables in batch file
erase- deleting the specified files (analogous to the del command)
esentutl- Extensible Storage Engine database maintenance application for Windows
event create- writing a message to the Windows event log
exit— exit from a running utility, procedure, or batch file
expand- unpacking compressed files with the CAB extension.
extract- content extraction, unpacking CAB files in Windows (EXTRAC32)
fc- compare content in selected files
find- search for a string with a given character in a file
findstr- search for strings in files using regular expressions
for- a "for" loop for processing the results of executing other commands, lists, and lines in text files
forfiles- executing a specific command for each file in a given group
format- disk formatting
fsutil- management utility file system disk
ftp- built-in console FTP client
ftype- view and change file extensions and associated applications
getmac- a Windows console command that shows the physical addresses (so-called MAC addresses) of network adapters available on the computer (including WiFi)
goto- a command for organizing an unconditional jump in a batch file. Usually used with an "if" or "for" command.
help- Windows command line help
hostname- display the name of the computer on the network
icacls- access list management (acl)
if- operator conditional execution commands in a batch file
ipconfig- view information about the parameters of network adapters and manage the configuration of the IP protocol
label- editing disk volume labels
logman- work with the operating system performance monitor
log off- end the current user session
makecab- creating compressed .CAB files
meme- output help about memory usage in the console
md- creating a new directory (folder)
mklink- work with symbolic links to files and folders
mode- configuring system devices in the CMD environment
more- pagination of information or file contents
mountvol- manage volume mount points
move- moving files and directories
movefile- moving or deleting busy files on next reboot
msg— sending messages to active users in the system
nbtstat- display of statistics and cache of names of the NETBIOS over TCP / IP protocol (NetBT)
net- work with local network resources
netcfg- display and change the configuration of network components
netsh- command network shell Network Shell, which has advanced capabilities for working with network services
netstat- output statistics of active network connections
nslookup- view DNS data in the command line for the selected site or IP address
open files- management of files opened locally or via the network
path- change the search path for executable files
pathping- simultaneous route tracing and ping of each of the intermediate nodes with the ability to assess the quality of each of the route sections
pause- pause when executing a batch file in the console
ping- a test system utility for checking the availability of a host on a local network or the Internet
popd- return to the directory that was previously marked with the pushd command
pnputil- a utility for working with Plug-n-Play (PnP) device drivers
power cfg- configuring system power settings
print- printing a text file from the command line
prompt- change the prompt line in the console
pushd- save the current directory path
qprocess- showing the current state of processes
query- information about the current state of processes and user sessions (analogue of the qprocess and quser commands)
quser— reflection of information about user sessions
rasdial And rasphone- remote access session management
rd- deleting the specified directory (short for Remove Directory)
reagentc- administration of the Windows recovery environment
recover- recovery of files on a damaged disk
reg- command line utility for working with the Windows registry
regedit- import and export of Windows registry data
regsvr32- register or unregister DLL
regini- access control to registry keys
rem- comment in the batch file line
rename(ren) - rename files
replace- replacing or adding files in directories
reset- reset remote desktop session (RDP session)
rmdir- deleting a directory
robocopy- system utility Reserve copy and directory synchronization
route- work with the Windows routing table
runas- launch the specified application on behalf of another user (usually Administrator)
rundll32- registration DLL files and launch them as an application
sc- management Windows Services(short for Service Control)
schtasks- work with the task scheduler
sclist- list of operating system system services
set- setting and changing Windows environment variables
setlocal- setting local variables in a batch file
setx- utility for creating system variables
sfc- verification and recovery system files Windows
share- control access to files and folders from the local network
shift- shift input parameters for a batch file
- shutdown or restart the computer from the command line
sleep- time delay in batch file
sort- sort lines in the selected file
start- launching an application or a batch file through the console
subst- assigning a drive letter to a directory or canceling an already set assignment
systeminfo— display of complete information about the system
takeown- change the owner of a file or folder
taskkill— termination of active processes in the local system or on a remote computer
tasklist- display a list of running tasks, applications and Windows services
time- display and setting the current time
telnet- built-in Windows telnet client
tftp- built-in console TFTP client
timeout- delay in batch files
title- changing the title of the window of the running command interpreter CMD.EXE
tracert- tracing a route to a host on a local network or the Internet
tree- displaying the directory structure in the form of a "tree"
type- output to the console the contents of the specified text file
typeperf- display performance information
tzutil- work with time zones
ver- display the version of the operating system
verify- setting the mode for checking recorded files
vol- output the label data of the selected volume
vssadmin- Administration of the Volume Shadow Copy Service
wait for- forced waiting for a signal or action by the command
where- display the location of the files
whoami- display the name of the current user
windiff- comparison of the contents of the selected files
winrm - remote system management from the console
winrs- remote command line Remote Shell
winsat- system performance checker
wmic- execute WMI command
xcopy- copying files and folders

Note: All these commands can be used not only in the CMD.EXE interpreter, but can also be used as executable BAT files.

Examples of using CMD command line commands:

Working with the registry:
reg add - Add a parameter to the registry
reg compare - Compare parts of the registry.
reg copy - Copies from one section to another
reg delete - Deletes the specified parameter or section
reg export - Export part of the registry
reg import - Respectively import part of the registry
reg load - Loads the selected part of the registry
reg query - Displays the values ​​of a given registry branch
reg restore - Restores the selected part of the registry from a file
reg save - Saves the selected part of the registry
reg unload - Unloads the selected part of the registry

System:
shutdown /r 0 - immediate system reboot
shutdown / h 0 - immediate shutdown of the computer
systemInfo - will show a lot of useful information about the computer

Group and user management:
net localgroup group user /add- Add to the group "group", the user "user"
net localgroup group user /delete- Remove the user "User" from the group "group"
net send comp "Hi!"- send a message "Hello" to the computer user "comp"
net sessions- list of user sessions
net session /delete close all open network sessions
net use Z: \\computer name\folder\- connect as a network drive with the letter "Z:\" a folder on the specified remote computer
net user user /active:no- block the user "user"
net user user /active:yes- unlock the user "user"
net user user /domain- information about the user "user" of the domain "domain"
net user user /add- add user "user"
net user user /delete- delete user "user"

Net:
netstat -a- list of all network connections to the machine
nbtstat -A 192.168.1.2- the username of the user working on the remote machine with the IP address 192.168.1.2.

Calling system utilities, snap-ins and Windows management consoles:

Through commands on the command line, you can run any utilities and system programs of the operating system. Windows systems, including system snap-ins for managing disks, devices, group policies, etc. Simply enter the name of the desired object and press the Enter key.

appwiz.cpl - Add/Remove Programs
certmgr.msc - Certificate management console
ciadv.msc - Indexing Service
cliconfg - Configuring SQL Network Client
clipbrd - Windows Clipboard
compmgmt.msc - System Snap-in "Computer Management"
dcomcnfg - DCOM component management console
ddeshare - DDE shares (doesn't work on Win7)
desk.cpl - Managing screen properties
devmgmt.msc - Start Windows Device Manager
dfrg.msc - Disk Defragmenter
diskmgmt.msc - Disk Management Console
dxdiag - Diagnostic Tool
eudcedit - Personal character editor
eventvwr.msc - View system event log
firewall.cpl - settings of the built-in firewall (firewall) Windows
gpedit.msc - Windows Group Policy Editor
iexpress - IExpress2.0 Self-Extracting Archive Wizard
fsmgmt.msc - Working with shared folders
fsquirt - Bluetooth File Transfer
chkdsk - Console system program to check disks
control admintools - system snap-in "Computer Administration"
control netconnections - folder " Network connections»
control printers - Section "Printers and Faxes" of the control panel
control schedule - Windows Scheduler(Scheduled task)
control userpasswords2 - Account Management
compmgmt.msc - "Computer Management" system console
lusrmgr.msc - Master for working with local groups and users
mmc - create your own rig
msconfig - System Configuration Program. Management of startup, service startup, etc.
mstsc - Remote Desktop Connection
ncpa.cpl - Open the Network Connections folder (similar to control netconnections)
ntmsmgr.msc - Working with removable storage devices
odbccp32.cpl - Data Source Administrator
perfmon.msc - System Performance
regedit - Windows registry editor
rsop.msc - Snap resulting RSoP policies
secpol.msc - Local Group Policy Editor
services.msc - Manage Windows Services
sfc /scannow - System File Checker and Repair
sigverif — File signature verification
sndvol - Volume mixer. Sound volume control
sysdm.cpl - System Properties
sysedit - Editor of system files Boot.ini, Config.sys, Win.ini, etc.
syskey - Account Database Security
taskmgr - Start Windows Task Manager
utilman - Utility Manager
verifier — Verification digital signature drivers
wmimgmt.msc - WMI Management Instrumentation Service

If you notice an error, select a piece of text and press Ctrl + Enter
SHARE: