Although Windows’ settings present quick access for configuring most issues, the Command Prompt — elevated or in any other case — may be indispensable in quite a few situations, particularly when you know the way to make the most of it.

Sometimes settings may be utilized by typing a number of characters as an alternative of clicking by way of a collection of menus, whereas different occasions there merely is not every other solution to carry out an operation besides with command traces.

We’ve compiled an inventory of issues that you are able to do within the Windows Command Prompt, together with some commands everybody ought to know for basic utilization, extra superior ones for tweaking or troubleshooting your PC, in addition to lesser identified and fewer sensible Command Prompt options. Our checklist of suggestions and methods under has been organized from briefest and most helpful, to extra complicated and dangerous…

Stop any command mid-operation

Since you may be testing some instructions… urgent Ctrl + C will cancel a command that you have already entered and will let you start typing one other one, whereas typing cls will clear the present window of any instructions that you have entered.

Did you understand there’s a settings menu?

Right-click the title bar and open Properties for settings that embody the flexibility to alter your Command Prompt’s font, structure and colours, in addition to choices reminiscent of Quick Edit mode, which can robotically paste textual content out of your clipboard if you proper click on within the window.

Bonus: You can customise the textual content within the prime bar by typing title adopted by the textual content that you really want (instance: title My title was pasted with Quick Edit mode).

A Compilation of Command Prompt Tips, Tricks & Cool Things You Can Do

Command Prompt keyboard shortcuts

Tapping the up and down arrows in your keyboard will cycle by way of instructions that you have beforehand entered. More shortcuts:

Tab: When you are typing a folder path, tab will auto-complete and cycle by way of directories
Ctrl + M: Enables Mark Mode which helps you to transfer the cursor in all instructions with the arrow keys
Ctrl + C or V: As of Windows 10, you’ll be able to copy and paste with management C and V like elsewhere across the OS
Ctrl + F: Likewise, management + F now helps you to seek for textual content within the Command Prompt
Ctrl + Shift + Scroll in your mouse: Increases or decreases the window transparency (+ and – keys work too)
Alt + Enter: Enables full-screen mode with no title bar displayed on prime (F11 additionally works like elsewhere in Windows)

Drag and drop folders to insert a listing path

Directory paths do not should be typed within the first place. Aside from having the ability to copy/paste textual content and tab by way of directories, you’ll be able to drag and drop a folder immediately into the Command Prompt window to robotically insert the situation.

A Compilation of Command Prompt Tips, Tricks & Cool Things You Can Do

The perform keys F1-F9 are additionally shortcuts

The perform (F) keys on the highest of your keyboard are additionally shortcuts that principally re-enter earlier instructions with out retyping them.

  • F1: Tapping or holding this key will retype the command that you just simply entered letter by letter.
  • F2: Copies the present command as much as a specified character.
  • F3: Completely retypes the earlier line that you just entered.
  • F4: The reverse of F2 — auto-deletes as much as a specified character (your cursor should be in entrance of the textual content).
  • F5: Retypes the earlier command like F3 however helps you to cycle again by way of many traces in your command historical past.
  • F6: Inserts Ctrl+Z (^Z) within the Command Prompt, which is an end-of-file indication (textual content after that is ignored)
  • F7: Opens an inventory of beforehand entered instructions you could choose from.
  • F8: Works like F5 however would not cease on the finish of your command historical past, cycles again to the beginning.
  • F9: Lets you retype a earlier command by coming into a quantity related to the road.

Enter a number of instructions directly

Adding && between instructions will allow you to enter a number of traces directly to be executed in succession. Example:

tasklist && netstat -b

See each course of operating and related

Entering tasklist command will checklist all the processes operating in your machine together with particulars reminiscent of their course of identifier and reminiscence utilization, whereas netstat -b will generate an inventory of all of the processes with a longtime community connection.

A Compilation of Command Prompt Tips, Tricks & Cool Things You Can Do

List each system driver in your PC

There are some ways to generate an inventory of drivers within the Command Prompt, here is one line that features further data such because the standing of a tool and the folder location/file identify of the related driver:

driverquery /FO checklist /v

Output outcomes to textual content file or clipboard

You can save the output of a command reminiscent of tasklist or driverquery to a brand new textual content file by including > together with a listing and file identify. Example:

driverquery > C:UsersTechSpotDesktopoutput.txt

Delete momentary information out of your drive

Some of the momentary information in your drive may be deleted with the next instructions (/q runs the operation with no affirmation immediate, /f ignores the read-only attribute and forces deletion, /s deletes contents from all sub-folders):

  • Delete momentary person information: del /q /f /s %temp%*
  • Delete momentary system information (requires admin rights): del /s /q C:Windowstemp*
  • …Or run them collectively: del /q /f /s %temp%* && del /s /q C:Windowstemp*

A Compilation of Command Prompt Tips, Tricks & Cool Things You Can Do

