Advertisement

How To

15 tips for using Command Prompt

15 tips for using Command Prompt
Jeremy Milliner

Jeremy Milliner

  • Updated:

Command Prompt is one of Microsoft Windows’ most powerful tools, and for the majority of end-users, one of the most underutilized. While its capabilities are as helpful as they are numerous, cmd itself is hardly intuitive. At first glance novice users probably wouldn’t get much out of it.

https://www.lifewire.com/command-prompt-2625840

We’ve assembled a list of 15 features and shortcuts that will both help to showcase Command Prompt’s many uses, as well as teach you how to more easily navigate through it.

First and foremost, bring up the command prompt by hitting the Windows key and typing cmd, then enter.

15 tips for using Command Prompt

1. Test your network connection

Need to quickly test whether you have internet connectivity? Open cmd and ping a website to determine whether your computer can see it. To do this, simply type, for example, ping softonic.com. If you receive a reply, you have at least some semblance of internet connectivity.

Command Prompt will then list how quickly it was able to send its pings, which provides some frame of reference for your connectivity strength.

2. Scan your files for corruption and viruses

Command Prompt has a built-in virus scanner of sorts, but it can only be operated if you run Command Prompt via admin.

https://www.howtogeek.com/168896/10-useful-windows-commands-you-should-know/

* To run as admin, all you need to do is right-click on your command prompt shortcut and select run as administrator.

Once that’s done, type in sfc /scannow and Command Prompt will scan your files and note and repair any missing or corrupted files.

3. List network connections and ports


Type netstat into cmd and you’ll receive a list of network statistics from various local and addresses. You can type netstat -a -n to filter all open network connections on their computers, including the port they’re using.

4. Wipe a drive clean without using third-party tools

Time to debunk a myth: Deleted files never actually get fully deleted. Rather, they are always kept on disk. Command Prompt’s cipher command will fix this, writing deleted files to a drive. This clears free space, but will prevent the files within from ever being recovered. If you’re willing to take the risk, type cipher /w:C:\ replacing “C” with whichever drive it is you wish to erase.

Be careful with this!!

5. Enable “GodMode”

GodMode is a hidden capability that, when activated, will provide very easy access to more than 200 tools and settings that are normally scattered behind menus and windows. To enable it, make a new folder and title it God Mode.{ED7BA470-8E54-465E-825C-99712043E01C}. Double click on this folder to open GodMode.

GodMode’s features are far too numerous for us to list here, but some of its implementations include Bluetooth devices, file extensions, device managers, event logs, renaming the computer, changing font settings, and even updating drivers. For more detailed instructions on how to set up GodMode, check out this walk-through.

6. Quickly check your IP address

https://networking.grok.lsu.edu/article.aspx?articleid=16923

In Command Prompt,you can simply type ipconfig to quickly determine your computer’s IP address, along with a handful of other pertinent information like default gateways, subnet masks, and connection-specific DNS suffixes. It’s especially handy if you want to know the IP address of your router’s web interface.

*The following tips are shortcut codes and commands for faster, easier navigation through Command Prompt*

7. Use the F1-F9 keys for quick access

F1: Pastes the characters of your last executed command
F2: Pastes your previous command up to a set character
F3: Pastes your previous command
F4: Deletes all current prompt text up to a set character
F5: Pastes back all your recently executed commands one at a time
F6: Pastes ^Z to the prompt
F7: Lists all your previously executed commands for easy selection
F8: Pastes back all your recently executed commands one at a time, cycling back after
F9: Lists all your previously executed commands for easy selection via numeral

8. Define commands

Don’t know what a particular command does? Just type /? after it, i.e. help/? and Command Prompt will succinctly explain to you what that particular command does.

9. Clear the screen

Command Prompt window getting cluttered? Just type cls and you’re looking at a clean, blank window ready to work.

10. Open a new directory


Command Prompt defaults to your C:\Users\Name directory upon opening, but you can switch to new folder by typing cd and then entering the name of the directory you wish to travel to. Type cd documents, for example, and you’ll be put into that folder instead.

To go back to a lower branch, just type cd\

11. See all files within your directory


Type dir to see all the listed files within your current directory. This is particularly useful when you’re trying to find what extensions can be accessed from your current folder.

12. Show files organized by folder

Similar to the directory command, you can go the extra mile and show the files organized by subfolder.

Once you’re in a directory, just type tree and you’ll get a handy flowchart. This is especially great if you’re looking for a navigation overview of a specific folder and just want to find a specific path.

13. Cancel any running task

If you accidentally set Command Prompt to run a task you hadn’t meant, you can cancel the process by pressing cntrl+c.

14. Copy text from Command Prompt

Command Prompt text can be copied, but it’s not as easy to do as you’d think. To do it, start by right-clicking and selecting mark.


Now you can highlight as you’d expect! Right-click again to copy your selection to clipboard.

15. Learn more codes


To see even more of Command Prompt’s capabilities all you need to do is type help. It will list a ton more features and shortcuts for you. There’s always more to learn!

Jeremy Milliner

Jeremy Milliner

Jeremy is an avid gamer, writer, musician, and instructor. He has been teaching for over 15 years, with his primary focus on music, and has written all manner of gaming articles, reviews, FAQs, walkthroughs, strategy guides, and even the odd screenplay or two. He has run the gamut of tech reviews, game guides, lifestyle content, and more. His focus as a writer is to give fair feedback of products, highlighting their strengths and weaknesses in a clear, concise, and entertaining manner.

Latest from Jeremy Milliner

Editorial Guidelines