Command prompt is a command line interface i.e, we give instructions to computer with the help of commands. A few decades ago, the graphical user interface (GUI) was not available. People used to command line interface (CLI) to give orders to the computer. Now, graphical user interface has helped us a lot by introducing graphics and people do not need to understand the commands to run the operating system. You just need to only click on a certain icon to get your desired result. But I will teach you more than 10 best cmd commands and hacks which are very useful and you must know about them.

In spite of all this, command line interface is still usable. Some people prefer it to do tasks very quickly. In this article, I will show the best command line interface that can help you a lot in your daily life and should try them to save your time. So, read the full article to understand the best cmd commands and hacks and their syntax. We will use command prompt, an amazing tool, to learn all the commands.

Best CMD Commands and Hacks

Command prompt contains a lot of features which we can use to do our tasks very quickly. Some of the useful and best cmd commands and hacks are given below.

1) Open CMD in any Folder:

If you are asked to open command prompt in a particular directory. What will you do? You will first open command prompt from start menu and then you will write the whole directory of that particular folder and then you will be able to make changes in the folder. But if I tell you to open cmd in that particular folder in one click that will be amazing. You might has been surprised that how can it possible. So, I will tell you that how you can do it.If you find it very difficult to navigate through folders using the Command prompt you can do this simple trick.

Follow the steps to do the same thing:
1) Open your desired directory or folder where you want to open cmd.
2) On the directory bar, write cmd hit enter.

10+ Best CMD commands and Hacks You Should Know

3) CMD will be opened in that particular directory.

2) Create Secured Folder:

I want to tell you a little trick. Just create a folder named “con” in your window. You will be unable to create that folder. So, this is amazing. But we can create create that folder with the help of command prompt. There are folder names which we can not use to name the folders e.g, COM1, COM2, CON, PRN, COM3, LPT1, LPT2, LPT3, AUX, NUL etc. Well, if you want to create a secured folder that cannot deleted, or even copied or moved to another folder then here is a simple command to do that.

To create that that folders, just follow me:
1) Open the directory where you want to create that folder.
2) Write the following command in command prompt and press enter:

10+ Best CMD commands and Hacks You Should Know

3) The folder named con, however you can choose any name listed above, will be created and you can won’t be able to delete or open that particular folder.
4) To remove that folder, simply write the following command:

10+ Best CMD commands and Hacks You Should Know

The folder will be deleted.

3) Hide any folder:

If you want to hide a particular folder, then you can use prompt to hide that particular folder. You will think that the same can be done with the help of window’s hide option. Well, you can do that but if we apply unhide option then, your hidden folder will be shown. But with the help of command prompt your folder will be hidden until you yourself unhide it with the help of command prompt. In that case, Now even if I have enabled unhide option to show the hidden files, we will not able to see that particular folder.

Follow the given steps:
1) Now, just navigate to that particular folder.
2) Then open cmd there, and write the following command and hit enter:

attrib +h +s +r Folder-name

 

10+ Best CMD commands and Hacks You Should Know

The folder will be hide if not just refresh the page then it will be done.
3) To unhide the that folder, just write the following command and hit enter:

                      attrib -h -s -r Folder-name
 
10+ Best CMD commands and Hacks You Should Know
The folder will be unhide.

4) Shutdown your computer using cmd:

We usually use windows option to shutdown or restart our computer. But we can use command prompt to do the same thing. This is really an awesome and useful trick and you must try it at least once.

Follow the given instructions:
1) Open the cmd and write the following command:

10+ Best CMD commands and Hacks You Should Know

2) Use “shutdown -r” to restart and “shutdown -l” to log off your operating system.
3) It is very amazing trick just try it once.

5) Customize your command prompt window:

As you know that the default colors of your command prompt are black (background) and white (foreground) colors. Now you can change the colors with this amazing trick.You can change the background color and the font color of your command prompt using this simple command.

Follow the procedure given below:
1) Open your command prompt and write the following code:

10+ Best CMD commands and Hacks You Should Know

2) It will show all the colors. Now, you can set the colors according to your taste. Example is given:

10+ Best CMD commands and Hacks You Should Know

i.e,  “color (background)(foreground)” like color 24 will produce red color in green background.

6) Change Prompt:

The next you can change the prompt i.e, C:usersusername to your desired name. It is very simple and an amazing trick that you can use to amaze your friends and other people. Just try it at least once.

Procedure is given below:
1) Open cmd and write the following command:

10+ Best CMD commands and Hacks You Should Know

2) You can see that it has changed.
Note: It is temporarily and will be dismiss when you will close the cmd.

7) Title of CMD:

As we know  that that the default title of the command prompt is like this “C:WindowsSystem32cmd.exe”. But we can change this title with the help of this amazing tool in one simple command.

Follow the give steps to change title:
1) Open your command prompt i.e, CMD
2) Just write the following cmd command:

10+ Best CMD commands and Hacks You Should Know

3) Now, look at the title bar.

8) Create a WiFi hotspot:

This is one of the best trick that you can try to amaze your friends and others. Command prompt provides you a facility to create a WiFi hotspot with the help of this tool. You can use other programs as well but it is simple and easy to use.

Now, follow me to do this:
1) Open your command prompt and type:

netsh wlan show drivers
 

Note: your PC/Laptop must running WiFi and support WiFi sharing option in order to create.
Now check whether Hosted Network Supported must be yes in order to create the WiFi hotspot network.
2) Now, follow the given syntax to create and press enter key:

netsh wlan set hostednetwork mode=allow ssid=your_hotspot_name key=password_you_want_to_set”(min 8 characters)

For instance, follow the given snapshot:

10+ Best CMD commands and Hacks You Should Know

It will create hotspot network with name “Awais Ali”.
3) Now, if you want to start (active) the hotspot, just write the following command:

netsh wlan start hostednetwork

4) If you want to close (stop) the hotspot, write the following command:

netsh wlan stop hostednetwork
 

5) It is very helpful and easy to use trick that you can use to create WiFi hotspot easily without any worry.

9) List of all installed programs:

It is another very useful command which you can use to know which programs are installed in your operating system. We can know this by using windows function, but it is very quickest method to do the same thing.

Just follow the given procedure:
1) Open your command prompt and type:

wmic product get name
For example:
10+ Best CMD commands and Hacks You Should Know

2) It will some time and you will get the list of all installed programs on your PC/Laptop.

10) Copycmd output:

It is also very useful command and will help you in your daily life. When you work on command prompt, you might have thought that how can I save the output of command prompt to show it to our friends or anybody else. So, I am here to guide you in this regard and after reading this, you will be able to save your CMD output.

Procedure is given below:
1) Open your command prompt program and type:

your_command | clip

For instance:

10+ Best CMD commands and Hacks You Should Know

2) So, it has copied the output of that particular (dir) command.
3) Now, open your notepad and paste the output there.

11) Clear CMD Screen:

We write many commands on command prompt and the screen become full of writing. Now, we want to clear the screen. This is very simple and you ca clear your command prompt screen in single command.

1) Just open your command prompt.
2) Simply write “cls” to clear the screen.
3) Your CMD Screen will be cleared no no time.

12) Exit CMD:

Well, this is another very useful command to close the command prompt. Usually we use close option of the command prompt to close it on the top right corner. There is another way of closing it in a very simple command. Just type:
exit
It will close the command prompt very quickly.

LEAVE A REPLY

Please enter your comment!
Please enter your name here