If that did not empty sufficient storage, listed below are extra temp folder locations, and we not too long ago coated a bunch of the way to unlock house on Windows, together with Command Prompt strategies to launch a complicated Disk Cleanup instrument and one other to disable hibernation by deleting the function’s system file (hiberfil.sys).

Open Windows’ on-screen keyboard

Entering osk right into a Command Prompt opens Windows’ on-screen keyboard which helps you to click on keys along with your mouse as an alternative of typing them.

Shutdown your PC at a sure time

The “shutdown” command can be utilized with a variety of switches to shutdown, reboot and extra, together with the flexibility to drive functions closed, to show a message on shutdown, and to specify the variety of seconds you would like earlier than the operation occurs. Example: shutdown -s -t 3600 would shutdown your PC in a single hour.

Create a Wi-Fi hotspot & Find your Wi-Fi password

If your community adapter helps the function, you’ll be able to configure your PC to be a wi-fi hotspot from the Command Prompt.

How to test in case your {hardware} is succesful: Enter netsh wlan present drivers and search for the road that reads “Hosted network support: Yes.”

A Compilation of Command Prompt Tips, Tricks & Cool Things You Can Do

From there, you’ll be able to allow the hotspot with this command: netsh wlan set hostednetwork mode=enable ssid=YOURSSID key=YOURPASSWORD

Also enter this line to allow the hotspot: netsh wlan begin hostednetwork (cease works too) and you may test the standing of your new hotspot by coming into netsh wlan present hostednetwork.

You might also should navigate by way of some GUI menus to allow connection sharing (we could not discover a method to do that from the Command Prompt): Go to Network and Sharing > Change adapter settings (Control PanelNetwork and InternetNetwork Connections) and you need to see the community adapters related to your PC.

Right click on the system that’s related to the Internet (not your new hotspot if that is listed) and open Properties. In the Sharing tab, test the field to “Allow other network users to connect through this computer’s Internet connection.”

A Compilation of Command Prompt Tips, Tricks & Cool Things You Can Do

Among different netsh commands, the function can present your Wi-Fi password by coming into netsh WLAN present profile identify=YOURPROFILE key=clear (look underneath Security settings > Key Content).

This line can delete a community profile you are not utilizing: netsh WLAN delete profile identify=YOURPROFILE

Quick repair instructions for connection points

Trouble along with your connection? ipconfig has some go-to instructions to resolve the difficulty:

A Compilation of Command Prompt Tips, Tricks & Cool Things You Can Do

  • ipconfig /launch (Releases your at the moment issued native IP deal with)
  • ipconfig /renew (Requests a brand new native IP deal with)
  • ipconfig /flushdns (Resets the contents of the DNS shopper resolver cache)

For persistent points along with your connection, there are some extra elaborate instructions which are value attempting. Note that you could have to reconfigure your community adapter and so on. you probably have handbook settings, significantly when resetting TCP/IP and the Windows Firewall.

