Contacts

How the command line works in Windows XP, 7,8,10. All Windows command line commands in one place Windows 7 command line secrets

So what is it command line? This is a component of Windows with which you can enter various computer commands. As a rule, only experienced users use the command line, but this is not a reason to remain silent about it, so I decided to devote this post to the capabilities and properties of the command line.

Why do you need the command line?

You may ask, why know about the command line capabilities if there is a Windows graphical interface? But now I will list the reasons why you should use the command line:

Memory consumption is less than when using a menu system;

Typing a command in any application is faster than using a graphical command interface;

The command line can execute a text file with all the commands sequentially, which is much faster than executing them sequentially.

Where is the command line used?

You can use the command line in operating systems, computer games and other programs. As a matter of fact, the command line was originally used in games if debugging was needed. But even now, even with a graphical interface, using the command line you can change the game settings faster.

What are the advantages of the command line?

Almost instantaneous access to commands for various files used;

To call any command, a small number of clicks is enough;

You can control programs that do not have a graphical interface;

You can remotely connect to a computer using minimal traffic;

There is more text on the page than in the graphical interface.

Are there any disadvantages to the command line?

Difficult to understand by users who are used to working with a graphical interface;

If there is no automatic addition, it will be difficult to enter long commands;

It has no analogues.

How to open the command line?

1. To open the command line in Windows7/XP, do the following:
Start => All Programs => Accessories => Command Prompt .

or press the keyboard shortcut "Win + R".

in field "Open" enter this command:

A black command prompt window will open with the following message:

C:\Users\Administrator>, where Administrator is the name of the current user.

To see a list of command line commands, type help

and press ENTER.

To see more information about each of these commands, enter the following command at the command prompt
help command_name and press ENTER.

For example:

List of command line commands:

ASSOC→ Display or change associations based on file name extensions.

ATTRIB→ Display and change file attributes.

BREAK→ Turn on and off the processing mode of the key combination CTRL+C.

BCDEDIT→ Sets properties in the boot database to control the initial boot.

CACLS→ Display and edit access control lists (ACLs) for files.

CALL→ Call one batch file from another.

CD

CHCP→ Display or set the active code page.

CHDIR→ Display the name or change the current folder.

CHKDSK→ Checking the disk and displaying statistics.

CHKNTFS→ Show or change whether disk check is performed during boot.

CLS→ Cleaning the screen.

CMD→ Launch another Windows command line interpreter.

COLOR→ Set the default foreground and background colors.

COMP→ Compare the contents of two files or two sets of files.

COMPACT→ Display and change file compression on NTFS partitions.

CONVERT→ Convert FAT disk volumes to NTFS. The currently active drive cannot be converted.

COPY→ Copy one or more files to another location.

DATE→ Display or set the current date.

DEL

DIR→ List files and subfolders from a specified folder.

DISKCOMP→ Compare the contents of two floppy disks.

DISKCOPY→ Copying the contents of one floppy disk to another.

DISKPART→ Display and configure disk partition properties.

DOSKEY→ Editing and re-calling command lines; creating macros.

DRIVERQUERY→ Displays the current status and properties of the device driver.

ECHO→ Display messages and switch the mode of displaying commands on the screen.

ENDLOCAL→ End of local environment changes for batch file.

ERASE→ Delete one or more files.

EXIT→ Exit the CMD.EXE program (command line interpreter).

F.C.→ Compare two files or two sets of files and display the differences between them.

FIND→ Search for a text string in one or more files.

FINDSTR→ Search for strings in files.

FOR→ Run the specified command for each of the files in the set.

FORMAT→ Formatting the disk to work with Windows.

FSUTIL→ Display and configure file system properties.

FTYPE→ Display or change the file types used when matching by file name extensions.

GOTO→ Transfer control to the marked line of the batch file.

GPRESULT→ Display Group Policy information for a computer or user.

GRAFTABL→ Allows Windows to display extended characters in graphics mode.

HELP→ Displays help information about Windows commands.

ICACLS→ Display, modify, archive, or restore ACLs for files and directories.

IF→ Operator for conditional execution of commands in a batch file.

LABEL→ Create, change and delete volume labels for disks.

M.D.→ Create a folder.

