How to open command line

How to open command line

How to Open the Command Prompt in Windows 10

How to open command line. Смотреть фото How to open command line. Смотреть картинку How to open command line. Картинка про How to open command line. Фото How to open command line

Turns out that there are a bunch of ways to do that. We’ll cover some of the most common ways to open Command Prompt in this article.

Note: While this article was written for Windows 10, some methods should be similar for earlier versions of Windows.

How to open Command Prompt from the Windows Start Menu

First, click the Start Menu button in the lower-left corner to open the start menu.

Scroll down to “Windows System” and click that to open a dropdown of different Windows programs. Then click “Command Prompt”:

How to open command line. Смотреть фото How to open command line. Смотреть картинку How to open command line. Картинка про How to open command line. Фото How to open command line

How to open Command Prompt with the search bar

One of the fastest ways to open Command Prompt is by using the search bar in the Windows 10 Taskbar.

Just type “cmd” into the search bar and click on “Command Prompt”:

How to open command line. Смотреть фото How to open command line. Смотреть картинку How to open command line. Картинка про How to open command line. Фото How to open command line

How to open Command Prompt from the Run program

Windows 10 has another program called Run that lets you, well, run other programs. You can also do things like open folders and files, but that’s outside the scope of this tutorial.

To open Run, you can open the Start Menu and find it under “Windows System”. You could also type “run” in the search box and find it that way.

But the fastest way to open Run is with the shortcut Windows Key + R.

Then, once the Run window is open, just type in “cmd” and press “OK” to open Command Prompt:

How to open command line. Смотреть фото How to open command line. Смотреть картинку How to open command line. Картинка про How to open command line. Фото How to open command line

How to open Command Prompt as an administrator

Some commands like powercfg or chkdsk require that you open Command Prompt as an administrator. This will give you elevated access for whatever commands you run.

To open Command Prompt as an administrator, find Command Prompt using any of the methods described earlier.

Then, right click on “Command Prompt” and click “Run as administrator”:

How to open command line. Смотреть фото How to open command line. Смотреть картинку How to open command line. Картинка про How to open command line. Фото How to open command line

You may need to hover over “More” depending on the method you used to find the Command Prompt program.

Also, you may see a “User Account Control” window pop up with the message “Do you want to allow this app to make changes to your device?” Just click “Yes” to continue.

After this, you should see a Command Prompt window with “Administrator: Command Prompt” across the top:

How to open command line. Смотреть фото How to open command line. Смотреть картинку How to open command line. Картинка про How to open command line. Фото How to open command line

Alternatively, you could open Command Prompt as a normal user, type in a command, and then press Ctrl + Shift + Enter to run that command as an administrator.

Note: While you should always be careful about what commands you run in Command Prompt or any other command line program, be especially mindful about what you run as an administrator. One wrong command could delete important system files and ruin your installation of Windows.

In summary

These are just some of the many ways to open Command Prompt in Windows. Go with whatever works best for you and run commands to your heart’s content.

But please, before you run any command, double check that everything is correct, especially if you opened Command Prompt as an administrator. Speaking from experience, a few extra seconds of caution could save you hours of reinstallation.

And with that, go forth and (safely) run all the commands.

How to Open Command Prompt (Windows 11, 10, 8, 7, etc.)

Search the Start menu for CMD or Command Prompt

How to open command line. Смотреть фото How to open command line. Смотреть картинку How to open command line. Картинка про How to open command line. Фото How to open command line

In This Article

Jump to a Section

What to Know

This article explains how to open Command Prompt, which is one of the command-line interface programs used to execute commands in Windows operating systems. While it probably isn’t a tool most of you will use on a regular basis, Command Prompt can really come in handy now and then, maybe to troubleshoot a specific Windows problem or to automate some kind of task.

How to open command line. Смотреть фото How to open command line. Смотреть картинку How to open command line. Картинка про How to open command line. Фото How to open command line

Some popular Command Prompt commands you might have heard of include ping, netstat, tracert, shutdown, and attrib, but there are many more. We have a complete list of Windows Command Prompt commands.

How you open Command Prompt differs between Windows versions, so you’ll find steps below for Windows 11, Windows 10, Windows 8 or Windows 8.1, and Windows 7, Windows Vista, and Windows XP. See What Version of Windows Do I Have? if you’re not sure.

Open Command Prompt in Windows 11 or 10

There are a few ways, but using the search bar on the taskbar is one quick method.

Select the Start button.

Type cmd.

How to open command line. Смотреть фото How to open command line. Смотреть картинку How to open command line. Картинка про How to open command line. Фото How to open command line

