A Compilation of Command Prompt Tips, Tricks & Cool Things You Can Do
Although Windows settings provide easy access for configuring most things, the Control Prompt -- elevated or otherwise -- tin exist indispensable in a number of scenarios, particularly when you know how to take reward of information technology.
Sometimes settings can be applied past typing a few characters instead of clicking through a series of menus, while other times there just isn't any other manner to perform an operation except with command lines.
Nosotros've compiled a list of things that you lot can do in the Windows Command Prompt, including some commands anybody should know for general usage, more advanced ones for tweaking or troubleshooting your PC, as well as bottom known and less practical Command Prompt features. Our list of tips and tricks below has been organized from briefest and most useful, to more complex and risky...
End whatever command mid-performance
Since you might exist testing some commands... pressing Ctrl + C will cancel a command that you've already entered and allow you to begin typing another one, while typing cls volition clear the current window of any commands that you lot've entered.
Drag and drib folders to insert a directory path
Directory paths don't have to be typed in the showtime place. Bated from being able to copy/paste text and tab through directories, you tin drag and drop a folder direct into the Command Prompt window to automatically insert the location.
Zoom in (and out)
The command prompt used to scale pretty poorly and show very small text, but now it'south been modernized so you can zoom in but like y'all do in a web browser. Use Ctrl + Mouse Bike Upward/Downwardly to zoom in and out text.
Did you know in that location is a settings menu?
Right-click the title bar and open Properties for settings that include the ability to change your Command Prompt's font, layout and colors, likewise every bit options such every bit Quick Edit fashion, which volition automatically paste text from your clipboard when you right click in the window.
Bonus: Yous tin can also customize the text in the top bar past typing title followed past the text that y'all desire (case: title My title was pasted with Quick Edit way).
Control Prompt keyboard shortcuts
Tapping the up and downward arrows on your keyboard will cycle through commands that you've previously entered. More shortcuts:
Tab: When you're typing a folder path, tab will motorcar-complete and cycle through directories
Ctrl + M: Enables Mark Fashion which lets you motility the cursor in all directions with the arrow keys
Ctrl + C or V: Equally of Windows 10, you can re-create and paste with Ctrl + C and V like elsewhere around the OS
Ctrl + F: Likewise, Ctrl + F now lets you search for text in the Command Prompt
Ctrl + Shift + Scroll on your mouse: Increases or decreases the window transparency (+ and - keys piece of work as well)
Alt + Enter: Enables full-screen way with no title bar displayed on top (F11 also works like elsewhere in Windows)
Enter multiple commands at once
Adding && between commands will permit yous enter multiple lines at once to be executed in succession. Example:
tasklist && netstat -b
Encounter every process running and connected
Entering tasklist command will list all of the processes running on your machine along with details such as their procedure identifier and retentiveness usage, while netstat -b will generate a list of all the processes with an established network connection.
List every device driver on your PC
There are many means to generate a list of drivers in the Control Prompt, here'southward 1 line that includes boosted information such as the status of a device and the folder location/file name of the associated driver:
driverquery /FO listing /v
Output results to text file or clipboard
You tin can save the output of a control such as tasklist or driverquery to a new text file past calculation > along with a directory and file name. Example:
driverquery > C:\Users\TechSpot\Desktop\output.txt
The function keys F1-F9 are also shortcuts
The role (F) keys on the acme of your keyboard are also shortcuts that more often than not re-enter previous commands without retyping them.
- F1: Tapping or holding this key will retype the command that yous just entered letter by letter.
- F2: Copies the current command up to a specified character.
- F3: Completely retypes the previous line that yous entered.
- F4: The contrary of F2 -- auto-deletes up to a specified character (your cursor must be in forepart of the text).
- F5: Retypes the previous command like F3 only lets you lot wheel back through many lines in your command history.
- F6: Inserts Ctrl+Z (^Z) in the Command Prompt, which is an stop-of-file indication (text later on this is ignored)
- F7: Opens a list of previously entered commands that you tin can select from.
- F8: Works similar F5 but doesn't finish at the end of your command history, cycles back to the get-go.
- F9: Lets you retype a previous command by entering a number associated with the line.
Utilize the Windows Concluding
The Windows Terminal was introduced in the more than recent version of Windows as is available as a free download from the Microsoft Shop. The Concluding is a modernized command line tool that adds a tabbed interface in which you can open up multiple command lines, simply also the PowerShell, SSH connections and the Windows Subsystem for Linux (WSL), making information technology a very versatile selection for command line users.
The Windows Terminal is getting frequent updates and back up for modernistic features such as GPU accelerated text rendering, which paves the mode for icon and emoji support, too as significantly faster text display.
Delete temporary files from your drive
Some of the temporary files on your drive tin can exist deleted with the following commands (/q runs the performance without a confirmation prompt, /f ignores the read-only aspect and forces deletion, /s deletes contents from all sub-folders):
- Delete temporary user files: del /q /f /s %temp%\*
- Delete temporary system files (requires admin rights): del /s /q C:\Windows\temp\*
- ...Or run them together: del /q /f /due south %temp%\* && del /s /q C:\Windows\temp\*
If that didn't empty enough storage, here are more temp folder locations, and we recently covered a bunch of ways to gratuitous up space on Windows, including Command Prompt methods to launch an advanced Disk Cleanup tool and another to disable hibernation past deleting the feature'south arrangement file (hiberfil.sys).
Open the Windows on-screen keyboard
Entering osk into a Command Prompt opens Windows' on-screen keyboard which lets yous click keys with your mouse instead of typing them.
Shutdown your PC at a certain time
The "shutdown" control can exist used with a range of switches to shutdown, reboot and more than, including the power to force applications closed, to display a message on shutdown, and to specify the number of seconds you'd like before the operation happens. Example: shutdown -s -t 3600 would shutdown your PC in one hour.
Create a Wi-Fi hotspot & Find your Wi-Fi password
If your network adapter supports the feature, yous can configure your PC to be a wireless hotspot from the Control Prompt.
How to check if your hardware is capable: Enter netsh wlan testify drivers and look for the line that reads "Hosted network support: Yes."
From in that location, you lot tin enable the hotspot with this control: netsh wlan ready hostednetwork manner=permit ssid=YOURSSID primal=YOURPASSWORD
Also enter this line to enable the hotspot: netsh wlan start hostednetwork (stop works too) and yous tin can check the status of your new hotspot by entering netsh wlan show hostednetwork.
You may besides have to navigate through some GUI menus to enable connexion sharing (nosotros couldn't find a way to do this from the Control Prompt): Go to Network and Sharing > Change adapter settings (Control Panel\Network and Internet\Network Connections) and y'all should see the network adapters continued to your PC.
Right click the device that is connected to the Internet (not your new hotspot if that's listed) and open up Properties. In the Sharing tab, cheque the box to "Allow other network users to connect through this computer's Internet connection."
Among other netsh commands, the feature tin can show your Wi-Fi password by entering netsh WLAN show profile name= YOURPROFILE key=articulate (look under Security settings > Central Content).
This line can delete a network profile you're no longer using: netsh WLAN delete profile name= YOURPROFILE
Quick fix commands for connection problems
Trouble with your connectedness? ipconfig has some get-to commands to resolve the result:
- ipconfig /release (Releases your currently issued local IP accost)
- ipconfig /renew (Requests a new local IP address)
- ipconfig /flushdns (Resets the contents of the DNS customer resolver cache)
For persistent bug with your connection, in that location are some more elaborate commands that are worth trying. Notation that you may accept to reconfigure your network adapter etc. if you take manual settings, particularly when resetting TCP/IP and the Windows Firewall.
These commands require a reboot.
- netsh winsock reset (Resets the winsock catalog to its default land, removing layered service providers -- netsh winsock show catalog lists these items)
- netsh int ip reset all (Removes and reinstalls TCP/IP, rewriting a couple of associated registry keys)
- netsh advfirewall reset (Restores the Windows Firewall to default settings, deleting previously configured rules etc.)
- nbtstat -r (Purges the contents of the NetBIOS name enshroud and then reloads the #PRE-tagged entries from the Lmhosts file)
- nbtstat -rr (Releases and so refreshes NetBIOS names for the local figurer that is registered with WINS servers)
Quick gear up commands for boot issues
Are you greeted with a message that reads "reboot and select proper boot device?" or "NTLDR is missing" when you turn on your PC? The method beneath has worked for us to repair a Windows 8 car and should exist valid for other editions of Windows.
Note that these lines must be entered in a Command Prompt that is opened in a recovery environment from exterior of your operating organisation, such every bit from a bootable USB drive with Windows 10 / Windows xi installation media.
- bootrec /fixmbr
- bootrec /fixboot
- bootrec /scanos
- bootrec /rebuildbcd
Although that sequence has worked for the states in the past, we tested this on a virtual machine by deleting the organization reserved segmentation (where boot data is stored) and trying to restore the bootable land by entering those lines. Unfortunately, access was denied for bootrec /fixboot and we couldn't notice a workaround, so Windows yet couldn't load.
Withal, these bcdboot and bootsect commands worked to get Windows booting again, fifty-fifty though nosotros just reformatted the organisation partition:
- bcdboot C:\Windows (Recreates the system partition files with those copied from C:\Windows. While this format works from inside Windows, see the note below near running this command from a recovery console exterior of Windows).
- bootsect /nt60 SYS /mbr (Rewrites master kick code on the organization partitioning and updates your master kicking record)
*Notation: If you are trying to run bcdboot C:\Windows from a recovery console outside of your Windows installation (such equally from the Windows eleven installation media), C:\Windows is probably D:\Windows (your operating system) while C:\ is probably your system division (the boot info). Entering diskpart and and then listing vol will display bulldoze volumes so you know what'southward what (type go out to close diskpart). To run the bcdboot operation from a recovery environment, y'all want something like this control: bcdboot D:\Windows /s C:\
Footnote...
Master Kicking Record - The kickoff sector on the whole bulldoze and contains a boot loader also as information about partitions on the drive.
Volume Boot Record (aka Partition Boot Sector/System Partition in MS terminology) - The commencement sector on a partition containing data to load an operation system.
Quick fix commands for repairing Windows
Withal tin can't boot into Windows? Experiencing blue screens or some other bug? The OS has built-in tools to scan for and supercede corrupt system files:
- sfc /scannow (from inside Windows)
- sfc /scannow /offbootdir=D:\ /offwindir=D:\Windows (from exterior Windows, such as from a recovery drive)
A divide DISM command can scan the Windows component store for corrupt files and automatically repair them:
- DISM /Online /Cleanup-Image /RestoreHealth (from inside Windows)
- DISM /Image:D:\ /Cleanup-Image /RestoreHealth (from outside Windows)
Encrypt, compress or backup files
Files and folders can be encrypted or compressed and so unencrypted and decompressed with quick individual commands for each operation -- make sure you change the target destination:
Encrypt a file or folder: cipher /e C:\Users\TechSpot\Desktop\Folder (here are more cipher commands -- /h applies a hidden attribute)
Decrypt that file or folder: cipher /d C:\Users\TechSpot\Desktop\Folder
Compress a file or folder: compact /c /s:C:\Users\TechSpot\Desktop\Folder
Decompress a file or folder: compact /u /due south:C:\Users\TechSpot\Desktop\Binder
You lot can create semi-incremental file backups using robocopy, though this is more involved than the previous commands.
At that place'southward a slap-up Super User thread discussing the subject field where variants of the same command are recommended for having robocopy do basic file backups, copying files from one location to another -- but just when changes accept been fabricated.
Here's the most suggested control (see the link for an explanation on the options):
robocopy C:\source M:\destination /MIR /FFT /R:iii /Due west:10 /Z /NP /NDL
Generate reports about your system
These reports are surprisingly detailed and may help in understanding bug involving your system's power consumption or wireless connectivity.
powercfg /free energy (Generates a report about the energy efficiency of your organization -- the location of the report is mentioned after the command finishes)
powercfg /batteryreport (Generates a report with specifications for your battery likewise as stats and graphs about the history of your battery usage)
netsh wlan show wlanreport (Generates a report with specs for your wireless hardware along with data about your connection history)
Watch an ASCII version of Star Wars Episode IV
A diversity of old schoolhouse telnet services are still available, including the ability to picket Star Wars Episode IV.
Enter telnet towel.blinkenlights.nl into a Command Prompt for the flick to start (there'southward no sound).
Note: If the command isn't recognized, you might have to enable telnet. Search Start or the Control Panel for "Turn Windows features on or off" and check the box next to Telnet (click Ok...).
More places y'all tin can go via 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)
- 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 Dark)
- telnet zombiemud.org 23 (Zombie MUD)
Notation: This feature was originally published on October 2022. Nosotros take revised some of its content and bumped it due to its old schoolhouse nature, every bit function of our #ThrowbackThursday initiative.
More Useful Tips
- Rundown of Must-Have Portable Apps
- How to Encrypt Files, Folders and Drives on Windows
- 21 Programs to Clarify and Benchmark Your Hardware
- "Run as Ambassador": What Does It Mean?
Source: https://www.techspot.com/news/77051-compilation-command-prompt-tips-tricks-cool-things-you.html
Posted by: camachocamse1999.blogspot.com
0 Response to "A Compilation of Command Prompt Tips, Tricks & Cool Things You Can Do"
Post a Comment