MKDIR→ Create a folder.

MKLINK→ Creating symbolic and hard links

MODE→ Configuring system devices.

MORE→ Sequential output of data in parts the size of one screen.

MOVE→ Move one or more files from one folder to another.

OPENFILES→ Display files opened on a shared folder by a remote user.

PATH→ Displays or sets the search path for executable files.

PAUSE→ Pauses the execution of the batch file and displays a message.

POPD→ Restores the previous active folder value saved using the PUSHD command.

PRINT→ Prints the contents of a text file.

PROMPT→ Changes the Windows command prompt.

PUSHD→ Saves the active folder value and moves to another folder.

R.D.→ Deletes a folder.

RECOVER→ Recovers readable data from a bad or damaged drive.

R.E.M.→ Places comments in batch files and the CONFIG.SYS file.

REN

RENAME→ Renames files or folders.

REPLACE→ Replaces files.

RMDIR→ Delete a folder.

ROBOCOPY→ Improved tool for copying files and directory trees

SET→ Shows, sets and removes Windows environment variables.

SETLOCAL→ Starts localizing environment changes into a batch file.

S.C.→ Displays and configures services (background processes).

SCHTASKS→ Executes commands and runs programs according to a schedule.

SHIFT→ Changing the position (shift) of substituted parameters for a batch file.

SHUTDOWN→ Local or remote shutdown of the computer.

SORT→ Sorting input.

START→ Execute a program or command in a separate window.

SUBST→ Assigns a drive name to the specified path.

SYSTEMINFO→ Display information about the system and computer configuration.

TASKLIST→ Displays all running tasks, including services.

TASKKILL→ Termination or stop of a process or application.

TIME → Displaying and setting the system time.

TITLE→ Assign a window title for the current session of the CMD.EXE command line interpreter.

TREE→ Graphical display of the directory structure of a disk or folder.

TYPE→ Displays the contents of text files.

VER→ Displays information about the Windows version.

VERIFY→ Setting the mode for checking whether files are written correctly to the disk.

VOL→ Displays the volume label and serial number for the disk.

XCOPY→ Copying files and directory trees.

WMIC→ Display WMI information in an interactive environment.

Ever since the computer became an integral part of the life of modern society, we have become accustomed to working in a visual graphical interface. In simple terms, this means clicking on pictures, dragging them, etc. But at the dawn of computer technology, everything was different. Then commands to the machine were given exclusively in text mode. Even now, programmers and so-called advanced users can easily communicate with their computer using text commands.

Sometimes the ability to use this mode can greatly simplify life, and in some cases it becomes simply necessary. Therefore, in this article we will discuss what the command line is in Windows 7, how to open this line and why you might need it.

Translator from human language to computer

So that the computer can understand user requests, the operating system has a special command shell, where the Windows 7 command line plays the role of a translator. In this sense, of course, life is easier for English-speaking people, since the commands are written in the purest English. Well, the rest will have to learn a couple of dozen foreign words.

in Windows 7. How to open this tool

First, let's figure out how to launch the input environment we need. There are several ways to open the Windows 7 command prompt.

To use the first method, you will have to remember the simplest command - “cmd”. It's not difficult to do this. These letters are a computer abbreviation for the English word command, which is very similar to the Russian “command”. Using the simplest examples of mnemonics, we get the letters we need ( TO O M en D naya).

Click on the "Start" button (Windows icon) located in the lower left corner of your screen. In the window that opens, in the “Search programs and files” line (bottom line), enter the “cmd” command. The required icon will appear in the list of programs that appears. By left-clicking on it, you can launch the Windows 7 command line.

The next way to open the command line also starts from the Start button. But this time you can simply click on the “All programs” line in the list and select the “Standard” folder. By clicking on a folder, you will get a whole range of programs. One of them will be “Command Line”.

Command Prompt in Windows 7. How to open using a standard keyboard shortcut

You can achieve the desired result using the keyboard shortcut “Win” + “R”. (The “Win” key is located on the keyboard in the bottom row, third from the left, with the Windows logo). By clicking this combination, you will open a special “Run” window. In the field provided, you need to enter the command “cmd” that you are already familiar with and press the “Enter” key.

Why you might need the command line

