If you’re new to Windows, we suggest glancing at ourWindows 10 beginner tipsarticle to get a better idea about how the OS works and its features. Now, let’s dive in and check out what you can do with Command Prompt.
1. Encrypt Files Using Command Prompt
One of the most useful things that you can do using the Command Prompt, isencrypting your sensitive data. Encryption is a way to prevent others from taking a peek at your data, and it’s a really important part of ensuring (to some extent, at least), that your files are only yours. With this simple Command Prompt trick, you can easily encrypt files on your Windows PC.
Note:If you try and open these encrypted files, they will open normally for you, however, any other user will not be able to view the files, unless they log in using your account. So make sure that you have a password set.
The Command Prompt window can be unexciting with the default black background and light gray text color. But Windows does allow you tochange these colorsto suit yourself and make things a bit more intriguing.
Note:There are a lot of other colors available, and you can check out the entire list by typing“help color“.
When you first open Command Prompt, the default text of the prompt is very boring. It does reflect the current working directory that the user is in, but it sure could use some customization. If you would like the prompt in your cmd window to say something other than the default, you can use the following trick.
Note:There are some more options like “$G” available, and you check out the entire list by typing “help prompt“. Also, you can reset the prompt back to its original state by typing “prompt” and hitting Enter.
When you launch Command Prompt, you must have seen that the title bar reads “Command Prompt”, or maybe “Administrator Command Prompt”, if you launch it with Administrator privileges. While that is okay, but if you have a lot of cmd windows open, and each of them are working on a different task, then this “Command Prompt” title is not helpful at all. Fortunately, you can change that too.
Note:The title changes back to “Command Prompt” once you quit cmd and relaunch it.
If you’re trying to troubleshoot an issue or merely looking for a list of all the drivers on Windows 10/11, there’s a command prompt trick you can use. Follow the steps below to see the list of drivers:
All the function keys on your keyboard are also shortcuts for various Command Prompt functions. Here’s what each function key on your keyboard does in CMD:
While there is an easy way to hide folders on Windows by using the properties pane of the folder and checking the checkbox that says“Hidden”,the method is not very useful as the folders hidden using this method can easily be viewed if the view options are changed to “Show hidden files and folders”, making it a pretty useless feature. However, just like you canhide folders using Terminal on Mac, using this cmd trick, you can hide your folders in such a way that they will be completely hidden, and Explorer won’t be able to display them at all. Simply follow the steps outlined below:
Note:Hidden folders can be viewed using the cmd command “dir /AH”.
If you have ever tried to copy stuff off the Command Prompt, you must have realized that it is exceedingly difficult, not to mention un-intuitive. However, with this simple trick you can copy the output of any command that you want, directly to your computer’s clipboard, and you can then paste it into any text editor that you want.
Another cool trick on the Command Prompt involves listing out all of theWindows 10 appsand 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:
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.
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:
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:
As you can see in our laptop’s case, the battery’s capacity has dropped to 82% to what it was shipped with. If you want a step-by-step direction forgenerating battery health on Windows, click on the link to read the article.
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 tohide a RAR, ZIP, or another archived file inside an image or text file. To achieve this, follow these steps:
Note: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 PNG filedisplays as a normal image filebut when youopen it with WinRARor any other extraction tool, itwill extract the RAR filewhich 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.
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” togetherand the operation will be aborted instantly.
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 canchange the behavior permanentlyand run Command Prompt with Administrator privilege always.
SFC (System File Checker) is a relatively new addition to Command Prompt tokeep your computer clean and bug-free. It’s a handy command-line tool that will help you fix many system issues. Just runsfc /scannowon 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.
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, typesfc /?and hit enter. It will tell you the sub-commands with examples, and what are the other commands related to SFC in a lucid language. This command is similar to the “man” command in Linux.
Many users are aware of the ‘UP’ navigation key to move forth and back between commands, but circling back to previous commands that were executed way back is difficult. However, there is thedoskey /historycommand to check all your executed commands in a chronological list. The con is you can’t select the commands and execute them instantly and will have to type it out manually, which is not the best solution.
As a result, if you want to quickly navigate through all your past commands with the ability to execute them immediately,just press the F7 key. You will get a separate window where you can choose a command and execute it then and there. It’s one of the best Command Prompt tricks. Keep in mind, some users need to press the “Fn” key along with F7 to trigger this action.
If you’re running low on space and urgently need to clear some trash out, getting rid of temporary files on your PC might be the swiftest action plan. Here’s what you can do to clean out temp files from your PC and regain a considerable amount of space.
Do you like playing role-playing games? If so, you should definitely check out Ateraan, which is a text-only role-playing game that works inside the command prompt on your Windows PC.
Command Prompt is one of the oldest Windows programs, but recently Microsoft announced a universal command-line tool for Windows that integrrated Powershell, WSL, and Command Prompt at once place; The program’s called the Windows Terminal. One of the advantages of running Command Prompt in Windows Terminla is you get the ability to run multiple tabs to execute multiple commands in the same Window. If you’re wondering how totry out the new Windows Terminal, refer to our guide on the same.
Using the dir command to get an idea about the structure of a directory could be a hard affair since the command isn’t very presentable. Hence, if you want to look at a directory’s structure in a more neat and precise way, use the tree command. Here’s how the command looks.
The command will show you the structure of your default directory “C:” If you want to check the structure of other drives, use the drive letter followd by a colon after typing the command.