How to set up smartphones and PCs. Informational portal
  • home
  • Windows 7, XP
  • Run command prompt with command. Various Ways to Run Command Prompt as an Administrator on Windows

Run command prompt with command. Various Ways to Run Command Prompt as an Administrator on Windows

The command line is an extremely useful thing that it is desirable to be able to use not only for computer scientists, but also for ordinary users. This article will answer a popular question from users: what is the command line and how to run it.

The essence of the command line

The command line, one might say, is an intermediary between the operating system of the computer and the user. If you enter certain data into it, it will give the appropriate command to the computer, which, in turn, will try to execute it. The line not only sends any requests, but also simplifies the use of the computer. There are times when it takes a long time to complete a task manually. In the modern world, when the entire business is built on an automated principle, a quick reaction of the system administrator to the problems that have arisen is simply mandatory. It is this problem that the command line simplifies.

How to launch the command line through start (method 1)

First, click on the flag icon (start) in the lower left corner.

Click once on “All programs” or “All programs”.

We are looking for a tab called “System Tools - Windows” and in the drop-down list, click on “Command Prompt”.

How to launch the command line through start (method 2)

If you go to the start menu, you will find a text input line. This is a search that allows you to quickly find programs around your computer based on their name. Thus, the command line also has its own key name (cmd.exe). To find the command prompt in this way, enter cmd.exe in the input field. The search results will only give you 1 result. Click on it and a command prompt will open.


How to launch command prompt via keyboard shortcut

You can also launch the command line through a key combination. You can do this by pressing Win + R at the same time.

The line that appears is slightly different from the previous ones. A pre-prepared query is entered into it. On this request, instructions for action are transmitted to the computer.

Choose the command line launch option that is more convenient for you. Remember, in order to give any order to the operating system, you may often need certain keywords. If necessary, they can be easily learned.

For most users, for “communication” with Windows, the graphical interface proposed by the developers is quite enough - it is simple and intuitive. But for some purposes that the average user rarely encounters, it is more convenient to use the command line. How to start command line in Windows?

First, let's understand what the command line is. Command line interface (console) - text. The user enters certain commands from the keyboard, the system executes them. The command line is used, for example, to access the site (server) or for problems with the Internet.

On Windows NT (Windows 2000 and later), use command line interpreter cmd.exe, which replaced the outdated command.com interpreter used on Windows 9x and MS-DOS family systems. An interpreter translates a text command into a system-understandable form. Run Command Prompt in Windows means to run the cmd.exe application.

To invoke the command line, you can use one of the following methods.

Click on the "Start" button. In the menu that opens, select Run. In the window that opens, in the Open line, enter the name of the cmd.exe program and click on the OK button or press the Enter key on the keyboard. In order to call the Run window, you can also use the keyboard shortcut Win + R (Win is the key with the Windows logo in the bottom row of the keyboard).

You can also open a command prompt in a more "traditional" way by selecting it from the list of installed programs. To do this, again, click on the "Start" button, select the All Programs item in the menu, select the Standard item in it, and from the list of standard programs select the program we need - Command Prompt.

But a command prompt launched this way may prevent you from executing certain commands. To achieve your goal, you need to run the command prompt as an administrator. To do this, we “get” to the command line in the previous way (Start - All Programs - Accessories), but click on the phrase Command Line not with the left mouse button, but with the right. The context menu will open. In it, click on the item Run as administrator. A dialog box may appear: "Do you want to allow the following program to make changes to this computer?". Feel free to click "Yes".

In order not to perform the same manipulations every time you start the command line, you can configure auto run as administrator. To do this, we call the context menu in the same way as in the previous case, but instead of the Run as administrator item, select the Properties item. In the properties dialog box that opens, go to the Shortcut tab and click the Advanced button. In the window that opens, check the box next to Run as administrator, click on the OK button, and in the properties window, click Apply and OK.