Suppose you are using a free trial period for the Windows 7 operating system. It is already coming to an end, but you have not yet fully understood whether it is worth transferring it to a permanent basis. This is where command line knowledge comes in handy.

Microsoft has provided an absolutely legal opportunity to activate Windows 7 for an additional period (up to 120 days). In this case, the command line will be needed to enter the code. You can set such a command only as an administrator. This precaution is by no means superfluous. After all, many specific changes to the operation of the computer can be introduced using the Command Line program. must clearly understand what his actions will lead to.

To log in with administrator rights by calling the program using one of the previously described methods, right-click on it and in the context menu that opens, select “Run as administrator” (at the very top of the list).

After that, in the window that opens, enter “slmgr.vbs /rearm” (there should be a space after the letters “vbs”). And confirm the command by pressing the Enter key. Restart your computer and check the trial expiration date. It must be 30 days. This procedure can be repeated, but no more than three times. So in total you will get 120 days to explore the capabilities of the operating system.

List of basic commands

The command line in Windows 7 will also help you perform many basic and specific functions. You will learn from the following list of commands how to open the desired directory or folder and carry out the necessary operations with them. And although it is far from comprehensive, knowing this basics can make your life a lot easier one day. To make it easier to understand, let's try to group the commands into small blocks.

Commands for working with individual files and folders

  • If you need to delete a file or an entire group of files, use the “del” command.
  • To copy information to another folder or directory, use the “copy” command.
  • To find a given text string in the current file (or group of several files), type "find".
  • If you need to compare multiple files to find differences between them, use the letter combination "fc".
  • To move the specified files to another folder, type “move”.
  • To create a new empty folder, just give the request “md”.
  • If you need to permanently delete a folder along with all its contents, use “rd”.
  • If you want to print text or graphic information from the specified file, type “print”.
  • To completely replace the selected files, use the “replace” command.
  • To rename an individual file or folder, enter "ren".
  • To see a complete report of the graphical directory structure of a drive or folder, use the "tree" command.
  • Sometimes it is necessary to run an improved means of copying files and even complete directory trees. In this case, type “robocopy”
  • And for simple copying of files and directory trees, “xcopy” is used.
  • If you want to see the full contents of the specified text files on your screen, issue the "type" command.

Command line management

To directly control the command line itself, a number of specific commands are used. Thanks to them, you can personalize your work with this program to some extent by changing some of its parameters.

  • To launch a second additional copy of the command line, enter "cmd". It will open in the next window.
  • To completely clear the command line screen, issue the command "cls".
  • If you need to change the prompt itself on this command line, enter “prompt”.
  • To assign an original title to the window for the duration of the current session, command "title".
  • The “color” command allows you to select and set an individual text color and background for the program interface.
  • Exiting the command line is always done using the "exit" command.

Features of working with the command line in Windows 8

In the Windows 7 operating system, running the command line as an administrator is relatively simple. But in order to open this program in Windows 8, you need to know some news and subtleties of this shell.

Windows 8 does not have a Start menu. In order to call the panel we need, we need to right-click on any empty area of ​​the desktop. After this action, an additional panel will appear at the bottom of the screen, on which you will find the “All applications” icon (lower right corner).

Open applications (by left-clicking on the icon) and look for an icon in the list that appears that says “Command Prompt” (it will be located approximately in the central part of the panel). Click on this icon with the right mouse button (if you use the left key, then by default the command line will open as the current user) and in the additional option that appears at the bottom, select the “Run as administrator” option.

Timely assistant

Although working with the command line is generally considered to be the privilege of experienced users, in fact, anyone can master this tool. And the built-in assistant will provide invaluable assistance in learning. It is called by the very easy to remember text command “Help”.

When working with the command line, you can specify the “Help” command at any time - and the program will give you a complete list of its capabilities. In order to get more detailed information about any specific command that interests you, just enter a request in the format “help + command name”.

So don't be afraid to experiment and expand your horizons. Explore the capabilities of your own computer or laptop - and in the near future you will be able to easily talk on equal terms with those who have received a specialized education.

Command line (cmd) is a powerful software tool that allows you to manage the operating system, as well as all applications installed in it, by entering various text commands. The process of managing the OS using cmd is much faster, because the serious productivity of the computer is not used, since the Windows graphical shell is not used.

