When it comes to hidden and unique features in the Windows operating system, the command prompt might not be the first thing that comes to mind. Often used to sideload the latest version of Android via ADB and Fastboot commands, the command prompt offers more than meets the eye. Many Chromebooks can run Linux-based commands, but these Windows commands might benefit your PC in multiple ways. From converting video files and reading text documents to closing stubborn background services, there are various uses beyond what you might be aware of.

How to open a Windows command prompt

There's more than one way to open a command prompt in Windows. In the sections below, we cover two common options, allowing you to find the most suitable one for your needs.

Related
How to install Android APKs on Windows 11
No ADB commands required

Launch the universal system command prompt

You'll likely use this method the most for general purposes when working with the Windows command prompt environment. To launch the universal system command prompt, check out the following steps:

  1. Click the Windows icon to bring up the Start menu.
  2. Type cmd into the search box.
  3. Select the Command Prompt entry and click Open. Occasionally, you must select the Run as administrator option to use higher-level system commands.
    The Command Prompt app in the Windows 11 search bar showing it about to be opened.
  4. The command prompt window opens and is ready to go.
    The Command Prompt app's default screen when opened for the first time.

Use the Pin to Start or Pin to taskbar options to open the Command Prompt app quickly if you plan to use it often.

Open a command prompt from any folder

Rather than using the universal system command prompt for general purposes, open it in any folder you want. This makes it easier to run commands without knowing the exact file location, keeping things simple.

To launch a Windows Command prompt from any folder, do the following:

  1. Navigate to the folder in which you wish to open a command prompt.
  2. Click the address bar at the top of the window.
  3. Type cmd into the address text box and press the Enter key.
    Typing cmd to open a command prompt into the address bar of an example folder.
  4. The command prompt window opens in that folder.
    The new command prompt window opened directly in the example folder.

Remove a program that won't uninstall

You might run into a situation where the default uninstaller from a third-party application refuses to work. It could be a simple bug with the uninstaller. However, this doesn't make removing it any easier. Using a command prompt rather than downloading a third-party uninstaller can be helpful in this case.

To use the command prompt to remove a stubborn program from Windows, do the following:

  1. Open a universal command prompt with the Run as administrator option.
  2. Type wmic into the command window, then press Enter.
  3. Type product get name and press Enter.
    Running the wmic command in a Windows command prompt to force uninstall an app.
  4. Type product where name=" program name" call uninstall.
  5. Type Y and press Enter to confirm and remove the selected program.
    The wmic command was used to successfully uninstall the example app
  6. The action was successful if you see a ReturnValue = 0 toward the end.

Convert an MP4 video file to an MP3 audio file

This command can help you extract audio from an MP4 video file with a few simple steps. Whether it's a music video or a video recording you took with your smartphone camera, converting it to an audio-only format is straightforward. It involves downloading a separate program that converts MP4 files using a command prompt. After installing the program, the audio can be extracted from a video by typing one command.

To extract MP3 audio from an MP4 video file, do this:

  1. Download the latest FFMPEG tool for Windows under the Releases section.
  2. Extract the contents of the file to any location.
  3. Open the bin folder, then move an MP4 video file to this location.
    A test video file in the bin folder of the FFMPEG video to audio converter tool on Windows.
  4. Launch a universal command prompt in the bin folder.
  5. Type ffmpeg -i input.mp4 -vn output.mp3 into the command window, then press Enter. Replace input with the MP4 filename and output with what you want the MP3 audio file to be called.
    A Windows command prompt showing an MP4 video file being converted to an MP3 audio file.
  6. Your MP4 is converted to an MP3 using the command prompt interface. You'll find the new MP3 file in the same bin folder where your MP4 file was located.

Check the local IP address of your computer

You might want to know the IP address your computer uses to connect to your home network. You might even think about setting up a static IP address for Windows, allowing you to create a unique number for your computer. A static IP puts more control in your hands instead of having the router assign a random address.

To view the IP address from a Windows command prompt, check out the following steps:

  1. Open a universal command prompt.
  2. Type ipconfig into the command window, then press Enter.
  3. You'll see your current network adapter's IP address and other stats.
    Checking the local IP address of a computer using the ipconfig command.
  4. If you need more details, type ipconfig /all to show all network adapters.

See which users are currently logged in

