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

Though Home windows settings present easy accessibility for configuring most issues, the Command Immediate — elevated or in any other case — will be indispensable in quite a lot of situations, particularly when you understand how to reap the benefits of it.

Generally settings will be utilized by typing a number of characters as a substitute of clicking by means of a sequence of menus, whereas different occasions there merely is not some other approach to carry out an operation besides with command traces.

We have compiled a listing of issues that you are able to do within the Home windows Command Immediate, together with some instructions everybody ought to know for normal utilization, extra superior ones for tweaking or troubleshooting your PC, in addition to lesser recognized and fewer sensible Command Immediate options. Our listing of suggestions and tips under has been organized from briefest and most helpful, to extra advanced and dangerous…

Cease any command mid-operation

Because you may be testing some instructions… urgent Ctrl + C will cancel a command that you’ve got already entered and mean you can start typing one other one, whereas typing cls will clear the present window of any instructions that you’ve got entered.

Drag and drop folders to insert a listing path

Listing paths do not must be typed within the first place. Other than with the ability to copy/paste textual content and tab by means of directories, you possibly can drag and drop a folder immediately into the Command Immediate window to robotically insert the placement.

Zoom in (and out)

The command immediate used to scale fairly poorly and present very small textual content, however now it has been modernized so you possibly can zoom in identical to you do in an internet browser. Use Ctrl + Mouse Wheel Up/All the way down to zoom out and in textual content.

Do you know there’s a settings menu?

Proper-click the title bar and open Properties for settings that embody the flexibility to vary your Command Immediate’s font, format and colours, in addition to choices equivalent to Fast Edit mode, which is able to robotically paste textual content out of your clipboard once you proper click on within the window.

Bonus: You may also 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 Fast Edit mode).

Command Immediate keyboard shortcuts

Tapping the up and down arrows in your keyboard will cycle by means of instructions that you’ve got beforehand entered. Extra shortcuts:

Tab: While you’re typing a folder path, tab will auto-complete and cycle by means of directories

Ctrl + M: Allows Mark Mode which helps you to transfer the cursor in all instructions with the arrow keys

Ctrl + C or V: As of Home windows 10, you possibly can copy and paste with Ctrl + C and V like elsewhere across the OS

Ctrl + F: Likewise, Ctrl + F now permits you to seek for textual content within the Command Immediate

Ctrl + Shift + Scroll in your mouse: Will increase or decreases the window transparency (+ and – keys work too)

Alt + Enter: Allows full-screen mode with no title bar displayed on prime (F11 additionally works like elsewhere in Home windows)

Enter a number of instructions directly

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

tasklist && netstat -b

See each course of operating and linked

Getting into tasklist command will listing the entire processes operating in your machine together with particulars equivalent to their course of identifier and reminiscence utilization, whereas netstat -b will generate a listing of all of the processes with a longtime community connection.

Checklist each gadget driver in your PC

There are a lot of methods to generate a listing of drivers within the Command Immediate, here is one line that features extra data such because the standing of a tool and the folder location/file identify of the related driver:

driverquery /FO listing /v

Output outcomes to textual content file or clipboard

It can save you the output of a command equivalent to tasklist or driverquery to a brand new textual content file by including > together with a listing and file identify. Instance:

driverquery > C:UsersTechSpotDesktopoutput.txt

The perform keys F1-F9 are additionally shortcuts

The perform (F) keys on the highest of your keyboard are additionally shortcuts that largely 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: Fully 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 permits you to cycle again by means of many traces in your command historical past.
  • F6: Inserts Ctrl+Z (^Z) within the Command Immediate, which is an end-of-file indication (textual content after that is ignored)
  • F7: Opens a listing of beforehand entered instructions that you may choose from.
  • F8: Works like F5 however would not cease on the finish of your command historical past, cycles again to the beginning.
  • F9: Permits you to retype a earlier command by getting into a quantity related to the road.

Use the Home windows Terminal

The Home windows Terminal was launched within the more moderen model of Home windows as is on the market as a free obtain from the Microsoft Retailer. The Terminal is a modernized command line software that provides a tabbed interface in which you’ll be able to open a number of command traces, but additionally the PowerShell, SSH connections and the Home windows Subsystem for Linux (WSL), making it a really versatile choice for command line customers.

The Home windows Terminal is getting frequent updates and assist for contemporary options equivalent to GPU accelerated textual content rendering, which paves the way in which for icon and emoji assist, in addition to considerably sooner textual content show.

Delete short-term information out of your drive

A few of the short-term information in your drive will 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 short-term person information: del /q /f /s %temp%*
  • Delete short-term system information (requires admin rights): del /s /q C:Windowstemp*
  • …Or run them collectively: del /q /f /s %temp%* && del /s /q C:Windowstemp*

If that did not empty sufficient storage, listed here are extra temp folder places, and we just lately coated a bunch of the way to release area on Home windows, together with Command Immediate strategies to launch a complicated Disk Cleanup software and one other to disable hibernation by deleting the function’s system file (hiberfil.sys).

Open the Home windows on-screen keyboard

Getting into osk right into a Command Immediate opens Home windows’ on-screen keyboard which helps you to click on keys together with your mouse as a substitute of typing them.

Shutdown your PC at a sure time

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

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

In case your community adapter helps the function, you possibly can configure your PC to be a wi-fi hotspot from the Command Immediate.

Easy methods to examine in case your {hardware} is succesful: Enter netsh wlan present drivers and search for the road that reads “Hosted community assist: Sure.”

From there, you possibly can allow the hotspot with this command: netsh wlan set hostednetwork mode=enable ssid=YOURSSID key=YOURPASSWORD

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

You may additionally must navigate by means of some GUI menus to allow connection sharing (we could not discover a method to do that from the Command Immediate): Go to Community and Sharing > Change adapter settings (Management PanelNetwork and InternetNetwork Connections) and you need to see the community adapters linked to your PC.

Proper click on the gadget that’s linked to the Web (not your new hotspot if that is listed) and open Properties. Within the Sharing tab, examine the field to “Permit different community customers to attach by means of this pc’s Web connection.”

Amongst different netsh instructions, the function can present your Wi-Fi password by getting into netsh WLAN present profile identify=YOURPROFILE key=clear (look beneath Safety settings > Key Content material).

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

Fast repair instructions for connection points

Hassle together with your connection? ipconfig has some go-to instructions to resolve the problem:

  • ipconfig /launch (Releases your presently 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 together with your connection, there are some extra elaborate instructions which might be price making an attempt. Be aware that you’ll have to reconfigure your community adapter and many others. you probably have handbook settings, notably when resetting TCP/IP and the Home 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 this stuff)
  • netsh int ip reset all (Removes and reinstalls TCP/IP, rewriting a few related registry keys)
  • netsh advfirewall reset (Restores the Home windows Firewall to default settings, deleting beforehand configured guidelines and many others.)
  • 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)

Fast repair instructions for boot points

Are you greeted with a message that reads “reboot and choose correct boot gadget?” or “NTLDR is lacking” once you flip in your PC? The tactic under has labored for us to restore a Home windows 8 machine and must be legitimate for different editions of Home windows.

Be aware that these traces should be entered in a Command Immediate that’s opened in a restoration setting from exterior of your working system, equivalent to from a bootable USB drive with Home windows 10 / Home windows 11 set up media.

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

Though 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 making an attempt to revive the bootable state by getting into these traces. Sadly, entry was denied for bootrec /fixboot and we could not discover a workaround, so Home windows nonetheless could not load.

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

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

*Be aware: If you’re making an attempt to run bcdboot C:Home windows from a restoration console exterior of your Home windows set up (equivalent to from the Home windows 11 set up media), C:Home windows might be D:Home windows (your working system) whereas C: might be your system partition (the boot information). Getting into diskpart after which listing vol will show drive volumes so what’s what (sort exit to shut diskpart). To run the bcdboot operation from a restoration setting, you need one thing like this command: bcdboot D:Home windows /s C:


Grasp Boot File – The primary sector on the entire drive and comprises a boot loader in addition to details about partitions on the drive.

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

Fast repair instructions for repairing Home windows

Nonetheless cannot boot into Home windows? Experiencing blue screens or another bug? The OS has built-in instruments to scan for and exchange corrupt system information:

  • sfc /scannow (from inside Home windows)
  • sfc /scannow /offbootdir=D: /offwindir=D:Home windows (from exterior Home windows, equivalent to from a restoration drive)

A separate DISM command can scan the Home windows element retailer for corrupt information and robotically restore them:

  • DISM /On-line /Cleanup-Picture /RestoreHealth (from inside Home windows)
  • DISM /Picture:D: /Cleanup-Picture /RestoreHealth (from exterior Home windows)

Encrypt, compress or backup information

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

Encrypt a file or folder: cipher /e C:UsersTechSpotDesktopFolder (listed here are extra cipher instructions — /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 may create semi-incremental file backups utilizing robocopy, although that is extra concerned than the earlier instructions.

There’s an important Tremendous Person thread discussing the topic the place variants of the identical command are beneficial for having robocopy do primary file backups, copying information from one location to a different — however solely when adjustments have been made.

Here is essentially the most urged command (see the hyperlink for a proof on the choices):

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

Generate reviews about your system

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

powercfg /power (Generates a report concerning the power effectivity of your system — the placement 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 concerning 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 skool telnet providers are nonetheless accessible, together with the flexibility to look at Star Wars Episode IV.

Enter telnet towel.blinkenlights.nl right into a Command Immediate for the film to begin (there is no sound).

Be aware: If the command is not acknowledged, you might need to allow telnet. Search Begin or the Management Panel for “Flip Home windows options on or off” and examine the field subsequent to Telnet (click on Okay…).

Extra locations you possibly can 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 (Climate Underground)
  • telnet aardmud.org 4000 (Aardwolf)

Be aware: This function was initially printed on October 2018. We now have revised a few of its content material and bumped it on account of its old skool nature, as a part of our #ThrowbackThursday initiative.

Extra Helpful Suggestions

Be the first to comment

Leave a Reply

Your email address will not be published.