There are several ways to find and call the command line (also called the console).

Launch the command line from the Start menu

Go to the menu and then go through the following sections one by one: "All programs"/"Back" --> "Standard" --> "Command line". Next, just click on it with the mouse and the console will immediately open.

Launch Command Prompt through the search box in the Start menu

Also, go to the menu and in the search bar below enter the phrase: " Command line". The console shortcut should be highlighted in the search results that appear at the top. Click on it and thereby launch cmd.

Launch the command line through the system command “Run”

Press the "quick" keyboard shortcut Win+R. In the window that opens, enter the phrase: “cmd” (code name of the console) and click "OK" so that she appears immediately.

Launch the command line through the system folder on the HDD

Open this folder by sequentially going through the following directories: C:\Windows\system32. Search it well and you will definitely find a file there called " cmd.exe", by clicking on which you can launch the command line.

Launch the command line through the extended context menu of any folder on the HDD

Move the mouse cursor over some folder on your disk, press and hold (i.e., do not release!) the keyboard. Shift. Then, right-click on the selected folder. mouse to bring up the expanded options menu. Click on the function "Open command window", which will launch the console.

Launch the command line from them. administrator

Using system services with administrative rights significantly expands the user's powers and gives him access to additional features when working in Windows.

To open console with admin rights, click on its shortcut or the file itself (depending on which method you used to search for it) rights. keyboard mouse and click on the function "Run as administrator". The console will start with extended user rights. This is the last thing that may be useful to you when working with cmd. That's all!

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.

The command line is a special program that allows you to control the operating system using text commands entered in the application window. Its interface is completely text-based, in contrast to the usual appearance of the operating system.

Performing actions using text expressions, of course, is not as convenient as clicking on icons on the screen, selecting menu items, or opening program windows. But sometimes it is simply necessary to open the command line, for example, when there are problems in the system, when working with network and equipment settings, or when calling system applications. Here are some examples of its use:

  1. The systeminfo command allows you to collect system information, including installed updates and network information. The graphical interface does not provide for receiving such data.
  2. chkdsk - checks the disk for errors and generates a report.
  3. sfc /scannow is a useful command to start scanning and repairing damaged files.
  4. ipconfig - allows you to find out the IP address of your computer in a split second.
  5. ping - check the network operation in case of problems with the router.
  6. help - the command line will display a list of possible commands with brief information about them.

These are just a few examples of the useful uses of this application. In addition, through the program window you can quite successfully work on the computer without using a mouse.

Switching methods

There are several options to open the Windows Command Prompt:

In versions higher than Windows 8, in order to apply this method, you need to click on the magnifying glass next to the user name.


You can also create a desktop shortcut and hotkeys for quick launch. You can create a shortcut like this:

  1. In the Explorer window, find the “Windows\System32” folder, right-click on the cmd.exe file in it, then “Create a shortcut” and select a name for it.
  2. Right-click on an empty space on the screen and find “Create shortcut” in the context menu. In the field that appears, type C:\Windows\System32\cmd.exe. Next, select a name and click OK.

Now you can assign hotkeys. Call the context menu of the created shortcut, click “Properties”, “Shortcut” tab, enter the required combination in the “Shortcut” field.

Please note that when launched using the shortcut, search box and Explorer, the command line is launched from the System32 folder, and using the “Run” item of the Start menu from the Users folder of your computer.

Opening with extended rights

Among the methods discussed, some allow you to enable the command line as an administrator. The fact is that even if you use the Administrator account in your current work, you do not have full rights to manage the system. This is done to improve reliability and reduce the risk of damage from malware.

Running as an administrator is a different concept than an administrator account. It involves increasing the level of rights, giving the program the highest access to changing the system. This way, more functions will become available in the application (in our case, on the command line). When opened normally they are simply locked. For example, if you want to disable User Account Control via cmd.exe, this will not be available in normal mode, only as an administrator.

Thus, the command line is a kind of universal Windows system management tool that allows you to perform various tasks without switching between many windows, menus, and programs. All commands are directed through the text window, you can quickly change network settings, security settings, check or format drives and perform many other functions in seconds.



Did you like the article? Share it