Windows 7 includes extensible CLI shell, Windows PowerShell. It can be used instead of the standard command line. Starting Windows PowerShell is as simple as running a regular command line (cmd.exe): Start - All Programs - Accessories - Windows PowerShell.

By running the command line, you can see list of the most frequently used commands. To do this, enter the help command and press the Enter key. A list of available commands will open. To get more information about the command you are interested in, you can type help command_name, for example, help tree. If you need to get information about a specific utility, use the utility_name /? construct, such as ping /?.

Command line - pretty useful Windows tool which can be useful in various situations. And the next time an ISP tech support representative asks you to open a command prompt and check the ping, you won't have the question "How to run a command prompt?"

The command line is a convenient, fast and powerful tool for managing the computer OS, which is not familiar to most ordinary users. On older computers, the command line was the only way for a person to communicate with the PC. Even after the advent of a visual, and later a graphical interface, which is focused on the use of manipulators, the command line is still relevant, and allows professionals to quickly and efficiently perform the actions they need.

Where can you find the command line? The latest generations of operating systems hide it deep enough from users. But to perform Windows settings and perform some actions in this OS, the command line is indispensable.

The easiest way to launch the command line is to use the Windows main menu. You should open Start, Programs, Accessories, Command Prompt one by one, and a black window will appear on the computer screen, in which the white cursor blinks. You can enter commands and see the results of their actions.

Another way to open a command prompt is to use the "Run" item in the same menu and enter the cmd command. The advantage of this method is that you can call the "Run" field using the Win+R hotkey combination, without scrolling through nested menus.

When using the Far Manager shell or similar, opening the command line is even easier. It is permanently open and is located in the Far window at the bottom of it. To view the results of your commands, you need to press Ctrl+O, and the Far panel will collapse so as not to block your view.

There are times when users are unable to enable the command prompt. If, when performing the above steps, you see a message that the command line has been disabled by the administrator, then you have two options: either the command line is really disabled by the administrator and then you cannot open it, or this is the result of virus programs.

The last option to enable the command line is to return to the Run menu and enter the gpedit command. You need to go to the “User Configuration” section and open Administrative Templates, System, All Settings one by one. Next, you need to open the "Disable Command Prompt" option. You must disable its status from Disabled or Not Set, after which the command line will be available again. Don't forget to also scan your system for viruses.

At a time when everyone uses the graphical interface, the usual command line (console) is still relevant. This is the ancestor of the human-computer interface. In this article I will tell you what it is and in what ways the windows 7 command line is launched, and I will show the main console commands (video is attached!)

The console is one of the types of text interface, which 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 given by entering them from the keyboard.

Most people think of the command line as a relic of the past that should have fallen into oblivion along with the DOS system itself. After all, the windows graphical interface is much more convenient, clearer and more understandable for most people. But do not forget that the command line is not DOS, although there is certainly an external similarity - the same black window with a blinking cursor.

The console remains an indispensable method of management, the need to use which can often arise not only for a system administrator, but also for an ordinary user.

How to run command line

Despite the fact that the user sees everything in a graphical form, the console has been and remains one of the main elements of computer control. Of course, an ordinary 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" and in the window write the word "cmd" and press "Enter". In windows 8 (or if there is no Run menu item), press the Win + R key combination.

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

Sometimes it becomes necessary to open a command prompt as an administrator. This is necessary for executing 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 program "cmd" and select "Run as administrator"

If necessary, the console can be found at the standard address "C:\windows\System32\cmd.exe" and called from there in normal mode, or through the right button with administrator rights. You can create a desktop shortcut for yourself by simply dragging it from the Start -> Accessories -> Command Prompt menu.

Since sometimes they want to run the command line every time with administrator rights, you can click on the shortcut, select "Properties" and on the "Shortcut" tab, click the "Advanced" button

Check the "Run as administrator" box here.

