Windows 7 command line syntax. Who's in charge? Hotkeys and useful command line actions.

💖 Do you like it? Share the link with your friends

I recently grew from a fierce nerd in a very large company to a modest system administrator overseeing a network of 10 PCs. And, like a very lazy system administrator, I was faced with the task of automating my activities. Six months ago, I didn’t yet 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 had previously written utilities in C#, Delphi or cumbersome scripts with nested loops, I could get by with a couple of forfiles or robocopy commands.
I won’t talk about banalities, such as listing files and folders using the Tab key. Under the hack I’ll tell you about what can be useful for novice admins and enikeys.

Hotkeys
Let's start with hotkeys, because first we need to explore what the work environment can give us.

F1- In the console, this key works exactly like the right arrow, i.e. displays one character at a time from the last command entered (or selected in the history).
F2+<символ> - Prints the last command entered 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 its entirety.
F5- Displays the last commands entered in order, just like the up arrow.
F6- Inserts the EOF character at the current command line position, which is the same as pressing Ctrl + Z.
F7- A dialog box containing the command history.

Alt+F7- Clears command history.
<символ(ы)>+ F8- Iterates through commands that begin with characters already entered into 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 cycled through, i.e. after the first command from the list the last one will be displayed.
F9+<число> - Inserts a command from history under the corresponding number. For example, in the situation shown in the screenshot above, when you press the combination F9+4 the following will appear in the console:
ipconfig

Command Line Operators
A long time ago, when I was little, I couldn’t even imagine how you could work in a 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 you. But one day I installed FreeBSD on my old computer, opened the handbook and was simply dizzy with the possibilities 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 pipeline operator in *nix and cmd is the vertical bar character.
For example, outputting all text files in the current folder the command will show
dir | find ".txt"

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

Parentheses are used to group commands, examples:

  • (Command1 & Command2) && Command3 – If Command1 and Command2 are executed successfully, Command3 will be executed.
  • (Team1 & Team2) || Command3 - If Command1 and Command2 are not executed, Command3 will be executed.

Thank you for your attention! I'm waiting for criticism and suggestions...

UPD1
For those who are not in the know, circumflex (that “^” sign) means pressing the Ctrl key (^C = Ctrl +C).

^C - Interrupts the command, well, everyone knows that.
^S - Pauses the command and then runs it.
^I - Analogous to Tab, iterates through folders and files.
^M - Analogous to Enter.
^H - Analogous to Backspace.
^G - By writing the command echo ^G in a batch file, you can beep the system speaker (speaker).
(The commands ^I and ^H were obtained by me using the “scientific poke” method; there is also ^J but I don’t know what it does)

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

Why is there such chaos in the world? Yes, because the administrator of our system forgot to fulfill his duties. Or I just lost the list of cmd commands from our world. Although this is a somewhat original look at the existing order of things, it nevertheless reflects part of the truth we need: using the command line, you can easily restore order to your computer:

What is the command line

Command line is the simplest tool for managing your computer's operating system. Control occurs using a number of reserved commands and a set of text keyboard characters without the use of a mouse ( in the operating room Windows system ).

On UNIX-based systems, you can use the mouse when working with the command line.

Some commands came to us from MS-DOS. The command line is also called the console. It is used not only for administering the operating system, but also for managing regular programs. Most often, the most rarely used commands are included in this set of commands.

The advantage of using cmd basic commands is that it consumes a minimal amount of system resources. And this is important in case of emergency situations when all the computer’s powers are, one way or another, involved.

cmd implements the ability to execute and create entire batch files, which represent a specific order of execution of a number of commands ( scenarios). Thanks to this, they can be used to automate certain tasks ( account management, data archiving and more).

The Windows command shell for manipulating and redirecting commands to certain operating system utilities and tools is the Cmd.exe interpreter. It loads the console and redirects commands in a format that the system understands.

Working with the command line in the Windows operating system

Windows can do this in several ways:

Both methods involve running the console as the current user. That is, with all the rights and restrictions that are imposed on its role in the operating system. To run cmd with administrator rights, you need to go to the menu " Start» select the program icon and select the appropriate item in the context menu:


After running the utility you can get background information about commands and the format for writing them in the console. To do this, enter the help statement and click on “ Enter»:


Basic commands for working with files and directories

The most frequently used commands are:

  • RENAME – renaming directories and files. Command syntax:

RENAME | REN [drive/path] original file/directory name | final filename
Example: RENAME C:\Users\home\Desktop\tost.txt test.txt

  • DEL (ERASE) – used to delete files only, not directories. Its syntax is:

DEL | ERASE [processing method] [filename]
Example: Del C:\Users\home\Desktop\test.txt/P

By processing method we mean a special flag that allows you to implement a certain condition when deleting a file. In our example, the flag " P"includes displaying a permission dialog for deleting each file:


More details about the possible values ​​of the “processing method” parameter can be found in technical documentation on the Windows operating system.

  • MD – allows you to create a folder at the specified path. Syntax:

MD [drive:] [path]
Example:
MD C:\Users\home\Desktop\test1\test2

The example will create a subfolder test2 within the test1 folder. If one of the path's root folders does not exist, it will be created too:

  • RD ( RMDIR) – deleting a specific folder or all directories at a specified path. Syntax:

RD | RMDIR [process_key] [drive/path]
Example:
rmdir /s C:\Users\home\Desktop\test1\test2

The example uses the s flag, which will cause the entire branch of directories specified in the path to be deleted. Therefore, you should not use the rmdir command unnecessarily with this processing key.

In the next section, we'll take a closer look at network cmd commands.

Commands for working with the network

The command line allows you to manage not only the PC file system, but also its networking opportunities. Part network commands The console includes a large number of operators to monitor and test the network. The most relevant of them are:

  • ping – the command is used to monitor capabilities network connection PC. A set number of packets are sent to the remote computer and then sent back to them. The transmission time of packets and the percentage of losses are taken into account. Syntax:

ping [-t] [-a] [-n counter] [-l size] [-f] [-i TTL] [-v type] [-r counter] [-s counter] [(-j host_list | - k node_list)] [-w interval] [target_PC_name]

Example command implementation:
ping example.microsoft.com
ping –w 10000 192.168.239.132

In the last example of the cmd ping command, the request is sent to the recipient with the specified IP address. The waiting interval between packets is 10,000 (10 seconds). By default this parameter is set to 4000:


  • tracert – used to determine the network path to a specified resource by sending a special echo message through the protocol
  • ICMP ( Control Message Protocol). After running the command with parameters, a list of all routers through which the message passes is displayed. The first element in the list is the first router on the side of the requested resource.

Syntax of tracer cmd command:
tracert [-d] [-h maximum_hop_number] [-j node_list] [-w interval] [target_resource_name]
Example implementation:
tracert -d -h 10 microsoft.com

The example traces the route to a specified resource. This increases the speed of the operation due to the use of the d parameter, which prevents the command from attempting to obtain permission to read IP addresses. Number of transitions ( jumping) is limited to 10 by the set value of the h parameter. By default, the number of jumps is 30:



shutdown [(-l|-s|-r|-a)] [-f] [-m [\\PC_name]] [-t xx] [-c "messages"] [-d[u][p] :xx:yy]
Example:
shutdown /s /t 60 /f /l /m \\191.162.1.53

There will be a shutdown ( s) remote PC ( m) with the specified IP address ( 191.162.1.53 ) after 60 seconds ( t). This will force you to exit all applications ( f) and current user session ( l).

A few more necessary commands

When working with a PC, a few more commands from the huge list of cmd operators may come in handy. Here are some of them:

  • format – formats a CD in the drive whose name is specified in the parameters. Command syntax:

format volume

When writing the syntax of any command square brackets optional parameters are highlighted.

This is confirmed by the following command example:
format e : - the media in drive E will be formatted;

  • set – used to work with environment variables. This cmd command allows you to create, delete and assign a value to variables that can be used while working with the command line. Syntax:

set [] ] string]
Example:
set include=c:\inc

  • start – designed to launch the specified program or command in a separate window:

Example:
start notepad


Now, with the knowledge you have gained, you can not only control your computer, but also control the whole reality. All that remains is to launch the corresponding cmd instance. And not all commands described in the article may be suitable for managing “ a valid copy"of our reality.

Many people have probably encountered the command line when installing or launching some programs or games, when black windows with white letters and symbols running through them pop up. These windows were precisely command lines, and the information quickly running through them was nothing more than the execution of instructions from bat files. We will not burden a novice user with terminology that he does not understand, but we will explain what the command line is.

Command Prompt is a system application for operating system management that exists in the Windows OS family.

