Managing Windows 7 using the command line. Windows7 Command Line Commands


Command line or as it is also called cmd in the Windows 8 operating system is the same as in younger versions of Windows 7, Windows Vista, Windows XP, it follows that the same commands work the same in all versions.

So let's first figure out how to launch the command line. To do this, you must have a working computer with an operating system.

Some commands, if you are running under a regular user account, may not have enough rights to execute them for security reasons, so always run the command prompt with administrator rights. There are 2 ways to launch the command line:

In the window that appears, write cmd and click OK.

A command prompt window will open with a black background.

2) A faster way: through the hot keys Win + R, here also in the window that appears we write cmd, press ok.

In Windows 8, you can only use method 2, since there is no Start menu. Let's write our first help command, which will display a list of all available commands with brief explanations.

List of all existing Windows command line commands:

ASSOC Print to screen or modify mappings based on file name extensions.
ATTRIB View and modify file properties.
BREAK Locks or unlocks enhanced CTRL+C processing in DOS.
BCDEDIT Sets properties in the boot database that allows you to control the initial boot.
CACLS Lists data and modifies access control lists (ACLs) on files.
CALL Calls one batch file from another, and can also pass input arguments.
CD
CHCP Output or set encoding.
CHDIR Displays the name or moves to another folder.
CHKDSK Diagnostics of the drive for errors.
CHKNTFS Shows or changes drive diagnostics during boot.
CLSO clearing the display of all symbols.
CMD Launches a Windows command line program. You can run an infinite number of them on one computer. They will work independently of each other.
COLOR Changes and sets the main background of the window and the fonts themselves.
COMP Shows differences and compares the contents of two files.
COMPACT Changes and shows file compression in NTFS.
CONVERT Converts FAT disk volumes to NTFS. The current drive cannot be changed.
COPY Creates a copy of a file or files and places them in the specified location.
DATE Shows or sets the current date.
DEL Destroys one or more files at once.
DIR Shows the names of files and folders with their creation date located in the current folder or specified in the folder settings.
DISKCOMP Compares and shows the differences between 2 floppy drives.
DISKCOPY Creates a copy of the contents of one floppy drive to another.
DISKPART Shows and changes the properties of a disk partition.
DOSKEY Modifies and re-invokes command lines; creates macros.
DRIVERQUERY Displays information about the status and attributes of a device driver.
ECHO Displays text information and changes the display mode of commands on the screen.
ENDLOCAL Brings the environment localization to a close for the batch file.
ERASE Destroys a file or files.
EXIT Terminates the command line program
F.C. Shows the differences between two files or two sets of files and also compares them
FIND Searches for a text string in files or in one file.
FINDSTR Advanced search for text strings in files.
FOR Cycle. Repeats execution of the same command a specified number of times
FORMAT Formatting the drive for use with Windows.
FSUTIL Shows and sets file system attributes.
FTYPE Allows you to change and view file types, which are mainly used when matching by file name extensions.
GOTO Transfers control to another specified command.
GPRESULT Displays Group Policy information for a computer or user.
GRAFTABL Allows Windows to display extended characters in graphical mode.
HELP Lists all data about existing Windows commands.
ICACLS Shows, modifies, archives, or restores ACLs for files and folders.
IF Executes commands based on a given condition.
LABEL Creates, modifies, and destroys volume labels for drives.
M.D. Creates an empty directory.
MKDIR Creates an empty directory.
MKLINK Creates symbolic and hard links
MODE Configures system devices.
MORE Sequentially displays information in blocks the size of one screen.
MOVE Moves files from one location to another.
OPENFILES Shows files that are open on a shared folder by a remote user.
PATH Displays or sets the full path to executable files.
PAUSE Stops execution of command line commands and displays information text.
POPD Restores the previous active folder value that was saved using the PUSHD command.
PRINT Prints the contents of a text file.
PROMPT Modifies the Windows command line prompt.
PUSHD Saves the active folder value and moves to another folder.
R.D. Destroys a directory.
RECOVER Revives readable data from a bad or damaged hard drive.
R.E.M. Places comments in batch files and the CONFIG.SYS file.
REN Changes the name of both files and folders.
RENAME Similar team REN.
REPLACE Swaps files.
RMDIR Destroys a directory.
ROBOCOPY Advanced tool for copying files and entire folders
SET Shows, sets, and destroys Windows environment variables.
SETLOCAL Localizes environment changes in a batch file.
S.C. Allows you to work with services
SCHTASKS Allows you to run any programs and sequentially execute the necessary commands according to a given plan
SHIFT Changes the position (shift) of substituted parameters for a batch file.
SHUTDOWN Shuts down the computer.
SORT Sorts input according to specified parameters.
START Launches a program or command in a new window.
SUBST Assigns a drive name to the specified path.
SYSTEMINFO Displays information about the operating system and computer configuration.
TASKLIST Shows a list of all running processes with their IDs.
TASKKILL“Kills” or stops the process.
TIME Sets and displays the system time.
TITLE Sets the window name for the current session of the command line interpreter CMD.EXE
TREE Displays drive directories in a convenient visual form.
TYPE Displays the contents of text files.
VER Displays brief information about the Windows version.
VERIFY Checks for file writing errors on the drive.
VOL Displays the labels and serial number of the drive volume.
XCOPY Creates a copy of files.
WMIC Prints WMI on the command line.

