Like using the command line. Command line in windows


The earliest operating systems did not have the graphical interface familiar to modern users. 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 typing into them text commands. They are commonly used by database administrators, programmers, and other IT professionals.

Great example of management operating system using text commands - Windows 7 command line. 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 Prompt is a tool that allows the user to various actions over the operating system or over separate programs by entering text commands. The command line usually consists of a command interpreter (shell) and 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 is that the command line is capable of performing enough big list 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 system folder Windows of 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 a large number of, their entire list cannot be displayed in one article. For this reason, we will consider the most simple commands, which can be performed 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 most simple 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 over high level, that is parental, use the cd .. command (the two dots mean the parent directory).

Now let's do it switch to another local disk . 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

For getting detailed information, for example, for robocopy, type: help robocopy

note that help displays all descriptions on Russian language, of course, if you have a Russified version of Windows.

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

So, the new Windows 10 operating system gives its users. What about old, proven interfaces that make working on a computer much easier? For example, you can do a lot of operations through the command line that are difficult to implement through windows. Naturally, a lot of work has been done to fix bugs in Windows 10. Nomadic chaos from previous versions systems, such as the pile-up of slabs in the Start menu, were stopped. Therefore, it was decided to leave the command line.

Of course, such an interface itself is unusual for the typical user. However, it is very convenient to work through the command line once you remember the primitive commands. No need to click the mouse, everything is done by hand. And you can do everything faster with your hands if you develop the skill. Now we'll tell you how to find the command line in latest Windows 10 and start working through it.

Instant launch

For advanced computer users, hotkeys have long existed. These simple combinations open any applications that do not need to be searched for several minutes across windows. In this case, the command line opens by pressing Win + X. You can also easily right-click on the Start menu in Windows 10. A context menu will appear in which you should select a special item.

Search by search

To make work easier in Windows 10, there is a special search. Yes, the developers have implemented such a function through the image of a magnifying glass on the taskbar. The hand just wants to click on the attractive icon. Let's do it. A search bar will open in which you need to type: cmd. If you need to run as administrator, which is almost always necessary, then just right-click on the search results and select the appropriate launch.

Familiar windows

In Windows 10, there is no escape from the familiar windowed interface. Actually, the system is based on this principle. Therefore there is easy way run command line via standard conductor. Any folder has a File menu, which opens with a mouse click. Naturally, an item with the desired name will appear, where you can open the command line even as an administrator with one click.

Such in simple ways You can open the command line so that you can easily work through it later. How to do this? It is enough to type typical commands online. Of course, you won’t be able to remember everything right away. But if you practice regularly, then after a while your hands will write on their own. necessary commands. After all GUI not only eats great amount computer resources, but also loads human brain additional information, which is often superfluous.

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 simplest 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 right button mouse and select the run as administrator option 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 Windows folder.

No. 9. Command line file in Windows search 10

The most common startup recommendations are: Start, run, cmd. There is a Run option in the start menu. It runs a program that allows you to send single commands Windows system. In this case cmd command launches the cmd.exe executable file located in the system32 folder.

C:\WINDOWS\system32\cmd.exe

On some Windows versions The execute menu item is removed by default. In this case, press + R, enter cmd, then Enter. You can also launch the command line directly from the system32 folder by making a shortcut to launch it on the desktop (right-click on cmd.exe and select Send/Desktop from the menu) or through the task manager (button new task-cmd).

By default, you cannot use the mouse in the command line (move the cursor or select text). This is inconvenient in general and for beginners in particular. In addition, the black screen looks somehow too gloomy and dull. So after running the command line

you will need to change its settings. Right click on cmd window and select defaults. It’s worth noting right away that the default settings apply to cmd.exe as a whole, and the properties apply to a specific open window.

In the command line properties window that appears, we see four tabs:

On the Options tab, it is worth checking the items to discard repetitions (to reduce the filling of the command buffer) and mouse selection (so that you can use the mouse in your work).

On the Fonts and Colors tabs, everything is simple: select the size, type and color of the font, as well as background color window. I will only note that the font size affects the size of the command line window, so it should be set before the window size, and not after.

In the Arrangement tab, you set the size of the window and its initial location at startup. I still don’t fully understand in what units the quantities are presented, so I advise you to set the size, guided by the preview window on the left.

It is worth noting that the buffer size affects the window capacity, i.e. on the amount of information that can be viewed without problems after the command execution results are displayed on the screen (horizontal and vertical stripes scroll). If you set equal sizes for the window and the buffer, then the window will display only the tail of the output information that will fit there.

Also, if the line does not fit into the width of the window, this will lead to its wrapping. It is less convenient to perceive information presented in this way. Therefore, I always set the buffer much larger than the window size. This allows you to view large amounts of information using the scroll bars on the right and bottom. The image below is clickable. The preview shows the beginning of the output of the dir command for the system32 folder, and by clicking on the preview you can see the tail of the output (pay attention to the scroll bar on the right - there is a lot of data).

Command Line Commands

The console is configured, now it remains to familiarize you with the command line commands. To display them full list just type the help command.

help - displays help for the commands help CD or CD /? - display help for one command (for the CD command) cd - go to the root directory cd .. - go to the parent directory D: - go to drive D. dir - output all contents of the folder dir *.exe - output a list of exe files in the folder cls - clear the command line screen