This article will talk about what the command line is for, how it can be launched in various Windows versions, how to type commands, and the basic setup of the program (interface) will also be described. In this article, I wanted to include a section on working with the Windows file system, but the text would have been too large and difficult to read, and therefore it was decided to include the section in a separate article: in this way, the topics raised could be covered in more depth and detail while maintaining the readability of the text .

As follows from the definition given above or from the very name of our utility, at the command line you need to enter special commands or even large instructions containing words and various character sets to interact with the operating system.

Previously, about thirty years ago, only a small number operating systems(and add-ons for them) had a graphical interface. Basically, then everyone - and ordinary users in particular - interacted with the “axis” through the so-called terminals, which included the command line. Terminal is a program with a text interface for entering commands that the computer understands (practically repeated the definition of the command line).

But why use the command line now if there is a beautiful and clear graphical interface? Yes, it would seem that the command line is a tool for professionals - system administrators, developers of operating systems and programs for them, and others interested - and for ordinary users a graphical shell has been created for convenient work. Of course, this is true to a greater extent, but for the average user it makes sense to use the command line.

What is the command line for?

Here are the reasons why the command line may be useful to you:

  1. Using the command line, you can access, first of all, difficult-to-access or completely inaccessible functions, as well as useful information and information about your computer and programs.
  2. Using the command line, you can diagnose your system for problems and errors.
  3. The command line is an essential tool for a user who does not have a mouse or similar input device and only has a keyboard. By the way, if you have problems with the mouse, then you can read the article about.
  4. The command line supports scripting: you can write scripts that will automate your work on the computer.

Of course, on the command line you can perform all the same actions as in graphical interface, in terms of functionality, it can do even more (in fact, the first point of the reasons is about this).

How to start the command line

IN different versions Windows has different ways to access the Command Prompt. Let's consider the general case in which the program can be run on all versions of Windows.

Running the command line in general

Let's call the command line from the system folder. The location of the utility is something like this: C:\Windows\System32\cmd.exe, where C is the name of the drive on which your operating system is installed.


There is also another way to launch the command line, which is available in all versions of Windows, starting with XP: simultaneously press the Win and R keys to call the Run system utility. In its only field, type “cmd” and click on “OK”.


All. As a result, the command line will launch.


Running the Command Prompt in Windows 7

Click on the "Start" button to open the start menu, and then on "All Programs". Go to Accessories and launch Command Prompt from there.

Running the Command Prompt in Windows 8

Call the side menu and click on “Search”. Type the phrase “command line” in the search bar and press the Enter key.

Actually, this method also works in Windows 7 - only here the search is in the start menu, which can be accessed by clicking on the “Start” button.

Basic command line setup

The appearance of the command line looks rather unattractive: the interface style is designed in a very ascetic spirit. Although, by and large, you don’t need any frills for the command line, especially since you get used to this view quite quickly. However, some interface customization can and should be done. Right-click at the top of the program window to call context menu(or type the combination Alt + Space) and select “Properties” in the list that appears.


In the first “General” tab, it makes sense to activate the “Mouse Selection” and “Quick Paste” options, which will allow you, respectively, to select text in the command line with the mouse (this cannot be done initially) and paste text by right-clicking anywhere in the program.

By the way, if you have selected some text on the command line and want to copy it, then you need to press Enter rather than apply Ctrl combination+ C - it doesn't work on the command line.

In the “Fonts” tab, you can, oddly enough, change the font and change the text size. The latter can be especially important, since not everyone is comfortable working with small letters.

In the "Layout" settings you can increase and decrease the buffer and window size. Screen buffer while speaking in simple language, is the size of the active part of the program. It can be increased too much in width or height, and then a scroll bar will appear. With the size of the window, I think everything is very clear.

In the “Colors” tab you can play around with color scheme command line and set the appropriate colors for your eye. Color adjustment is made in RGB format(Red, Green, Blue - red, green, blue), the value of each color is set in the range from 0 to 255.

You can also customize the colors of the popup window, which will be discussed later in this article.

How to type commands on the command line. Command Syntax

So, the command line with the underscore blinking is still standing in front of you, inactive. What can we do next? First, let’s find out the principle by which teams are recruited. And to put it briefly, they are typed according to approximately the following scheme: command name + parameters (optional) + command object (optional). Moreover, there can be several parameters and conditional objects. For example, when writing a command, you can specify several files (objects) to which it should be applied, and several parameters that will specifically affect the files or command. Don't be alarmed if you don't understand much - everything will become clear as you go along (and if not, you can always ask a question in the comments).

It would be nice to know what teams there are. To display a list of commands, type the word help (which, by the way, is also a command) and press Enter. A fairly long list of commands will be displayed, and it is worth saying that not all of them will be shown (you can find a list of all commands on the Internet).


Many commands have their own parameters. The parameters are specified by some characters, which are written separated by a space immediately after the command. Nothing is said about parameters in the “help” list itself: information about parameters is displayed in the description of an individual command. To display such a description, type the name of the command, then put a space, and then the combination /? . For example, to find out information about the parameters of the "attrib" command, write attrib /? .


Hotkeys and useful command line actions

We will describe some actions that can in some sense make working with the command line easier.

Key (combination) Action
and ↓ Using the , ↓ buttons, you can move through the conditional list of commands you previously entered: the “up” button moves you higher in the list, the “down” button, respectively, moves you lower. When you enter a new command, you can be said to be at the very bottom of the conditional list, and the very first commands are at the top.
F1 Allows you to type the last command entered character by character. Let's say you just entered the help command: you can restore it with four presses of the F1 key.
F2 Allows you to copy the text of the last introduced commands up to a specific character (copying is done from the beginning of the text) that you specify.


F3 Displays the last command entered.
F4 Trims text to a specific character. Characters are removed from the end of the entered command.


F5 Works similar to the key.
F7 Calls up a list of previously entered commands. The same pop-up window that was mentioned when setting up the command line will appear. You can now explicitly navigate through the list and select the desired commands. Please note that by pressing the Enter key on the selected command, you instantly call it: to display the command in a line and further work with it, click on the → button. To exit the list without selecting a command, press Esc.


F8 Calls up previous sets (variations) of the entered command. For example, if you typed cd , and previously typed cd C:\Windows , then you can press F8 , and then the path to the Windows system folder will be added.
F9 Allows you to call commands by their serial number. Suppose you know that the command you need is located in the 15th position in the list of entered commands, and to call it you press F9, type 15 and press Enter.


Tab Autocompletes input. Suppose you enter the path to a directory or file, but not completely: you can press Tab, and if you entered the previous characters correctly, the program will restore one of the path options. Yes, it doesn’t sound too clear, but let’s explain it with an example.

Let’s say you want to write the path to the “Example folder 2” folder, which is located in the “Program Files” directory, and next to this folder are the “Example folder 1” and “Example folder 3” folders. You type C:\Program Files\Example , and then you don’t want to add manually - then you use the Tab key, which on the first press will add folder 1 , on the second - folder 2 , on the third - folder 3 (plus spaces where necessary, of course ). Accordingly, you need to press twice.

Why did the folder "Example folder 1" appear first, and not, say, "Example folder 3"? Paths are compared character by character in the ASCII table, and preference is given to the character that appears earlier in the table. In our case, only the serial numbers of the folders differ from each other - “1”, “2”, “3”, and the smaller the number, the earlier it is located in this table.

Alt +F7 Clears the list of previously entered commands, which is called up by pressing F7.
Esc Clears the command line of the command you type. Why is this necessary? Let's say you type some long (or not so long) command, then realize you don't need it, and now don't want to waste time erasing it with the Backspace key. In this case, you can use the Esc key, which will instantly delete the text you type in the line.
Ctrl+C Aborts the execution or typing of a command. This combination can help if the command takes too long to execute (or is even in endless loop) or you need to interrupt it for some reason. When you type a command, the shortcut works exactly the same as the Esc key: you move to a new empty line input.
Home Moves to the first character of the command being typed.
End Moves to the last character of the command being typed.

Using cmd commands Windows can launch system utilities much faster than doing it the usual way. And, although not everyone understands the meaning of this text interface, considering it outdated, in fact the tool is quite useful.

And not only for professionals, but also for ordinary users. Although to run most commands, you should run the command line (cmd) as an administrator.

The need to use the command line

The cmd line, which is a standard tool on the Windows platform, is no different in different versions of operating systems - the seventh, the eighth, the tenth, and even XP. And all teams work the same way in each of them.

