27 C
Tuesday, May 24, 2022

Top 10 Best CMD Tricks, You Should Know in 2020

Top 10 Command Prompt Tricks that You Should Know in 2020

#1Change the Color of the CMD Window

The Command Prompt window can be unexciting with the default black background and light gray text color. But Windows does allow you to change these colors to suit yourself and make things a bit more intriguing.

Launch CMD and Right-click on the title bar
Click on “Properties” and in the separate window that opens, click on “Colors”
Here you can choose the colors for the screen text or background as well as for the popup text and background, and also change the transparency of the CMD window
After you’re done choosing the most fitting colors for your personality, Click OK

Note: There are a lot of other colors available, and you can check out the entire list by typing help color.

#2 Create a WiFi Hotspot

You can also use the Command Prompt to create a WiFi hotspot on your Windows PC, and share your internet connection with multiple devices, all without having to use any third-party apps whatsoever. To do this, just follow the steps below.

Launch Command Prompt, and type “netsh wlan set hostednetwork mode=allow ssid=HotspotName key=Password”. Replace “Hotspot Name” with the name that you want for your WiFi hotspot, and replace “Password” with the password you want to set. Hit enter.

Type “netsh wlan start hostednetwork” and hit Enter, and your WiFi hotspot will be broadcast, and other devices will be able to connect to it.

NoteIf you want to stop broadcasting your WiFi hotspot, simply use the command netsh wlan stop hostednetwork”.

#3 SFC /Scannow

SFC “System File Checker” is a relatively new addition to Command Prompt to keep your computer clean and bug-free. It’s a handy command-line tool that will help you fix many system issues. Just run sfc /scannow on Command Prompt and it will start verifying the integrity of all protected system files. Further, it will also repair the damaged files wherever possible. So in the future, if you face any issue, make sure to run this command on your Windows computer.

 #4 Open CMD Window Inside a Directory

Let’s face it, the way Windows handles changing directories using the “cd” command is rather weird. Fortunately, there is a simple way to open Command Prompt windows inside a directory so you don’t have to change directories. This is a really handy trick, especially if the folders you want to access are buried deep inside the filesystem. To open a cmd window inside a directory, just follow the steps below:
  • Open the directory in Windows Explorer. In the address bar, type “cmd”, and hit Enter.

#5 Generate Battery Health Report

Windows 10 lets you track vital stats related to the battery’s health by maintaining data related to the battery. This includes stats like factory specifications, full battery capacity, and the current capacity and these are updated with each session. You can generate a report about these stats by using a CMD command, which can be executed as follows:
  • Launch Command Prompt as an Administrator or change directory using cd C:WindowsSystem32
  • Enter command powercfg/energy
  • The system will take 60 seconds to analyze and then generate a report in form of an HTML documents

To access the report, you can find the file stored as C:Windowssystem32energy-report.html

#6 Hide Sensitive RAR Files in Images

CMD facilitates a command which lets you concatenate or fuse two files into a single file. While this command comes in handy in merging the contents of basic file types such as TXT or CSV, you can also use the command to hide a RAR, ZIP, or another archived file inside an image or text file. To achieve this, follow these steps:

  • pen CMD in the directory which contains both files using the 10th item in this list or use the cd command to change the directory
  • Use command copy /b <RAR_filename>.rar + <image_filename>.<extension> <result_filename>.<extension> . In our case, we used copy /b modules.rar+wave.png test2.png 

make sure you enter the RAR file first followed by the other file, else you won’t be able to recover the RAR package. The method also works on most common file types including documents and PDFs as long as you add the archive file first.

  • This will generate the result file, which in our case is test2.png

This PNG file displays as a normal image file but when you open it with WinRAR or any other extraction tool, it will extract the RAR file which is buried under the image file. This is a good way of saving your sensitive files from curious friends or co-workers or even prevent them from being misused even in case of a data breach.

#7 Abort Command Execution

This is one of the best Command Prompt tricks and everyone should know about it. Say, you want to run a specific command but accidentally execute a different command. In that case, to quickly stop the command execution, simply press “Ctrl +C” together and the operation will be aborted instantly.

#8 Always Run CMD as Administrator

For users who deal with system files and applications know that they always need elevated privileges to tweak and move around things. But on the other hand, Command Prompt always defaults to the normal account which makes it harder for users to gain Administrator access in the middle of an operation. So to save yourself from such situations, you can change the behavior permanently and run Command Prompt with Administrator privilege always.

  • Just search for “cmd” in the Start menu and right-click on it. After that, open its file location.
  • Now copy the Command Prompt shortcut to your desktop.
  • Move to desktop and right-click on the shortcut and open “Properties”.
  • Here, click on Advanced and enable “Run as administrator”.
  • Now onwards, open CMD from the desktop shortcut and it will always start with the Administrator privilege.

#9 Find Information About Commands

Sometimes we run a command to achieve a certain task, but don’t know much about it. So to learn about specific commands, add /? at the end of any command, and hit enter. Command Prompt will give you a good overview of its usage and syntax. Take an example of SFC from the above point, type sfc /? and hit Enter button. It will tell you the sub-commands with examples, and what are the other commands related to SFC in a language.

#10 List all Installed Programs

Another cool trick on the Command Prompt involves listing out all of the Windows 10 apps and programs that are installed on your PC. This is particularly helpful if you need to uninstall a program using the Command Prompt. To list out all the installed programs, simply follow the steps outlined below.
  • Launch Command Prompt, and type “wmic product get name“.
  • Hit Enter, and you will see a list of all the programs that are installed on your PC.

You can also use wmic to uninstall programs, directly from the cmd window. Simply type wmic product where name like ‘%NAMEOFAPP% call uninstall /nointeractive” and hit Enter. Obviously, replace “NAMEOFAPP” with the name of the app that you want to uninstall from your PC.

Related Articles


Please enter your comment!
Please enter your name here

Stay Connected


Latest Articles