This is what the console looks like. As you can see, there is nothing superfluous, everything is done quite ascetically. In the window you can see the familiar "copyright" sign, indicating that the software belongs to Microsoft, below - the current directory and the cursor, which means ready to start working.

Appearance can be given some changes so that it is more suitable for a particular user. This can be done by right-clicking on the title bar of the window and selecting "Properties". There you can configure colors, font, location and some other command line options in windows 7

How to copy and paste text in the console

The developers screwed us over because the standard clipboard buttons "Ctrl+C/V" and "Ctrl/Shift+Insert" don't work here! To copy text:

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

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 the text with the mouse, without selecting the “Mark” item, and we will paste the text simply by pressing the right button.

If you uncheck "Quick Insert", then the text will be inserted over the existing one without shifting it to the right.

Buttons for working in the command line windows 7

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

Arrows "Up / Down" help you navigate through the history of entered commands;

- enter the last command by letter;

- the output of the previous command;

- displaying a numbered list of commands (usually the system remembers the last 50 commands, although you can configure it differently);

Move the cursor to the beginning/end of the line;

Move back/forward one word;

Switching between insert and overwrite modes (as in Word);

Delete the entered text.

Basic command line commands

The console has a bunch of commands, and separate tutorials are devoted to this. I will show only some of the most popular of them. Almost any command can be run with parameters. To see help on a command, you need to enter it with a question mark, like this:

team /?

In the help to the command, optional parameters (that is, without them there will be no execution errors) are indicated in square brackets:

Command to read the contents of a folder - dir

Displays the contents of a directory. To select another directory (not the one displayed by default), you must specify the required path. For example:

The command to change the current directory is cd

Changes directory. The current "location" can be viewed here:

To change the current directory, you need to type the command: cd, space, directory name. For instance:

To change to another drive, simply enter the drive name followed by a colon, such as "d:".

Note:

It is not necessary to map the drive if the required directory is on an already open drive;

So that when you enter the “cd” command, you can switch to another disk, you must specify the /D parameter (the so-called flag) in the command. The command will then look like this:

The command to create a directory is mkdir

Creates a new folder with the given name. In order for the folder to be created in the specified directory, you must register the appropriate command, for example:

The same command allows you to create an entire directory tree, in which case the command will look like this:

mkdir c:\1\2\3\4\5\6, where the numbers are replaced with their own folder names

Delete folder command - rmdir

Quite a useful command with which you can remove an unnecessary directory. It looks, for example, like this:

rmdir c:\temp\test

It should be borne in mind that in the standard form, the command will delete only empty directories. If the folder contains content of any kind, the user is presented with the message "The folder is not empty." To delete a folder along with its contents, add the /S option to the command. Then the command will look like this:

rmdir /s c:\temp\test

The deletion is confirmed by pressing the "Y" and Enter keys.

Popular utilities and programs for the console

In addition to built-in commands, the command line is often used to launch console (text-based) and regular programs. To do this, it is not necessary to open the console itself, but you can enter the command directly in the Run window. But at the same time, after its execution, the window will quickly close and disappear. That is, if you need to see the results of the utility execution, you need to run it in windows 7 from the command line itself.

Turns off the computer. Here, most users ask a completely logical question: why go into the console to turn off the computer? The answer is simple. For example, a computer is working on a specific task that cannot be interrupted. And at this time you need to leave, or go to bed corny, while you don’t want to leave the computer on all night.

Of course, there are other ways to turn on the timer to turn off the computer, but almost all of these methods are associated with the launch of an external application. If they are not at hand, then the command line commands in windows 7/8 will come in handy. So, to turn off the computer, we type:

This command will immediately turn off the computer. If it is necessary to postpone the process, we type:

shutdown -s -t 1200, where the numbers are the time after which the computer will turn off (in seconds)

After pressing the Enter key, the countdown will begin until the PC is turned off. In this case, in windows 7, the following message will appear:

10 minutes before the end, a system notification will appear. If there is no longer a need to turn off the computer, then you can stop the countdown simply by adding the -a parameter to the command:

This will disable the countdown.

System information - systeminfo

As the name implies, the command will show the user some information about the user's system and hardware:

But still, to view the parameters of the computer, it is better to use programs like AIDA64.

Screen cleaning - cls

The command allows you to clear the screen from previously entered commands. It is entered just like that, without parameters.

Getting information about network settings - ipconfig

The command without entering additional parameters will display information about the IP address, subnet mask and default gateway of each of the connected network adapters. For more detailed information, enter the command with the parameter:

This way you can find out the MAC addresses of network cards, current DNS servers, IP routing status, and more.

Check disk for errors - chkdsk

Designed to check logical drives and search for possible errors. If no additional parameters have been entered, information about the status of the disk will appear on the screen. Also, along with this command, some of its parameters are often used:

/f - fixes errors found on the disk. In this case, the disk must be blocked before starting the scan. If this is not done, the system will request verification at the next start.

/v – displays the name of each checked file and directory during the check.

/r - Detects bad sectors and restores all data that can be recovered.

Format disk - format

Formats a hard drive or flash drive. It is written as follows:

DO NOT USE THIS COMMAND UNLESS YOU KNOW WHY, OR YOU MAY LOSE YOUR DATA!

Additional options for the command:

/ fs - defines the file system of the formatted disk;

/v - sets the volume label;

/a - sets the size of the cluster. It is not necessary to set the parameter, the system can determine the cluster automatically, according to the size of the disk. Other commands may be written, but they will not be listed here.

You can format disks in windows 7 not only from the command line, but also from the context menu of the disk in Explorer.

Information about running processes - tasklist

The command launches a utility that displays a list of running processes (with PID codes), and also provides information about the amount of RAM consumed by each process. Without additional parameters, the utility will simply display a list of processes running on the computer:

If you need to view all processes running on a remote PC, the /s parameter is written in the command and the IP address or domain name of the required computer is indicated.

Terminate processes - taskkill

The command stops a process running on the local or remote system. To stop a process by ID, use the /pid option. So the command would look something like this:

taskkill /pid 5637 where 5637 is the PID (Process ID)

It is also possible to stop a process with a specific image name by adding the /im option. Subsequently, the command will look like this:

taskkill /im notepad.exe, where "notepad.exe" is the name of the program.

Sometimes I'm just too lazy to look for a program in the Start menu and then I just type the name of the file to be launched in the Run window. Most used by me:

Registry Editor - regedit

Many have already had the opportunity to get acquainted with this utility, this is the registry editor. With it, the hidden settings of the operating system are changed, and you don’t need to climb there without proper knowledge, otherwise you can break windows.

System configuration - msconfig

Calls the special service "System Configuration".

In principle, most users have already encountered this window. Most often it is used to disable autorun programs.

System File Checker - sfc

Launches a utility that repairs corrupted system files. A very useful utility that can also be supplemented with some commands:

/scannow - for immediate scanning of protected system files;

/scanonce - to scan protected system files once at the next system startup;

/scanboot - to scan protected system files every time the system starts.

If the scan reveals damaged or “left” files, the program will ask you to insert a disk with the windows installation distribution.

appwiz.cpl - opens the standard "Add or Remove Programs" window

calc - built-in windows "Calculator"

notepad - notepad

pbrush - graphic editor "Paint"

diskmgmt.msc - disk management window, here you can partition the hard disk into sections

services.msc - system services management

In conclusion

Here is a minimal set of commands that can be used when working with the console. There are many more useful, or even just interesting commands, many of which the user can learn on their own. To do this, simply enter the “help” command in the windows 7/8 command line, and it will show the available commands.

And in order to find out detailed information about any of them, you just need to enter the HELP query and indicate the name of the command after the space. After that, the console will display all the necessary information, including the syntax and other components of the command.