These instructions require a reboot.

  • netsh winsock reset (Resets the winsock catalog to its default state, eradicating layered service suppliers — netsh winsock present catalog lists these things)
  • netsh int ip reset all (Removes and reinstalls TCP/IP, rewriting a few related registry keys)
  • netsh advfirewall reset (Restores the Windows Firewall to default settings, deleting beforehand configured guidelines and so on.)
  • nbtstat -r (Purges the contents of the NetBIOS identify cache after which reloads the #PRE-tagged entries from the Lmhosts file)
  • nbtstat -rr (Releases after which refreshes NetBIOS names for the native pc that’s registered with WINS servers)

A Compilation of Command Prompt Tips, Tricks & Cool Things You Can Do

Quick repair instructions for boot points

Are you greeted with a message that reads “reboot and select proper boot device?” or “NTLDR is missing” if you flip in your PC? The methodology under has labored for us to restore a Windows eight machine and needs to be legitimate for different editions of Windows.

Note that these traces should be entered in a Command Prompt that’s opened in a restoration surroundings from exterior of your working system, reminiscent of from a bootable USB drive with Windows 10 set up media.

  • bootrec /fixmbr
  • bootrec /fixboot
  • bootrec /scanos
  • bootrec /rebuildbcd

A Compilation of Command Prompt Tips, Tricks & Cool Things You Can Do

Although that sequence has labored for us up to now, we examined this on a digital machine by deleting the system reserved partition (the place boot data is saved) and attempting to revive the bootable state by coming into these traces. Unfortunately, entry was denied for bootrec /fixboot and we could not discover a workaround, so Windows nonetheless could not load.

However, these bcdboot and bootsect instructions labored to get Windows booting once more, despite the fact that we simply reformatted the system partition:

  • bcdboot C:Windows (Recreates the system partition information with these copied from C:Windows. While this format works from inside Windows, see the word under about operating this command from a restoration console exterior of Windows).
  • bootsect /nt60 SYS /mbr (Rewrites grasp boot code on the system partition and updates your grasp boot file)

*Note: If you are attempting to run bcdboot C:Windows from a restoration console exterior of your Windows set up (reminiscent of from the Windows 10 set up media), C:Windows might be D:Windows (your working system) whereas C: might be your system partition (the boot data). Entering diskpart after which checklist vol will show drive volumes so you understand what’s what (sort exit to shut diskpart). To run the bcdboot operation from a restoration surroundings, you need one thing like this command: bcdboot D:Windows /s C:

A Compilation of Command Prompt Tips, Tricks & Cool Things You Can Do

Footnote…
Master Boot Record – The first sector on the complete drive and accommodates a boot loader in addition to details about partitions on the drive.

Volume Boot Record (aka Partition Boot Sector/System Partition in MS terminology) – The first sector on a partition containing data to load an operation system.

Quick repair instructions for repairing Windows

Still cannot boot into Windows? Experiencing bluescreens or another bug? Windows has built-in instruments to scan for and substitute corrupt system information:

  • sfc /scannow (from inside Windows)
  • sfc /scannow /offbootdir=D: /offwindir=D:Windows (from exterior Windows, reminiscent of from a restoration drive)

A separate DISM command can scan the Windows part retailer for corrupt information and robotically restore them:

  • DISM /Online /Cleanup-Image /RestoreHealth (from inside Windows)
  • DISM /Image:D: /Cleanup-Image /RestoreHealth (from exterior Windows)

Encrypt, compress or backup information

Files and folders may be encrypted or compressed after which unencrypted and decompressed with fast particular person instructions for every operation — be sure you change the goal vacation spot:

Encrypt a file or folder: cipher /e C:UsersTechSpotDesktopFolder (listed below are extra cipher commands — /h applies a hidden attribute)

Decrypt that file or folder: cipher /d C:UsersTechSpotDesktopFolder

Compress a file or folder: compact /c /s:C:UsersTechSpotDesktopFolder

Decompress a file or folder: compact /u /s:C:UsersTechSpotDesktopFolder

You can create semi-incremental file backups utilizing robocopy, although that is extra concerned than the earlier instructions.

There’s a fantastic Super User thread discussing the topic the place variants of the identical command are beneficial for having robocopy do fundamental file backups, copying information from one location to a different — however solely when modifications have been made.

Here’s probably the most steered command (see the hyperlink for an evidence on the choices):

robocopy C:supply M:vacation spot /MIR /FFT /R:3 /W:10 /Z /NP /NDL

Generate stories about your system

These stories are surprisingly detailed and will assist in understanding points involving your system’s energy consumption or wi-fi connectivity.

A Compilation of Command Prompt Tips, Tricks & Cool Things You Can Do

powercfg /vitality (Generates a report in regards to the vitality effectivity of your system — the situation of the report is talked about after the command finishes)

powercfg /batteryreport (Generates a report with specs to your battery in addition to stats and graphs in regards to the historical past of your battery utilization)

netsh wlan present wlanreport (Generates a report with specs to your wi-fi {hardware} together with details about your connection historical past)

Watch an ASCII model of Star Wars Episode IV

Quite a lot of old style telnet providers are nonetheless out there, together with the flexibility to observe Star Wars Episode IV.

Enter telnet towel.blinkenlights.nl right into a Command Prompt for the film to begin (there isn’t any sound).

Note: If the command is not acknowledged, you might need to allow telnet. Search Start or the Control Panel for “Turn Windows features on or off” and test the field subsequent to Telnet (click on Ok…).

A Compilation of Command Prompt Tips, Tricks & Cool Things You Can Do

More places you’ll be able to go by way of telnet:

telnet towel.blinkenlights.nl 666 (a “bastard operator from hell” excuse generator)

telnet telnet.wmflabs.org (Wikimedia)

telnet rainmaker.wunderground.com (Weather Underground)

telnet aardmud.org 4000 (Aardwolf)

telnet achaea.com 23 (Achaea)

telnet ateraan.com 4002 (New Worlds – Ateraan)

telnet avalon-rpg.com 23 (Avalon: The Legend Lives)

telnet batmud.bat.org 23 (BatMUD)

A Compilation of Command Prompt Tips, Tricks & Cool Things You Can Do

telnet eclipse.cs.pdx.edu 7680 (New Moon)

telnet forgottenkingdoms.org 4000 (Forgotten Kingdoms)

telnet freechess.org 5000 (Free Chess)

telnet igormud.org 1701 (IgorMUD)

telnet lord.stabs.org 23 (Legend of the Red Dragon)

telnet mush.shelteringcolorado.com 2601 (Sheltering Sky: Colorado by Night)

telnet zombiemud.org 23 (Zombie MUD)

Note: This function was initially revealed on 10/23/2018. We have bumped it resulting from its old style nature, as a part of our #ThrowbackThursday initiative.

More Useful Tips

  • Computer Tips & Tricks Everyone Should Know
  • “Run as Administrator”: What Does It Mean?
  • Ways to Free Up Storage Space on Windows
  • Essential Apps You Should Install on a New PC Running Windows or macOS