• CMD commands: list, description and application. Network CMD commands. Learning the Windows Command Line

    Command line Windows XP, it's built-in Windows tool to solve a wide variety of problems. Using the command line console, you can perform actions that are not possible in the Windows graphical environment. Set up the operating system. For most users, the command line window itself, and especially working with it, causes some fear. But it's not really that scary. Basic knowledge of the operating principle and some commands can help restore the OS, configure scheduled tasks and much more.

    How to open the command line in Windows XP

    There are quite a few ways to call the command line, but we will look at the most common ones:

    1. Through the menu " Start" - where we select " All programs", then click on the menu " Standard", and here we select the command line.

    1. The second method is to call the console through the built-in utility " Execute" - here in the menu " Start"You can find this utility in the right column, run it and write the command in the dialog box cmd and click " OK».
    2. Another way to open the window " Execute"and launch the command line through it, this is a key combination Win+R .

    There are other ways, but in most cases these three are more than enough. Each user chooses one, more convenient and familiar method.

    Settings and working with the command line

    Before you get started, you can customize the command line for your convenience.

    • To do this you need to right click on top panel and select from the dropdown context menu paragraph " Properties».
    • Here we can make changes to the interface of the window itself - change the color and size of the font, change the font itself, adjust the location and size of the window for convenience. Change window color, background color, text color.

    List of command line commands

    Now comes the fun part. There are a huge number of commands, of course, you don’t need to know them all. But it is advisable to know the basic basic commands. And the first question is where to look for them. And here the command line will help you, in which you need to write the command.

    A list of commands will open, and there are a lot of them here. You can view more detailed information about a specific command by typing in the console:

    Help (space, command - for example, dir ) - the command will look like this - h elp dir


    Case is not important here; you can write in both small and capital letters.

    How to create a folder via command line

    Command line capabilities are difficult to describe in one article, so we will limit ourselves to a couple simple examples- how to create a folder or several folders at the same time, which, by the way, is impossible from the Windows graphical environment. And set up a scheduled task to turn off the computer. It is very important when, while watching a movie, you fall asleep and the computer remains on. In this case, you can set a time to turn off the PC and it will turn off according to the schedule.
    So let's get started:

    • Open the command line as described at the beginning of the article.
    • First, let's pay attention to what directory we are in; in order to move to a specific folder, you need to write the full path to it, in our case it will be “ Rdesk"and the path to it will look like this:

    CD "c:\ Documents and Settings \ user \Desk"

    Please note, the command (CD ) is responsible for moving through directories, further if in the addresspresentspaces, then alladdressneeds to be in quotation marks.
    Being in the directory, or more precisely, in the folder " Desk"we can create multiple folders. Like this: - command ( md ) is responsible for creating the folder, but if after the command md we write several folder names, let’s say these are the names of planets, then we will create exactly as many folders as we write them in the command line separated by a space.
    Example command to create multiple folders:

    m d Mercury Venus Earth Mars Jupiter Saturn Uranus Neptune


    And confirm your action with the key Enter . 8 folders will appear on the desktop, with exactly the names that we listed separated by a space after the command. Interesting, isn't it? To create the same number of folders in the usual way, we would need a lot more time and effort creating each folder separately.

    Turn off the computer

    Now regarding the planned task - for example, we are listening to music in the Winamp player, and we want it to turn off at some point. The standard player can turn off both itself and the computer, but Winamp cannot do this, so it would be advisable to give it a scheduled task to shut down in certain time. How it's done. Windows XP has a great team. It is natural to indicate your own time (in the example, the time is indicated randomly).

    Or turn off the computer completely, another command will do for this:

    shutdown.exe -s -t 3600

    (numbers, means seconds, after how many seconds the computer should turn off, in our case it is one hour or 3600 seconds).
    To make it easier to work with commands and the command line, you can install the Notepad++ program and write a command in it, and then save it with .cmd or .bat resolution. Then run this file. Then the computer will turn off exactly after the period of time that we set. You can cancel the scheduled task to turn off the computer using the command.

    shutdown.exe -a

    By the way, having created such a script, you can use it constantly without launching the command line.

    More than one generation of Internet users has already grown up who did not see the beginning of the rapid rise of Microsoft Corporation and do not even know how to open the command line.

    The peculiarity of this early version The Windows operating system, which was called MS DOS, had single-tasking (all processes were performed sequentially, not in parallel) and a predominantly text-based interface.

    Nowadays, most operations on a computer are under Windows control can be performed exclusively with the mouse, and in those days even for the most simple actions it was necessary to know many complex text commands.

    Via a shortcut in the Start menu

    Running the Run program to open the command line is a strange idea, since the required shortcut is right next door.

    You can also quickly find it by searching in the Start menu.

    Due to a significant change in the Start menu interface in Windows 8, this method will be implemented slightly differently.

    • First you need to go to the application tiles (new version of Start) and right-click on the free area. As a result, a panel will pop up at the bottom, providing advanced options.
      In it you need to click on the All applications icon in the lower right corner.

    • Here you can see a list with additional hidden applications, including the Command Line shortcut. Now you need to click on the required shortcut with the right mouse button and select the run as administrator function in the bottom panel.

    Advice! Running with administrator rights is recommended because some commands simply will not run in normal mode.

    In Windows 10, search works across the entire system. Therefore, to quickly find the command line, you need to press the Win+S combination and enter the name of the program in in this case this is the command line.

    Searching for an executable file on the system disk

    As mentioned above, the command line is implemented through a small executable file cmd.exe.

    From here we can draw a logical conclusion that this executable can be found in some folder and launched directly.

    This is true, the command line executable file starting from seven is stored in the System32 subdirectory of the Windows folder.

    No. 9. Command line file in Windows search 10

    Sometimes when working in Windows, you need to run the command line as an administrator. By default, the command line starts in limited mode and some commands may require administrator rights to run. This is done to prevent accidental execution of commands that could make major changes to the operating system.

    So let's look at a few simple ways to run command prompt as administrator. Some of these methods only work on certain versions of Windows.

    Method 1: Open the command line as administrator through the menu Start

    This method will work in all versions of Windows except Windows 8, 8.1, because... these versions lack the classic button Start.

    1. Click the button Start, select item All programs -> Standard

    2. Find the item in the list Command line and right-click on it.

    3. Follow the steps for the relevant system

    ForWindowsXP:

    Select an item Running on behalf of...

    As a result, a window will load in which you need to select the item The specified user account, select the Administrator user, enter the password and click OK.

    For Windows Vista, 7:

    Select an item Run as administrator.


    If you have User Account Control enabled, a window will appear in which you need to allow the program to make changes on your computer.

    Method 2: Open Command Prompt as Administrator using the search menu bar Start

    This method will only work on Windows Vista and Windows 7.

    1. Click the Start button and type cmd. The search results will display cmd.

    2. Press and hold the keys Ctrl And Shift and then click Enter. As a result of these steps, Command Prompt should start as an administrator.

    Method 3: Open the command line as an administrator using the “Win+X” menu in Windows 8, 8.1

    In Windows 8, 8.1, there are several ways to run Command Prompt as an administrator. One of them is using the “Win+X” context menu, which can be obtained either using a keyboard shortcut Windows+X, or by right-clicking in the lower left corner of the screen.

    As you can see in the figure, this menu has a separate item for running the command line as an administrator.

    Method 4: Open the command prompt as administrator using the start screen of Windows 8, 8.1

    In version 8 of Windows, a Start screen appeared, using which you can also launch the command line as an administrator. This method works in Windows 8 and Windows 8.1 almost identically. The only difference is in the design of the context menu.

    1. Go to the home screen by pressing the key Windows in Windows 8, 8.1 or the Start button (if you can call it that) in Windows 8.1.

    2. Type on the keyboard cmd. A shortcut should appear as a result of the search Command line.

    3. Right-click on the found shortcut and select Run as administrator.

    This is what the action looks like Windows 8:

    and so on Windows 8.1:

    Method 5: Open the command line as administrator using Windows Explorer 8, 8.1

    In Windows 8, it became possible to launch the command line through the Explorer menu.

    1. Open in Explorer Windows disk or folder.

    2. From the menu, select File, then Open command line And Open command prompt as administrator.

    Method 6: Open the command line as an administrator using the task manager

    This method only works on Windows 8, 8.1.

    1. (key combination Ctrl+Shift+Esc)

    2. In the dispatcher menu, select File, then Launch new task .

    3. In the field Open enter cmd, check the box next to the item Create a task with administrator rights and click OK.

    There is also an easier option to run the command line as an administrator using this method. To do this, before selecting the item Start a new task, press and hold the Ctrl key. As a result, the window will not open Create a task, and a command prompt with administrator rights will immediately open.

    That's all. If you know any other way to run the command line as an administrator, I will be glad if you describe it in the comments.

    The earliest operating systems did not have the usual modern user GUI. Previously, computer controls were used exclusively text commands.

    However, today, despite the variety of possibilities that provide easy and convenient communication between the user and the PC, they are still used. There are also operating systems that work only by entering text commands into them. They are commonly used by database administrators, programmers, and other IT professionals.

    An excellent example of controlling the operating system using text commands - team Windows string 7. It is present in any distribution of this OS and can be run on any PC running this operating system. You don't need to be an administrator or any kind of IT specialist to learn how to use it. Let's look at this issue in more detail.

    A little theory and facts

    The Windows command line is a toolkit that allows the user to perform various actions on the operating system or on separate programs by entering text commands. The command line usually consists of a command interpreter (shell) and a text interface. First responsible for transmitting and executing commands operating system, second- provides the user with the opportunity entering these same commands and viewing the result of their execution.

    The command line offers great capabilities for managing the operating system. Almost everything that can be configured in Windows using the mouse can be done through it. The conclusion follows that the command line is capable of performing a fairly large list of tasks, each of which is performed in turn entering a unique command. It is precisely because of the need to remember the syntax of these commands and the ability to use them that most ordinary users have difficulty working with the command line.

    Even so, using the command line is not that difficult of a task. The main thing here is to learn to understand the very principle of its operation, which will be discussed in more detail later.

    Why does the average user need the command line?

    Surely, each of you has come across various articles on the Internet in which the authors urge you to use one or another command to solve a certain problem. For example, through the command line you can do file management, stored on any media, change parameters system operation or even create Internet connection. However, the above can be easily accomplished using a regular mouse and keyboard.

    The importance of the command line lies in the fact that any operations with the system can be performed in the event that access to the graphical interface is lost or there is no other solution.

    Here are some examples:

    • Registration in the system dynamic DLLs (often necessary to do when copying to the system Windows folder a new DLL file - registration will “make it clear” to the system that a new library has appeared);
    • Settings network adapter computer as wireless point Wi-Fi access;
    • You can even access the Internet by connecting to the network through one of your existing connections.

    You also cannot do without using the command line in case impossibility of control computer using a graphical interface. For example, there is more than one variety virus programs that turn off Windows Explorer without allowing the user to access folders or run programs.

    Using the command line, you can not only launch the application, but also go to any folder in order to work on any files (copying, moving, setting a new name, and so on). And this is only part of the command line capabilities. Let's now move on to practice.

    How to Open Command Prompt in Windows 7

    The first thing you need to do is run the command line, preferably as an administrator.

    It is launched in one of the following ways:


    After performing one of the above actions, you will call the command line - usually this is a small black window.

    Why do you need administrator rights? The fact is that there are a number of teams that are capable of change system settings . You can execute such commands only with administrator rights. This is done for safety. So if you are in account guest, you will not be able to call the command line as an administrator, and therefore not be able to execute commands related to system settings.

    How to use the command line

    Due to the fact that there are enough commands large number, their entire list cannot be displayed in one article. For this reason, we will look at the simplest commands that can be executed without administrator rights. Let's begin.

    After launching the command line, you will see a window similar to this:

    The address line preceding the blinking cursor is the address current folder on your hard drive (or any other connected device). Navigating through folders (changing the current folder) is one of the simplest actions. Let's run this command. To do this, you need to enter the cd command into the window and specify the full path to the name of the folder we need, and then press Enter to start execution. For example, if you need to go to the address " C:\Program Files", to do this, just enter cd C:\”Program Files”

    Important! When navigating to a folder with a space in the name, it must be specified in quotes.

    This way you can go to any directory hard drive. You also need to know that if the folder is located in the current command line folder, then using " CD"it opens without the need to specify the full path ( just specify the folder name after the command).

    To move out of the current folder into a folder more high level, that is parental, use the cd .. command (the two dots mean the parent directory).

    Now let's do it moving to another local drive. To do this, simply specify the drive letters followed by a colon. For example, we want to get to the drive “D:\” - we write the command d: and then press Enter.

    This is done using the command " dir" Enter it and the command line will display a list of the contents of the “D:\” drive. Team " dir" can be called from any folder - even to view the contents of a directory on another drive (to do this, you must enter the full path to the name desired folder). For example, run: dir c:\windows

    Let's look at another command - “ copy" As the name implies, it is used to copy data. For example, you are on the drive " D:\" and you need to copy the file " 1.txt"to a flash drive. To do this, enter copy 1.txt F: Instead of “F:”, you can specify any other drive letter (in our case, copy to drive “C” :\ "") or the full path to the directory where you want to copy files or folders.

    A more advanced version of the copy command is the " robocopy", unlike its predecessor, it can copy not only files, but also folders, including their contents.

    You don't have to remember the names of all the commands. For withdrawal full list With brief description type: help

    To receive detailed information, for example, for robocopy, type: help robocopy

    note that help displays all descriptions on Russian language, of course, if Windows version yours is Russified.

    Everything discussed here is only a small part of the command line capabilities. If you are interested in using it, we recommend visiting the official Microsoft website, where there is full information on working with her.

    Video on the topic

    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

    cmd line representing the standard tool Windows platforms, is no different in different versions operating systems– and in the seventh, and in the eighth, and in the tenth, and even in XP. And all teams work the same way in each of them.

    The advantage of using a string is that it speeds up the work - sometimes entering the desired command is much faster than searching in system folders corresponding file. 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;
    • necessity launch CMD as administrator (otherwise most commands cannot be launched);
    • a fairly large list of commands that are difficult to remember.

    Externally, the command line is very similar to the interface DOS systems. And, although it allows you to solve many more problems, some commands are the same as the 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 the 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 the usual Windows shortcuts. 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;
    • left and right arrows while pressed at the same time Ctrl key 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 the last few entries. By default, their number is 50.

    Basic commands

    List main commands, which most users need, is relatively small and consists of commands that perform the following actions:

    • work with catalogs;
    • display work statistics various applications, network and 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. Content check 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.

    Rice. 8. Cancel shutdown.

    The commands work the same on any operating system. The only difference is in the inscriptions that appear. So, 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 Windows system. Although it is more effective to use not system utility, but special applications.

    For example, AIDA64 - universal program for collecting information, the only drawback of which is the 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. 10. Display a list of drivers.

    A utility called pathping, when run, shows information about the data lost during transmission between the starting and ending points. This command calculates loss ratios for different routers. And based on the results of the utility’s work, they identify access problems for individual routers.

    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. Check active connections TCP.

    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 of the 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 opens the editor system registry- 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. 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. 17. Formatting the H drive via the command line.

    Stopping processes

    Using a command, you can stop a specific process. An identifier can be used for this (for example, 2616, if we are talking about graphic editor Paint) and the /pid parameter. In addition, when stopping, the name of the process itself and another /im parameter can be used. The same editor is closed with the command taskkill /im MSPaint.exe.

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

    Clearing the screen

    After executing several commands, the window fills with text that may be a hindrance to 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

    At constant use 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 of possible commands will appear on the screen that are unlikely to be useful for regular user, but can simplify the work of local network administrators.