Command Prompt remembers the commands you enter. You can scroll through them using the ⇑ and ⇓ keys. You can view the contents of a folder using the Tab key (Shift + Tab scrolls in reverse order). You can scroll through files to a specific letter or letters. For example, by typing the letter s and pressing Tab, you can scroll through only files and folders starting with this letter ( s system, s ystem32, s ystem.ini, etc.) . How this can be used:

For example, you need to go from the root of drive C to the system32 folder, find and launch the control panel in it. You can simply type:

C:\ windows\system32\control.exe

But this is not always fast and convenient, and besides, you don’t always know what exactly you need to type. Therefore, you can type the command CD, then after the space type wi Windows, put a slash after it, type the letters sy, scroll with the Tab key to the folder sy stem32, then slash again and the same with control.exe.

C: cd wi ndows\ sy stem32\ co ntrol.exe

This tab method is much faster in most cases than simple typing, since file and folder names can be long.

When you enable mouse support, you can copy information from the command line by selecting a section of text with the mouse and pressing Enter. The right mouse button, on the other hand, pastes information from the clipboard into the command line.

To conclude this article, I will say that cmd.exe is just an input/output program, the same as notepad. Of course, there are more advanced analogues that can also be used. One such program is Console Portable

By the way, in the GNU Linux operating system the command line can be called directly from the folder. In this case, a line will open immediately with the folder address and you will not need to enter it manually. In Windows, in order to open the command line directly in a folder, you need to hold down Shift, press the right mouse button and select "Open command window" from the menu.

You can also add this feature (and a number of others) using an extension program context menu FileMenuTools:

At a time when everyone uses a graphical interface, the regular command line (console) is still relevant. This is the ancestor of the human-computer communication interface. In this article I will tell you what it is and in what ways the Windows 7/10 command line is launched.

The console is one of the types of text interface that became available to a wide range of users along with the MS DOS operating system. The essence of working with this type of interface is that all commands are executed by entering them from the keyboard.

Most people consider the command line to be a relic of the past that should have gone into oblivion along with the command line itself. DOS system. After all, graphic Windows interface much more convenient, visual and understandable for most people. But do not forget that the command line is not DOS, although the external similarity is certainly present - the same black window with a blinking cursor.

The console remains an indispensable control method, the need to use which may often arise not only for system administrator, but also for the average user.

A short video on how to launch the command line and how to execute commands:

Running the command line

Even though the user sees everything in graphical form, the console has been and remains one of the main elements of computer control. Of course, the average user does not need to know commands at the IT level, but the basics of management will be useful to everyone.

To start the command line you need to go to the menu “Start -> Run”, write the word “cmd” in the window and press “Enter”. In Windows 8/10 (or if there is no Run menu item), press the key combination “Win ​​+ R”.

By the way, for the “Run” option to appear in Windows, you need to right-click on the button “Start -> Properties -> Customize” and check the box:

Open the console with admin rights

Sometimes you need to open a command prompt as an administrator. This is necessary to execute commands that require elevated access rights to the system. To do this, in the search bar of the Start menu, write “cmd” and in the search results, right-click on the found “cmd” program and select “Run as administrator”

In Windows 10 they made it a little easier, you need to right-click on the “Start” menu and select “Command Prompt (Admin)”

If necessary, the console can be found at the standard address "C:\Windows\System32\cmd.exe" and call it from there in normal mode, or through the right button with administrator rights. You can create a shortcut for yourself on your desktop by simply dragging it from the menu “Start -> Accessories -> Command Prompt”. By the way, the “Run” input field is also a command line.

To open the console every time with administrator rights, you need to:

  • click on the shortcut, select “Properties”
  • On the “Shortcut” tab, click the “Advanced” button
  • check the box “Run as administrator”

Here is the console itself. As you can see, there is nothing superfluous, everything is done quite ascetically. In the window you can see the usual “copyright” sign, indicating that the software belongs to Microsoft, below is the current directory and a cursor indicating readiness to start working:

The appearance can be given some changes to make it more suitable for a particular user. This can be done by right-clicking on the window title and selecting “Properties”. There you can customize colors, font, layout and some other appearance parameters:

How to copy and paste text

The developers screwed us over because the standard “Ctrl+C/V” and “Ctrl/Shift+Insert” buttons do not work in Windows XP/7. To copy text you need:

  • right click on the window
  • select “Mark”
  • select text with left mouse button
  • right click mouse

And to paste text from the clipboard into the console window, you need to right-click and select “Paste.” But there are two options in the Properties window:

If you check the “Select with mouse” checkbox, then we can immediately select text with the mouse, without selecting the “Mark” item, and we will simply insert text by clicking the right button. If you uncheck the “Quick Paste” checkbox, the text will be inserted on top of the existing one without moving it to the right. In Windows 10, this all already works by default.

Buttons for working on the command line

For more comfortable work with the console, you can use the following hotkeys:

  • The Up/Down arrows help you navigate through the history of entered commands;
  • – enter the last command letter by letter;
  • – output of the previous command;
  • – displaying a numbered list of commands (usually the system remembers the last 50 commands, although it can be configured differently);
  • — moving the cursor to the beginning/end of the line;
  • — move back/forward one word;
  • — switching between insert and rewrite modes (as in Word);
  • — delete the entered text.

Read which ones in a separate article.







2024 gtavrl.ru.