Using Windows CMD commands you 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 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 the system drive, 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. Right-click on the selected line in the open CMD window;
  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, as 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

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 drive 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, to obtain information, it is more effective to use special applications rather than a system utility.

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 of control program, the reference date and the name of the module.

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

The tasklist command displays a list of all processes running on the system. With its help, you can view data received from a 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 allows you to open the system registry editor - one of the most useful applications with which you can get rid of the remnants of deleted programs, make changes to the operation of 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 programs for cleaning the Windows 7 registry.

Rice. 16. Start scanning 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 the system partition. And with additional parameters, you can define the 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. For this, an identifier can be used (for example, 2616, if we are talking about the Paint graphic editor) and the /pid parameter. In addition, when stopping, the name of the process itself and another parameter /im 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 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 user actions.

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

The Windows 7 Command Prompt is a feature of Windows that allows you to enter MS-DOS and other computer commands. The importance of this command line is that it allows you to perform tasks without the help of the Windows GUI. Typically, the command line is only used by advanced users.

When working with the command line, the term command line itself also denotes the closing angle bracket (>). This indicates that the command line interface can accept commands.

The current working directory where the command will be executed can be specified on the command line. For example, if when you open a command prompt window, the text “C:\>” and a blinking cursor to the right of the angle bracket (>) are displayed on this line, then this means that the entered command will be executed on the C drive of this computer.

There are several ways to launch the command line. Let's consider launching the Command Prompt from the current user account:

  • Press Win+R (Start - Run), enter cmd and click Ok

As you can see, the command line has been launched with the rights of the current user! To see a list of frequently used commands, at the command prompt, type help and press ENTER. To display more information about each of these commands, enter help command_name, where command_name is the name of the command about which you want more information (For example, help ping).

Innovations in cmd in Windows 10 - I would like to note on my own that there are many more ways to open the command line in Windows 10 and you can choose more convenient options for yourself (read the life hack by following the link).

Run Command Prompt as Administrator

Some commands may require administrator rights to run. To run the command prompt with administrator rights, you must do the following.

Rolling back the OS allows you to restore normal operation of Windows if it is damaged as a result of malicious software, installation of low-quality drivers, software updates, unintentional user actions, and in other cases. To start system recovery, just go to the “Start” menu and in the “System” section activate the corresponding application.

If Windows does not start, then the command line comes to the rescue. With its help, you can reanimate the operating system bootloader, thereby restoring its functionality and allowing the user to perform a thorough search for the cause of the malfunction.

How to enter command input mode

There are several ways to launch the command line in Windows 7:

  • through the standard menu;
  • using safe mode;
  • via boot disk.

