How to open the windows command prompt

How to Open Command Prompt

Open Command Prompt to Execute Commands in Windows 10, 8, 7, Vista, & XP

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 here.

While Command Prompt probably isn’t a tool most of you will use on a regular basis, it can really come in handy now and then, maybe to troubleshoot a specific Windows problem or to automate some kind of task.

How you open Command Prompt differs between Windows versions, so you’ll find steps below for 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 10

Select the Start button.

Type cmd.

Select Command Prompt from the list.

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.

Open Command Prompt Using Power User Menu

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

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 still access it from the Power User Menu by editing the taskbar settings.

Open Command Prompt in Windows 8 or 8.1

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 a complete list of the commands available through Command Prompt in Windows 8, including short descriptions and links to more in-depth information if we have it.

Читайте также:  Драйвер для принтера hp 3600 драйвер windows

Open Command Prompt in Windows 7, Vista, or XP

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.

Here’s 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 XP through Windows 10 can also be opened with a command. This is especially helpful if you like using the Run dialog box or if Windows 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.

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:

  • check that you have administrative rights
  • . command can only be executed from an elevated command prompt
  • you must be an administrator

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.

Ways to open Command Prompt in a folder in Windows 10

The Command Prompt is a feature of Windows that lets you execute MS-DOS and other computer commands and perform tasks on your computer without using the Windows graphical interface. There are various ways how you can launch Command Prompt windows.

Open a command prompt window in any folder

In this post, we will see two very simple ways to open a command prompt window in any folder or on the desktop, without having to navigate the menu. The first is using the context menu.

1] Hold down the Shift key and use the context menu

UPDATE: Windows 10 has now replaced Open command window here with Open PowerShell window here. But with a registry tweak, you can restore Open command window here item to Windows 10 folder context menu.

To open a command prompt window in any folder, simply hold down the Shift key and right-click on the desktop. In the context menu, you will see the option to Open command window here. Clicking on it will open a CMD window.

You can also do the same inside any folder. The prompt takes the path of the folder from where it is opened.

2] Type CMD in the address bar

There is another trick to do the same thing. navigate to the folder and then simply type CMD in the address bar and hit Enter to open the command prompt window there.

You will see the CMD taking the path of this folder.

Speaking of the command prompt, there are several Command Prompt tricks you may not know, including how to open an elevated command prompt using a CMD. Check them out!

Date: April 8, 2020 Tags: CMD, Context Menu

Читайте также:  Copy windows to usb drive

How to Open the Command Prompt in Windows 10

Kris Koishigawa

If you need to run commands like mkdir , ping , and netstat in Windows, you’ll need to open the Command Prompt program.

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”:

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 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 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”:

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:

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.

Kris Koishigawa

Read more posts by this author.

If you read this far, tweet to the author to show them you care. Tweet a thanks

Learn to code for free. freeCodeCamp’s open source curriculum has helped more than 40,000 people get jobs as developers. Get started

freeCodeCamp is a donor-supported tax-exempt 501(c)(3) nonprofit organization (United States Federal Tax Identification Number: 82-0779546)

Our mission: to help people learn to code for free. We accomplish this by creating thousands of videos, articles, and interactive coding lessons — all freely available to the public. We also have thousands of freeCodeCamp study groups around the world.

Читайте также:  Мультитач для тачпада windows

Donations to freeCodeCamp go toward our education initiatives, and help pay for servers, services, and staff.

How to Open and Use the Command Prompt in Windows

Getting started

Windows, MacOS and Linux have command line interfaces. Windows’ default command line is the command prompt. The command prompt allows users to use their computer without pointing and clicking with a mouse.

The command prompt is a black screen where users type commands to use their computer. The same tasks that can be done by pointing and clicking with a mouse can also be done with the command prompt. The difference is that many tasks such as creating folders and deleting files can be done faster in the command prompt.

Also, it allows users to configure their computer and run programs that they otherwise could not do by pointing and clicking.

Opening the Command Prompt

To access the command prompt, click the windows start menu on the Desktop tool bar (you can also press the windows button on your keyboard) and type cmd and hit enter . The command prompt will appear, it will display some text like to following below:

C:\Users\YourUserName is called your current working directory (directory is another way to say folder). It is like a street address that tells you where you are on your computer.

The current working directory can be a guide as you navigate through your computer. On the right of the > we can type cd , which stands for Change Directory, and the name of a directory that you want to navigate to. In this case we will type Documents . Enter cd Documents and your current working directory should look like the following:

To go back one directory type and enter cd.. . Your current working directory should return to this:

With the cd and cd .. commands you can move back and forth through directories. This might seem very basic at first but as you learn more commands the command prompt will become a very useful and efficient tool.

Here is a list of common commands:

Usage Examples:

Making a Directory

Getting Info on a Command

Deleting a File and Contents

Useful tips:

  • The command Ipconfig shows your computer’s ip address
  • If you type part of a directory’s name and hit the tab key the command prompt will autocomplete it and if you hit the tab key repeatedly it will cycle through directories that start with the same letter
  • You can use other shells or tools such as git bash or cmder to add more commands and functionality to your command prompt
  • Some tasks require you to run the command prompt as an administrator you clicking the windows button and typing cmd admin and hit the enter key
  • If you know the path to a file or directory can type cd PATH_TO_YOUR_DIRECTORY instead of changing directories several times to get to a directory or file
  • When you hit the up arrow key your previously entered command will appear and if you hit it repeatedly it will cycle through all of your previously entered commands

If this article was helpful, tweet it.

Learn to code for free. freeCodeCamp’s open source curriculum has helped more than 40,000 people get jobs as developers. Get started

freeCodeCamp is a donor-supported tax-exempt 501(c)(3) nonprofit organization (United States Federal Tax Identification Number: 82-0779546)

Our mission: to help people learn to code for free. We accomplish this by creating thousands of videos, articles, and interactive coding lessons — all freely available to the public. We also have thousands of freeCodeCamp study groups around the world.

Donations to freeCodeCamp go toward our education initiatives, and help pay for servers, services, and staff.

Оцените статью