Select Command Prompt from the list.

How to open command line. Смотреть фото How to open command line. Смотреть картинку How to open command line. Картинка про How to open command line. Фото How to open command line

Open Command Prompt Through the Start Menu

Another way to open Command Prompt in Windows 10 is to look in its Start menu folder:

Select the Start button.

Select the Windows System folder from the list.

Choose Command Prompt from the folder group.

How to open command line. Смотреть фото How to open command line. Смотреть картинку How to open command line. Картинка про How to open command line. Фото How to open command line

Open Command Prompt Using Power User Menu

One more method is through the Power User Menu. If you’re using a keyboard or mouse, choose Windows Terminal (Windows 11) or Command Prompt (Windows 10) from the menu that appears after pressing Win+X or right-clicking the Start button.

How to open command line. Смотреть фото How to open command line. Смотреть картинку How to open command line. Картинка про How to open command line. Фото How to open command line

You might see Windows PowerShell options in the Power User Menu instead of Command Prompt. In more recent versions of Windows 10, Command Prompt has been replaced by PowerShell, but you can switch between PowerShell and Command Prompt from the Power User Menu. Windows Terminal is the replacement in Windows 11.

Open Command Prompt in Windows 8 or 8.1

You’ll find Command Prompt in Windows 8 through the Apps screen.

Select the Start button and then swipe up to show the Apps screen. You can accomplish the same thing with a mouse by selecting the down arrow icon at the bottom of the screen.

Prior to the Windows 8.1 update, the Apps screen can be accessed from the Start screen by swiping up from the bottom of the screen, or right-clicking anywhere, and then choosing All apps.

If you’re using a keyboard or mouse, a really quick way to open a Command Prompt window in Windows 8 is through the Power User Menu—just hold the WIN and X keys down together, or right-click the Start button, and choose Command Prompt.

Swipe or scroll to the right on the Apps screen to locate the Windows System section heading.

Select Command Prompt. You can now execute whatever command you needed to run.

See our list of Windows 8 Command Prompt commands for all of the commands available through Command Prompt in Windows 8, including short descriptions and links to more in-depth information if we have it.

Open Command Prompt in Windows 7, Vista, or XP

In these versions of Windows, Command Prompt is found through a folder group in the Start menu.

Open the Start menu from the bottom-left corner of the screen.

In Windows 7 and Windows Vista, it’s a bit faster to enter command in the search box at the bottom of the Start menu and then choose Command Prompt when it appears in the results.

Go to All Programs > Accessories.

Choose Command Prompt from the list of programs.

See our list of Windows 7 commands and list of Windows XP commands if you need a command reference for any of those versions of Windows.

Other Ways to Open Command Prompt

Command Prompt in Windows 11 through Windows XP can also be opened with a command. This is especially helpful if you like using the Run dialog box or if File Explorer has crashed and the Start menu is inaccessible (and thus the directions above don’t work).

To do this, enter cmd into the command-line interface. This can be in the Run dialog box (WIN+R) or Task Manager’s File > Run new task menu.

How to open command line. Смотреть фото How to open command line. Смотреть картинку How to open command line. Картинка про How to open command line. Фото How to open command line

Elevated Command Prompts and Old Windows Versions

In versions of Windows released before Windows XP, like Windows 98 and Windows 95, Command Prompt doesn’t exist. However, the older and very similar MS-DOS Prompt does. This program is located in the Start menu and can be opened with the command run command.

Some commands, like the sfc command that’s used to repair Windows files, require that Command Prompt be opened as an administrator before they can be executed. You’ll know if this is the case if you get a message like one of these after trying to execute the command:

How to open command line. Смотреть фото How to open command line. Смотреть картинку How to open command line. Картинка про How to open command line. Фото How to open command line

See How to Open an Elevated Command Prompt for help starting Command Prompt as an administrator, a process that’s a bit more complicated than what’s outlined above.

Type the command cd followed by a space and the name of the folder. For example, if you want to change to the Documents folder, the command is cd Documents. You can also type in cd and drag and drop the folder you want to switch to into Command Prompt.

Instead of Command Prompt, Mac owners use a program called Terminal. To open it, select the Launchpad icon in the Dock and type Terminal in the search field, then select the app. Alternatively, go into Finder and open the /Applications/Utilities folder to find it.

You can use the same keyboard shortcuts you use to copy/paste in other programs—CTRL+C and CTRL+V. On Mac, copy the text in another app, then go into Terminal and choose Edit > Paste.

Go into the folder and Shift+Right-Click, then select Open PowerShell window here, or Open in Terminal, to open Command Prompt in a folder. On Mac, right-click the folder and select New Terminal at Folder from the menu.