A Windows command prompt can be used to view information about the users who are logged in to the computer, which is handy in some situations. You can see the user's name, email address, and the system permissions they can access on that computer. This allows you to keep track of each logged-in account without digging through extra menus, which is helpful for users with system administration privileges.

To check out these stats, do the following:

  1. Open a universal command prompt.
  2. Type whoami /all into the command window, then press Enter.
  3. Scroll through the list and find more details about any user who is logged in to the computer.
    Checking which users are logged in on a computer and and what privileges they have using the whoami command.

Instantly reclaim ownership of any file or folder

Let's say you remove your internal hard drive from an old laptop and hook it up to your new computer with an external storage dock. When you transfer those files to the new computer by copying and pasting them, you might lose access to their rights as the original owner. Should that happen, use a Windows command prompt to regain control of your files as the rightful owner.

To reclaim ownership over any file on your system, do the following:

  1. Open a command prompt in the folder with the files you want to reclaim as the owner.
  2. Type takeown /f yourfilename.extension into the command window, then press Enter. Type the file name and extension precisely as it appears, or else it won't be found.
    Successfully reclaiming ownership of the test file using the takeown command.

  3. You can now fully access the selected file as the new owner.

Reclaim ownership of an entire folder and its files

When you want to reclaim ownership of a folder and its files using a single command, do the following:

  1. Navigate to the folder you want to reclaim.
  2. Copy the location from the address bar at the top.
    Copying the entire contents of the address bar at the top to get the exact location of that folder.
  3. Open a command prompt in that folder.
  4. Type takeown /f yourfolderlocation /r into the command window, then press Enter. You can also paste and replace yourfolderlocation with the appropriate address you copied earlier.
    Successfully reclaiming ownership of the entire test folder and any files that were in it.

  5. You now have full access to the selected folder and its files as the new owner.

Hide any file you want to keep safe

It's possible to hide a file quickly and easily using a command prompt, but you'll need to be careful when you do. It can't be viewed using the Show hidden items folder option. That means you'll need to use this command with caution, or you might lose the file if you forget where you put it or what its name was.

To hide any file using the command prompt, check out these steps:

  1. Open a universal command prompt in a folder with the file you want to hide.
  2. Type attrib +h +s filename.txt into the command window, then press Enter. Replace filename and the .txt extension type with your file information.
  3. The file is hidden. Don't forget the file name and folder you put the file in. You'll need them to recover it via the command line.
  4. Use the attrib -s -h command to unhide all files when needed.
    A Windows command prompt showing the command to hide a file and another command to unhide that same file.

Check which devices are active and connected

If you're the administrator of your computer and network environment, viewing all active device connections in real time is helpful. Keeping track of the network activity allows you to identify unauthorized connections running without your knowledge. When you find an unknown device hiding on your network in plain sight, deny its access immediately to avoid potential damage. You can also view which network ports are being used, helping you better understand what services those active devices can directly access.

To monitor your local network traffic using a command prompt, do the following:

  1. Open a universal command prompt.
  2. Type netstat into the command window, then press Enter.
  3. It scans for active connections on your computer and shows which ports are being accessed. You can also use the netstat -a command to view more details about all connections on your computer.
    Running the netstat command to view all active device connections running on the network in real-time.

View the contents of a text file

A feature not mentioned often is that you can open text files in a Windows command prompt. It doesn't only launch a program. It opens and allows you to view the document from the command window. This little-known feature is helpful if you want to read a long text file using a method you may not have considered. This one is more of a novelty, but it has its uses as a simple text reader that you can use occasionally.

To view a text file through the Windows command prompt, do the following:

  1. Open a command prompt in the folder containing the text file.
  2. Use the type filename.extension command, then press Enter. Make sure to type the file name and extension precisely as it appears, or else it won't be found.
  3. The text document opens in the command window.
    Running the type command to open an example text document directly in the command prompt window.

Compare two separate text files at once

This unique command involving text files makes it easy to compare two text documents quickly and easily in a command line environment. It can be a helpful trick if you want to avoid opening two files in separate windows. This also means you don't need a dedicated text application to view them.