That's all, here's a short video on how to run the command line in windows 7 and how to run commands

IT-like.ru

Starting the windows 7 command line

This article will discuss the windows command line, what it is and what it is used for.

The windows command line (sometimes called "console", "environment") is a Microsoft software product that uses the cmd.exe command interpreter and allows a computer user to interact with the operating system by entering MS-DOS commands using the keyboard.

It so happened that many of the functions that allow you to more finely control the operating system are simply not available in the graphical interface, so the windows console is the only way to use them.

How to start command prompt in windows 7?

1st way:

Go to "Start" -> "Run", in the window we write the command "cmd" and click "OK".

2nd way:

"Start" -\u003e in the search bar we write "command" or "cmd". Windows itself will find what we need, all that remains is to choose.

3rd way:

We go to "Start", select "All Programs", then - "Standard" and in the list we are looking for the item of interest to us "Command Prompt".

4th way:

We go to "My Computer", then "Local Disk C", the folder "windows", "System 32". After that, find the CMD.exe file and open it.

It doesn't matter which method you choose, you'll get the same result:

It happens that you need to open the windows 7 command line as an administrator. This is quite easy to do using the second or third method described above. The only thing that will be different is that to run it you need to right-click and select "Run as administrator".

To get acquainted with the commands that the Windows console supports, just enter the “help” command.

techno-bum.ru

Command line in windows 7

The windows 7 command line is one of the features of windows that provides the input of MS-DOS commands 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 means the closing angle bracket (>). This indicates that the CLI can accept commands.

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

Launch command line in windows 7

There are several ways to launch the command line. Consider launching the Command Prompt from the current user account:

  • Press Win + R (Start - Run), type cmd and click OK

As you can see, the launch of the command line with the rights of the current user has been completed! To view a list of commonly used commands, at the command prompt, type help, and then press ENTER. To display more information about each of these commands, type help commandname, where commandname is the name of the command you want more information about (for example, help ping).

Innovations in cmd in windows 10 - I want 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 clicking on the link).

Run Command Prompt as Administrator

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

  • Start - All Programs - Accessories - Command Prompt, right-click and select "Run as administrator".

Cmd4Win.ru

Command line (console) in windows 7

The system console came to windows from the older MS-Dos operating system, which did not yet have any graphical interface. All work with the PC was carried out using text commands. Users of those times knew hundreds of service words and various options for launching applications, setting up a network, changing computer settings, and so on. The current command line in windows 7 is fraught with a variety of secrets that can seriously help when working with a PC. The article describes how to open the utility and provides a list of common commands.

How to open with GUI

There are several ways to open the console.

The first does not require the use of a keyboard, which is suitable for users who are not used to entering commands:

You can also create a shortcut by right-clicking the context menu. Select the action "Send", and then "To the desktop". So you will be able to quickly open the program.

Keyboard launch

The second method looks easier if you have a lot of applications installed that clutter up the list of programs:

And finally, the third way, which is favored by experienced and advanced users who are used to controlling their PC from the keyboard:


Control Secrets

The windows 7 command line may seem rather unfriendly to ordinary users of a personal computer. For comfortable work with it, you need to learn simple secrets.

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

This early version of the Windows operating system, called MS DOS, featured single-tasking (all processes ran sequentially rather than in parallel) and a predominantly text-based interface.

Now, most operations on a Windows computer can be performed exclusively with the mouse, but in those days, even for the simplest actions, you needed to know a lot of complex text commands.

Through a shortcut in the start menu

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

It can also be quickly found through the Start menu search.

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 tiles with applications (new version of Start) and right-click on a free area. As a result, a panel will pop up at the bottom, giving advanced features.
    In it, you need to click on the icon All applications in the lower right corner.

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

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

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

Search for an executable file on the system drive

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

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

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

#9: Command Line File in Windows 10 Search

Top Related Articles