Use the cd command to change directories in Command Prompt. To access another drive, type the drive letter followed by a : (C:, D:, etc.). View the contents of a folder using the dir command.

4 Ways to Open Command Prompt in Windows 10

In this article, you can learn how to easily and quickly open Command Prompt in Windows 10 computer by use of four methods. You can choose either one to launch compand prompt and execute command lines.

Video guide on how to open Command Prompt in Windows 10:

How to Open Command Prompt in Windows 10

Way 1: Open the program in Start Menu.

Click the lower-left Start button to open the Start Menu, input cmd in the empty box and tap Command Prompt in the results.

How to open command line. Смотреть фото How to open command line. Смотреть картинку How to open command line. Картинка про How to open command line. Фото How to open command line

Way 2: Turn on Command Prompt by search.

Tap the Search button on the taskbar, type cmd in the search box and choose Command Prompt on the top.

How to open command line. Смотреть фото How to open command line. Смотреть картинку How to open command line. Картинка про How to open command line. Фото How to open command line

Way 3: Open Command Prompt from Quick Access Menu.

Press Windows+X, or right-click the bottom-left corner to open the menu, and then select Command Prompt on it.

How to open command line. Смотреть фото How to open command line. Смотреть картинку How to open command line. Картинка про How to open command line. Фото How to open command line

Way 4: Open the app through Run.

Open the Run dialog using Windows+R hotkeys, enter cmd and tap OK. After that, you will get the command prompt window and execute command lines.

Commands line up

How to open command line. Смотреть фото How to open command line. Смотреть картинку How to open command line. Картинка про How to open command line. Фото How to open command line

The command line, the command prompt, the terminal, the CLI a.k.a. Command Line Interface a.k.a. the Command Line Interpreter. Many names for this useful tool. It is very powerful and grants you access to all the files on your computer but does look scary if you don’t know where to start. No hints are given and you have to do everything yourself. This post will get you started.

How to open command line. Смотреть фото How to open command line. Смотреть картинку How to open command line. Картинка про How to open command line. Фото How to open command line

1. Why use the command line?

Because it is again increasing its popularity among the new technologies. There are some tools that are the most efficient when used on the command line like npm which we’ll use a lot with React Native or Git for version control.

The upside to using the command line is that the commands can be the same for different operating systems. So all the instructions and support can be given as commands. Instead of having to tell you where to click what and in the worst case three different instructions for Windows, Macs and Linux. This makes the process quicker and simpler.

And as a beginner programmer I don’t know anything that would give you the feeling of “Oh boy, here I am. Just coding away!” as quickly as running commands with the command line.

Besides you might soon find yourself in the situation where you need to install a virtual machine on your computer. Then you can test a program or develop one in a different operating system and tools. Then very often this virtual machine appears as a command line window to you.

2. Useful to know before you start

It is possible to harm your system with commands from the command line. But those are very specific commands you will not accidentally write when trying out these commands listed here. The worst thing you can do with these is to delete a file you didn’t mean to delete. But that is always a possibility, even when using the plain old graphic interface and icons.

No news is good news. If the command doesn’t throw an error it did what it was supposed to. Even though on the screen it seems like nothing happened. If you made a typo, it will not be recognised and you will be told so. If you are missing something crucial you will be told so.

Directory means exactly the same as folder. Originally it was thought that data was stored in directories but once graphic interfaces came along with icons the idea of a folder became stronger. A folder can contain other folders and files.

3. How to open the command line?

On Windows the program is called Command Prompt. Find it by opening the Windows menu and typing “ cmd” in the search.

On Macs the program is called Terminal. You can find it from the Utilities-folder. Easy access to Utilities by pressing cmd+U in Finder.

Linux also calls it Terminal. To find it click on the Activities menu and search for “terminal”, “shell”, “prompt” or “command”.

These are the default command line tools for the operating systems. You can also install another command line tool if you want. One option is Gitbash which allows you to run Unix commands on Windows.

4. Where you are and how to move to another location

The following commands are different depending on if you are running a Windows machine or a Mac / Linux which are both based on Unix.

How to open command line. Смотреть фото How to open command line. Смотреть картинку How to open command line. Картинка про How to open command line. Фото How to open command line

So if you don’t know where you are you can write either cd or pwd. I have modified my command line prompt to always show my file path. Windows uses backslashes \ in its paths, Macs and Linux use slashes / in theirs.

When you want to move into one of the folders in this location write cd [folder name].

If you need to change the drive on Windows for example from D drive to C drive just type C:

If you want to go back to the home directory on a Unix machine just type cd

How to open command line. Смотреть фото How to open command line. Смотреть картинку How to open command line. Картинка про How to open command line. Фото How to open command line

And now you know the most important commands! Some of them might be familiar from your childhood and the very first home computers.

5. Two tricks to make your life easier

Making typos is annoying. Here are two tricks that will have you typing less and hence making less typos. Thank you lazy programmers you made my life so much easier!

How to open command line. Смотреть фото How to open command line. Смотреть картинку How to open command line. Картинка про How to open command line. Фото How to open command line

If you want to change into a folder you can start typing the first letter of that folder and press on the Tab key (short for tabulator) which will complete the name for you. So handy! And if you remember the path to a specific folder or file you can continue writing it after the forward slash (*NIX) or backward slash (DOS) and use the Tabs to complete the other names on it as well.

There are two scenarios when the Tab complete doesn’t work. 1) There isn’t a file or folder inside the folder that begins with the letters you typed. 2) There is more than file or folder that starts with what you typed and the command line doesn’t know which one to choose. In either case you can press the Tab key twice and it will list out the options for you if they exist. If there are multiple options you only need to continue typing until only one option remains.

How to open command line. Смотреть фото How to open command line. Смотреть картинку How to open command line. Картинка про How to open command line. Фото How to open command line

Using Tab completion is very useful in many situations, one of them being that there is a space in the folder name. Using the cd-command with a plain space won’t do. There is a work around you can learn to type but the tab completion does it for you.

How to open command line. Смотреть фото How to open command line. Смотреть картинку How to open command line. Картинка про How to open command line. Фото How to open command line

And now you’re already approaching some pro-level command line habits!

6. Create and delete folders

Often we use the command line to install software and to initialise projects. Here is how you can create a folder for a project.

How to open command line. Смотреть фото How to open command line. Смотреть картинку How to open command line. Картинка про How to open command line. Фото How to open command line

Create a new folder with md or mkdir [folder name]

I you want to delete a folder type rd or rmdir [folder name] But this only works on an empty folder!

How to open command line. Смотреть фото How to open command line. Смотреть картинку How to open command line. Картинка про How to open command line. Фото How to open command line

Be careful when deleting folders so you don’t accidentally delete something important.

7. Special roles: Sudo and Administrator

Sometimes you need more permissions to run a specific command. Luckily there are special roles for that

How to open command line. Смотреть фото How to open command line. Смотреть картинку How to open command line. Картинка про How to open command line. Фото How to open command line

For Windows it is called the administrator.

Open the Windows menu and search for the Command prompt. Click on the second mouse button and choose “ Run as administrator” like in the image. Or click on the option on the list that shows on the right side of Best match panel.

This opens a new Command prompt window and as long as you are using this window, you are the administrator and have additional permissions.

How to open command line. Смотреть фото How to open command line. Смотреть картинку How to open command line. Картинка про How to open command line. Фото How to open command line

You are prompted for your password. Sudo has a timer while it remembers your password. So new sudo commands you run right after the first one do not ask for your password. But after a while it is prompted again, to make sure it is still you running the commands.

8. Interrupting a command

How to open command line. Смотреть фото How to open command line. Смотреть картинку How to open command line. Картинка про How to open command line. Фото How to open command line

This does not cancel a command that has already ran through. It only interrupts an ongoing process.

10 Ways to Open the Command Prompt in Windows 10

Rahul Saigal is a technology writer with a half-decade of experience covering everything from software tips to productivity solutions. He’s written many approachable articles, in-depth tutorials, and even eBooks. Read more.

How to open command line. Смотреть фото How to open command line. Смотреть картинку How to open command line. Картинка про How to open command line. Фото How to open command line

The Command Prompt has been around forever, and it’s still a great resource to have at your disposal. Today we’re showing you all of the different ways to open the Command Prompt. We’re betting you don’t know all of them.

The Command Prompt is a pretty useful tool. It allows you to do some things quicker than you can do them in the graphic interface and offers some tools that you just can’t find in the graphic interface at all. And in true keyboard-ninja spirit, the Command Prompt also supports all kinds of clever keyboard shortcuts that make it even more powerful. While it’s easy to just open the Command Prompt from the Start menu, that’s not the only way to do it. So, let’s take a look at the rest.

Note: This article is based on Windows 10, but the majority of these methods should work in earlier versions of Windows, too.

Open Command Prompt from Windows+X Power Users Menu

Press Windows+X to open the Power Users menu, and then click “Command Prompt” or “Command Prompt (Admin).”