The advantage of using a line is that it speeds up the work - sometimes entering the desired command is much faster than searching for the corresponding file in the system folders. Moreover, to speed up work with CMD, a link to it can be displayed on the desktop - or even on the Quick Launch panel.

The disadvantages of the interface are:

  • manual command entry from the keyboard;
  • the need to run CMD as an administrator (most commands will not run otherwise);
  • a fairly large list of commands that are difficult to remember.

Externally, the command line is largely reminiscent of the DOS system interface. And, although it allows you to solve many more problems, some commands are the same as outdated platform. For example, “format”, “cd” and “dir”, necessary for working with folders and drives.

Working with the interface

Before you start working with the command line, you must first launch it. There are several ways to do this:

  1. Open the “Run” menu (pressing Win + R at the same time) and enter the cmd.exe command;
  2. Go to Windows folder on system disk, open the System32 directory and run the file called cmd.exe. You can simplify the task by creating a shortcut that launches the same application and install it on the desktop;
  3. Open the Start menu, go to the All Programs section, then to the Accessories subsection and find the Command Prompt.

You should know: After the first launch through the Start menu, CMD appears at the top of it - in the list of most frequently launched applications and utilities. And you can open a line while working in any application (even in a game), just by pressing the Win button on the keyboard.

Rice. 1. Command line of the Windows operating system.

The standard view of the command line is a black window with white text. If this option does not suit the user, he can change the colors depending on his preferences.

To do this, right-click on the top of the window and go to CMD properties. In the window that opens, you can select the location of the line, the colors of the text or window, and even the font sizes. Here you can expand the interface to almost the entire screen, increasing the level of convenience of working with it.

Rice. 2. Change command line settings

Commands to help you work with CMD

Hotkeys help make using the command line even easier - although they are not the same as usual Windows combinations. Instead of pressing the standard Ctrl + C and Ctrl + V typings, copying and pasting text is done as follows:

  1. Click on the selected line in open window CMD right mouse button;
  2. Select “Mark”;
  3. Select text using the left button;
  4. Right click again. After this, all information ends up in the operating system's clipboard.

In order to paste the copied information, press the same right button and select “Paste”. You can simplify copying data by checking the “Mouse selection” box in the command line properties.

After this, the text can be immediately selected with the left button. If you uncheck the quick paste box, the data is inserted on top of already written commands.

List of hotkeys

When working with the command line, use the following “hot keys”:

  • The up and down arrows allow you to move the cursor around the window, including commands that have already been entered;
  • Home and End move the cursor to the beginning and end of the line, respectively;
  • the left and right arrows together with the Ctrl key pressed simultaneously allow you to move the cursor in a given direction by an entire word;
  • Insert, just like in any text editor, switches the modes of inserting text with a shift to the right and overwriting over written data;
  • Esc deletes the selected information;
  • F1 allows you to enter the last recorded command one character at a time;
  • F5 prints the previous command;
  • F7 lists several latest entries. By default, their number is 50.

Basic Commands

The list of basic commands that most users need is relatively small and consists of commands that perform the following actions:

  • work with catalogs;
  • provide statistics on the operation of various applications, the network and the operating system as a whole;
  • restore driver functionality;
  • turn off the computer.

Using the command line, you can even format the drive (including the system drive, which cannot be formatted from a Windows system by any other means) and even stop the process. Also, using CMD, the user gets access to the registry editor and the system configuration window much faster.

Working with catalogs

The main command for working with directories is dir. With its help you can check the contents of an open directory. And, if you need to open another folder, you should additionally specify the path to it. For example, select “dir C:\” or “dir D:\”.

Rice. 3. Checking the contents of logical drive C.

The second command for working with directories is cd. With its help you can go to any selected folder. For example, by writing “cd C:\Windows” on the command line, go to the system directory. To open a folder on a disk that is already selected, issue a command like “cd /D D:\”.

Rice. 4. Transition from local disk C to drive D.

The mkdir command creates a new folder. And the parameter that is set after it determines the name of the directory. So, after entering “mkdir D:\New_Folder”, the corresponding directory appears on drive D. If the user specifies several directories in the list at once (for example, “E:\New\Games\Fallout_3”), an entire tree of folders can be created.

Rice. 5. Create a new folder from the command line.

Running the rmdir command allows you to delete a directory by specifying its full path. For example, by writing "rmdir D:\New_Folder", you can erase the newly created folder. Although, if there are other files inside the directory, a message appears on the screen indicating that it is not empty. You can delete a non-empty folder by entering the command rmdir /S on the line. Before deleting, select “Y” (Yes), confirming your action.

Rice. 6. Deleting a folder using the rmdir command.

Turning off the computer

Using the shutdown command, you can turn off the computer - either immediately or by setting a timer:

  • shutdown /s simply stops the operating system, closing all unfinished processes;
  • When you select the shutdown /s /t 3600 command, the timer will be set to exactly one hour. If you need to set any other time, the corresponding number of seconds is written instead of 3600;

Rice. 7. Enable automatic shutdown of the system.

  • To cancel an already set timer, enter the shutdown /a command.

Rice. 8. Cancel shutdown.

The commands work the same on any operating system. The only difference is in the inscriptions that appear. For example, for Windows 7, messages are located in the lower right corner of the desktop.

View statistics

Viewing computer statistics begins with the systeminfo command. It provides the maximum amount of information about the Windows system. Although it is more effective to use not system utility, but special applications.

For example, AIDA64 is a universal program for collecting information, the only drawback of which is its shareware license. A month after use, you will have to pay for the utility - from 1400 to 2200 rubles. per computer, depending on the number of licenses purchased.

Rice. 9. Obtaining information about the computer and operating system.

The driverquery utility allows you to view a list of drivers and their properties. In the list that appears on the screen you can see the type control program, reference date and module name.

Rice. 11. A utility that checks network operation.

The Netstat application shows information about active connections and statistics for various network protocols. When you run the command without specifying specific parameters, only TCP connections are displayed.

Rice. 12. Checking active TCP connections.

The tasklist command displays a list of all processes launched by the system. With its help, you can familiarize yourself with the data received from remote computer. Although, if additional parameters are not specified, information is displayed only about the current device.

The ipconfig utility displays information about the IP address and other parameters network adapter. Along with the command, additional parameters are used - for example, /all, which allows you to obtain information about each of the adapters.

Rice. 13. Obtaining information about network connections.

Changing system settings

The msconfig utility allows you to call up a menu that allows you to change the operating system configuration:

  • a list of programs that automatically load with the system;
  • launch options;
  • Windows boot options.

Most often, the command is used to remove or add an application to the startup tab. And sometimes they make changes to the loading order of operating systems - if two of them are installed on the computer (for example, Windows 10 and Windows XP, each of which may be more convenient for a particular user).

Rice. 14. Calling the menu for changing the system configuration.

Running the regedit utility allows you to open the system registry editor - one of the most useful applications, with which you get rid of leftovers remote programs, make changes to services and fix problems. It is worth noting that changing any values ​​(not to mention deleting) must be done very carefully. Errors in the registry can lead to system crashes and even reinstallation. Read also our material: TOP 3 cleaning programs Windows registry 7.

Rice. 15. Go to the registry editor.

Checking and formatting disks

Job chkdsk utilities allows you to check and correct errors on logical drives. When you run a command without specific parameters, the user receives information about the selected drive. In order to fix problems run chkdsk command/f, to display a list of files to be scanned - chkdsk /v, and to detect damaged sectors - chkdsk /r.

Rice. 16. Start checking files on the system disk.

The format command, which has not changed for decades, allows you to format any disk, including USB flash drives. Selecting "format C:" formats system partition. And with the help additional parameters can be determined file system(/fs), set the volume label (/y), and even assign cluster sizes (/a). Without specifying certain conditions, the cluster is installed automatically.

Rice. 18. Command to close the MS Paint application.

Recovering system files

One of the most useful utilities– sfc. By running this command, you can recover damaged files. Parameters that are used in conjunction with sfc include:

  • scannow, which scans protected system files;
  • scanonce, which scans files after Windows restarts;
  • scanboot, which is used to enable constant scanning (at every boot).

Rice. 19. A utility that restores damaged system files.

Clearing the screen

After executing several commands, the window is filled with text, which may interfere with further work. You can get rid of unnecessary data using the CLS (Clear Screen) command. After launching it, the screen is completely cleared, leaving room for further actions user.

conclusions

With constant use of basic commands, they are easily remembered by the user. And in order to learn about new utilities or remember the names of old ones, you need to enter /help on the command line. A list will appear on the screen possible commands, which are unlikely to be useful for regular user, but can simplify the work of local network administrators.



tell friends