To compare two text files, do the following:

  1. Open a universal command prompt in the folder with the files you want to compare.
  2. Type fc textfile1.txt textfile2.txt into the command window, then press Enter. In this instance, replace textfile1 and textfile2 with the two text file names you want to compare.
  3. It displays both text files in their entirety and allows you to compare their contexts with ease.
    A Windows command prompt showing a command that compares two separate text files at once.

Check all currently installed drivers

Drivers tell your hardware, such as the mouse and keyboard, how to communicate with Windows. So, they must always work and be reliable. Driver issues can cause a computer to have random performance hiccups or crash with a blue screen in the worst-case scenarios. When you use a command prompt to check drivers, you get a quick overview of the installed drivers with zero hassle.

To see what your driver situation looks like through a Windows command prompt, do the following:

  1. Open a universal command prompt.
  2. Type driverquery into the command window, then press Enter.
  3. Scroll up and check the details about every installed driver.
    Running the driverquery command to view the status of all the drivers currently installed on a computer.
  4. The Link Date shows when the driver was last updated, which can be helpful when manually installing driver updates.

Check any website for service or outage issues

Multiple trusted third-party sources exist for checking online server outages or slow response times of your favorite websites. It helps you identify connection issues or learn of potential problems with the website you're trying to reach. You don't need to open a web browser and visit another website or service to do this. You can find the information using a local Windows command prompt. It's a fast, simple, and effective method that works all the time.

To check the status of any website on your computer, do the following:

  1. Open a universal command prompt.
  2. Type ping www.yourwebsite.com into the command window, then press Enter. For example, type ping www.google.com to test the response times of Google's main website.
  3. The command prompt sends small packets of data to that server and back as a test.
  4. You'll see a 0% packet loss and a reasonably low ms response time if everything is good. The lower the response time, the better.
  5. You'll see an increase in packet loss % and longer response times if a website is experiencing issues.
    Running the ping command to view the server status of the main Google home page from a command prompt window.

Scan your system to repair damaged files

Your critical Windows system files can get corrupted or deleted for various reasons, including viruses or other malicious infections. This can cause multiple error messages to pop up or crash the computer, so avoiding it is essential to a stable experience. Windows has a built-in file scanner that attempts to repair your computer if something goes wrong with the core system files.

Related
How to switch from Windows to ChromeOS
It's easier than you might think but requires some adapting

To learn how to fix your Windows installation using a command prompt, check out the following steps:

  1. Open a universal command prompt with the Run as administrator option.
  2. Type sfc /scannow into the command window, then press Enter.
  3. The file scanner goes through your entire system and checks for potential issues.
  4. When the scan is finished, it automatically attempts to fix any problems it finds.
  5. If no issues are identified, you'll see the Windows Resource Protection did not find any integrity violations message.
    Running the sfc command will attempt to repair any damaged files it may come across during its scan.

View and close any running process or task

You can use Windows's built-in Task Manager feature to deal with running processes, but that may not always work well. The Task Manager monitors items in real time. However, you can use a command prompt to create a static list that doesn't auto-update. This means you can casually scroll through your running processes as needed, which can help you pinpoint and close stubborn programs in a pinch.

To manage your system processes with a command prompt, do the following:

  1. Open a universal command prompt.
  2. Type tasklist into the command window, then press Enter.
  3. It lists your system's running programs, tasks, and processes.
    The tasklist command shows a non-moving list of all the programs, tasks, and processes that are running in the background.
  4. Scroll through the list to find an item you want to shut down.
  5. Take note of the Image Name field, which will be used in the next step.
  6. Use the taskkill /im imagename.exe command, then press Enter. Alternatively, use the taskkill /pid command and input the PID for the task rather than the Image Name. An example of this would be taskkill /pid 9112.
  7. The termination request is sent, and that process or task closes.
    An example of the taskkill command successfully closing down a task using the command prompt window.

There's more than one use for the Windows command prompt

The Windows command prompt often goes under the radar regarding its hidden and unique features. This likely has to do with how the command line interface is viewed by those who don't have experience running commands. But you don't need to be an advanced user to benefit from these extra features. Some might be useful for your daily activities. A few novelty commands are fun to try. Still, many of the ones listed above could be beneficial, such as extracting audio from a video file.

If you've always wanted to use Android apps on your computer, learn how to install Android APKs on Windows 11 without ADB commands. We cover everything you need to know about running Android apps on your Windows 11 computer.