How to open command line. Смотреть фото How to open command line. Смотреть картинку How to open command line. Картинка про How to open command line. Фото How to open command line

Note: If you see PowerShell instead of Command Prompt on the Power Users menu, that’s a switch that came about with the Creators Update for Windows 10. It’s very easy to switch back to showing the Command Prompt on the Power Users menu if you want, or you can give PowerShell a try. You can do pretty much everything in PowerShell that you can do in Command Prompt, plus a lot of other useful things.

Open a Command Prompt from Task Manager

How to open command line. Смотреть фото How to open command line. Смотреть картинку How to open command line. Картинка про How to open command line. Фото How to open command line

Open a Command Prompt in Admin Mode from Task Manager the Secret Easy Way

To quickly open a command prompt with administrative privileges from Task Manager, open the “File” menu and then hold the CTRL key while clicking “Run New Task.” This will immediately open Command Prompt with administrative privileges — no need to type anything.

How to open command line. Смотреть фото How to open command line. Смотреть картинку How to open command line. Картинка про How to open command line. Фото How to open command line

Open Command Prompt from a Start Menu Search

You can easily open the Command Prompt by clicking Start and then typing “cmd” into the search box. Alternatively, click/tap on the microphone icon in Cortana’s search field and say “Launch Command Prompt.”

To open Command Prompt with administrative privileges, right-click the result and then click “Run as Administrator.” You could also highlight the result with the arrow keys and then press Ctrl+Shift+Enter.

How to open command line. Смотреть фото How to open command line. Смотреть картинку How to open command line. Картинка про How to open command line. Фото How to open command line

Open Command Prompt By Scrolling Through the Start Menu

Click Start. Scroll down and expand the “Windows System” folder. Click “Command Prompt.” To open with administrative privileges, right-click Command Prompt and choose “Run as administrator.”

How to open command line. Смотреть фото How to open command line. Смотреть картинку How to open command line. Картинка про How to open command line. Фото How to open command line

Open Command Prompt from File Explorer

Open File Explorer, and then navigate to the C:\Windows\System32 folder. Double-click the “cmd.exe” file or right-click the file and choose “Run as administrator.” You can also create a shortcut to this file and store the shortcut anywhere you like.

How to open command line. Смотреть фото How to open command line. Смотреть картинку How to open command line. Картинка про How to open command line. Фото How to open command line

Open Command Prompt from the Run Box

Press Windows+R to open “Run” box. Type “cmd” and then click “OK” to open a regular Command Prompt. Type “cmd” and then press Ctrl+Shift+Enter to open an administrator Command Prompt.

How to open command line. Смотреть фото How to open command line. Смотреть картинку How to open command line. Картинка про How to open command line. Фото How to open command line

Open Command Prompt from the File Explorer Address Bar

In File Explorer, click the address bar to select it (or press Alt+D). Type “cmd” into the address bar and hit Enter to open the Command Prompt with the path of the current folder already set.

How to open command line. Смотреть фото How to open command line. Смотреть картинку How to open command line. Картинка про How to open command line. Фото How to open command line

Open Command Prompt Here from the File Explorer File Menu

In File Explorer, navigate to any folder you want to open at the Command Prompt. From the “File” menu, select one of the following options:

How to open command line. Смотреть фото How to open command line. Смотреть картинку How to open command line. Картинка про How to open command line. Фото How to open command line

Open Command Prompt from a Folder’s Context Menu in File Explorer

To open a Command Prompt window to any folder, Shift+right-click the folder in File Explorer and then choose “Open command window here.”

How to open command line. Смотреть фото How to open command line. Смотреть картинку How to open command line. Картинка про How to open command line. Фото How to open command line

Create a Shortcut for Command Prompt on the Desktop

Right-click an empty spot on the Desktop. From the context menu, select New > Shortcut.

Type “cmd.exe” into the box and then click “Next.”

Note: You don’t need to specify the full path for cmd.exe because the system32 folder is on the System PATH.

How to open command line. Смотреть фото How to open command line. Смотреть картинку How to open command line. Картинка про How to open command line. Фото How to open command line

Give the shortcut a name and then click “Finish.”

How to open command line. Смотреть фото How to open command line. Смотреть картинку How to open command line. Картинка про How to open command line. Фото How to open command line

You can now double-click the shortcut to open Command Prompt. If you want to open the Command Prompt with administrative privileges instead, right-click the shortcut and choose “Properties” from the context menu. Click the “Advanced” button and check the “Run as administrator” option. Close both open properties windows

Now you just have to double-click the shortcut to open Command Prompt as an administrator.

Источники информации:

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *