I like to use the console in linux, but sometimes i also use the windows cmd. I decided to make a small list of tips for the Windows console and useful CMD commands in 2022. Hope you like the list and my humor. If you want, you can add your favorite command tips in the comment.
1) CMD everywhere and for everyone
You can run CMD in any directory. Most importantly, you can immediately start working in it in the directory where you ran cmd. You don’t need to use the cd command for this.
2) Draw a tree for yourself (Tree)
You can draw a tree containing directories in cmd by using the tree command. Useful for finding yourself in a maze of directories.
3) Change the look (prompt)
This is a good thing that everyone says is unnecessary and then checks how cool it looks;)
Small tips, you can use ‘prompt /?‘ and see special characters.
4) Change the look (title)
Another trick that is unnecessary but fun to use. You can rename the CMD window.
5) Color your world and CMD
Like a boss 😀 One of my favorite commands thanks to which you can, for example, change the background color to black and the subtitles to green: D
Another option to change the color is to run properties and enter the color tab. Once there you might be interested in the background transparency option… hell yeah
6) View windows key
Just use the command below and you will see the windows key. I checked the command on Win10 and it worked.
wmic path softwarelicensingservice get OA3xOriginalProductKey
7) Who is better – compare files (fc)
Do you like the diff command in linux? Then you will probably like Windows fc. It is used to compare 2 files:
fc example.tf example_copy.tf
8) Information about interfaces (ipconfig)
Probably one of the most frequently used commands, it allows you to check, for example, the IP address of your machine.
By using it appropriately, we can, for example, force our computer to get a new IP address (release- releases the address lease, and renew renews).
ipconfig /release ipconfig /renew ipconfig /flushdns
The latter uses flushdns and clears the DNS resolver cache.
9) Check if he is alive (ping)
Speaking of the basics, the ping command cannot be missing. In simple terms, it allows you to check if the machines with a specific address or name are alive and responding.
10) Are you listening to me – check for open ports (netstat)
A simple command that allows you to quickly check, for example, which ports are open.
11) Where are you going (pathping)
A bit more advanced version of ping, which also shows the path that the packets are going through.
12) why so long, where have you been (tracert)
A more advanced version of pathping which I sometimes forget because it’s easier for me to remember pathping;)
Here you will find out not only where our packages go, but also how fast.
13) License to kill (taskkill)
Command with a license to kill processes. You can force the program to stop using taskkill -im followed by the name of the executable file or taskkill -pid followed by the process ID.
taskkill -im PROCESS_NAME taskkill -pid PROCESS_PID
14) Who is bothering me (tasklist)
Tasklist displays a list of running tasks on your computer. Sometimes you may be surprised what we have up and running.
15) Clear mind and console (cls)
The command quickly clears the console screen. It comes in handy because when you have too much on your console, you can get lost. Thanks to this, old commands do not distract you from what is important.
16) Do you know your history (F7)
Pressing F7 displays a short list of recently used commands. If you want, check out the other function keys, I like the F7 the most.
I probably forgot a lot of things, as well as the parameters that can be used to extend commands and get something extra. I hope I made your work a little easier and convince some of you that CMD is not so bad 🙂
The article was intended to show people who are just starting their adventure with the Windows console that it does not have to be so ordinary and uninteresting;)
Check this article if you want to know how to login via SSH without password.
Here you will find documentation for CMD.
If you want to share some cool CMD tips, feel free to write in the comment.