The first method is relevant when the operating system boots in stationary mode. In this case, you need to open the “Run” tab through the “Start” menu and enter the cmd command.

To enable safe mode, you need to press the F8 function key while restarting the computer and activate the corresponding line in the boot options selection window. Further actions will be the same as in the first case.

If the system damage is so serious that safe mode does not turn on, a boot disk or USB flash drive with Windows 7 OS comes to the rescue. In this case, its assembly must match the one installed on the computer.

To run the command line through the boot disk, you must:

Resuscitating Windows OS using the rstrui.exe command

The rstrui.exe command launches the familiar graphical shell of the recovery procedure. However, to use it, you must have checkpoints enabled on your computer. For the Windows system partition, such points are created automatically. For other volumes, they must be activated manually.

System recovery via rstrui.exe is performed as follows:


Using the Chkdsk command

The correct syntax for the Chkdsk utility via the command line is shown in the image.

Restoring the bootloader using Bootrec.exe

This utility allows you to restore a damaged Windows 7 bootloader and, accordingly, start the OS in normal mode to find the cause of the problem. If you enter Bootrec on the command line, you will see a list with all the keys that work with this command, as well as their brief description.

Let's look at each key in more detail:


Using the BCDboot.exe command

If you were unable to restore your Windows 7 system using the above commands, you can try using the BCDboot.exe utility. This program also allows you to revive a damaged boot sector or create a new one.

Familiarization of a Windows 7 user with these instructions means that in order to perform some tasks, the question arose of how to open the command line in Windows 7, which is often simply called the “console” and is abbreviated “cmd”. The Command Prompt is an essential tool in Windows 7 and there are many ways to access it.

Below are detailed descriptions of the manuals for carrying out the task, which will be obvious to experienced users, but using the step-by-step instructions provided, any “dummies” will master the most powerful system management tool. The first computers were equipped with an OS without a shell familiar to the eyes of today's people, for example, there was no convenient Windows graphical interface, and control was carried out by entering text commands.

But even today, the operating system often uses this reliable means of communication between the user and the computer through the window of the console in question. There is no need to have a degree in programming to take advantage of all the benefits of cmd.

What kind of console is this?

This is a tool for managing the OS and any programs installed on it by entering special commands into the console window. It should be noted that the time required to execute commands via the command line takes much less time than similar actions using the Windows 7 interface, since system resources are not spent on displaying the graphical shell.

You can call “cmd” using various methods.

Using the Run menu

Several steps need to be taken:


Using the task manager

The following sequential steps are required:


Via "Start"

The algorithm of actions consists of the following points:

You can also go to the Start menu, go to All Programs, and in the Accessories section, click Command Prompt.

How to call the command line for a specific folder

Just a few steps need to be taken:


How to install a console shortcut on the desktop?

  1. Open the “My Computer” window and enter the system volume “C”;
  2. Then find and open the directory called “Windows”;
  3. Next, go to the “System32” directory (for example, if 32-bit “Seven” is installed);
  4. Call the context menu on the “cmd.exe” file;
  5. Click on the line “Create a shortcut”;
  6. Then drag it to the desktop, simply by grabbing it with the mouse;
  7. Ready!

You can also do this by calling the context menu from the desktop and going to the “create” line and then clicking “Shortcut”.

After that, in the menu that appears, type: “C:\Windows\System32\cmd.exe” and click “Next”. Give a name to the shortcut you are creating and click “Done.”

How to set hot buttons to quickly open the console?

To do this, you only need to take a few steps:

  1. From the created shortcut, open the context menu and enter “Properties”;
  2. Go to the “Shortcut” tab;
  3. In the “short call” item, type a user-friendly hotkey combination, for example, “CTRL”, “ALT” and “C”;

How to call "cmd" with extended privileges?

To open the console as an administrator, you need to do the following:

  1. Click “Start” and type “command line” in the search bar;
  2. In the list that appears, call the context menu from the found console program and click on the line








2024 gtavrl.ru.