Did you ever use
MS-DOS commands in your daily computing life and did you know who use DOS commands for working purpose: Programmer, Operator, Student or someone else. When we hear about things of Hacking, why command prompt is always sounds there and that fact you found in movies also. Doing something with CMD is like giving my own custom instructions to my computer, even the instruction is official or unofficial. If you already know about
all DOS commands, but didn’t know what are Tricks and Hacks then this page will be very beneficial for you like you just got a master’s degree in command prompt. To know about all commands, type:
help in
cmd.exe now and for a specififc command type:
<command> /?.
Start with a Simple Clean Screen
Commands: @echo off, cls | Type: Trick
When you start your command prompt, you can see there are some things already prompt on black screen like Path and Windows Version. To make your CMD a clean and clear screen you can use first command: @echo off and secondly: cls or also you can use both of the commands at once like this:@echo off && cls. It’s an essential trick you can use when you’re teaching someone else because starting from line one will make any person understanding effective.
Make your Command Prompt a DOS Editor
Commands: edit | Type: Trick
By using a simple and short command:
edit, you CMD turns to an
MS-DOS Editor where you can type anything, save, options and more. It’s totally works like a notepad. If you don’t know what do with this editor, you can simply go to
Help> Commands or
press F1 to know what are the commands you can use on editor. Your position of
Line and
Column is shown at the bottom as you see in the above screenshot.
Find an IP address of a domain name
Commands: nslookup | Type: Hack
As you know every domain name has an IP address which is an identity of a server, and your computer opens a website by converting domain name(example.com) into IP address(1.234.567.890). You can use the command: nslookup example.com to get the IP of a domain. For ex. nslookup facebook.com will return the IP address of Facebook’s server.
Remote Shutdown a Computer
Commands: shutdown | Type: Hack
Ok!, here is a way you can remotely shut down your friends, family, relative’s computer right from your command prompt. CMD commands can handle your computer’s power options, to know more about type:
shutdown /?. For remote shutdown type:
shutdown -i and you get a Remote Shutdown Dialog. This dialog can’t accessible directly from your programs or search because this is a hidden feature of Windows. To know about the complete guide:
Restart or Shut Down a Remote Computer
Custom CMD Path
Commands: None | Type: Trick
By default your CMD starts from C:\Windows\system32> and all of your commands you enter here will run into the directory you’re currently in. Did you ever try to change the path like from C:\Windows\system32 to D:\MyFolder\, To do this you can use command CHDIR, but the most easiest way is go to the path using windows explorer> Hold SHIFT and Right Click over path> Select Open command window here.
Random Matrix
Commands: @echo off, color, echo, goto | Type: Hack
To make your command prompt looks like a falling random matrix hell like you see in movies, you just create and open the batch file whenever you want to see the matrix. The batch file is required here, you can’t type or paste the commands directly on CMD.
@echo off
color 02
:tricks
echo %random%%random%%random%%random%%random%%random%%random%%random%
goto tricks
Open Notepad> paste above code> save the file as name: matrix.bat> open. (You can also replace file name but make sure extension .bat should not be removed.)
Personalize your CMD
Commands: title, color | Type: Trick
Command Prompt can be customized by commands or from the options. Customization is like Change Title of the CMD, Background color, Text Color, Font size and more. The more beautiful looking command prompt is looks more personal.
To change Title – title mytitle
To change color – color FC (For more color options type: color /?)
It’s not enough, you can personalize directly from options. Right click over Title Bar> Select Properties> Customize.
Most Recent Command/All History
Commands: doskey | Type: Trick
If you want to paste your most recent command in CMD, you can simply use the Up (∧) arrow key and it will automatically type your most recent command. This is an essential way i always use when i’m using command prompt. Another command doskey /history shows all of your recent commands you use in a session.
Saving the output in a file
Commands: Your command>[path].txt | Type: Trick
If you want to save your command output in a file, then use the “>D:/myfile.txt” after the command without spaces. It will save your output in a file like .txt or .Doc and make sure the path you choose where you want to save the file. Above example path is D: drive only, you can change it to your drive or folder like: systeminfo>E:/folder1/folder2/name.txt
List and Kill Tasks
Commands: tasklist, taskkill | Type: Hack
If you want to close any program or finish any task forcefully, you didn’t need to open task manager, you just list all the running tasks in CMD with the help of command: tasklist and note down the Image Name you want to close the program. After type: taskkill /F /IM Image name (Replace image name with your image name for example to close notepad use: taskkill /F /IM notepad.exe)
Run multiple commands
Commands: Use && after each command | Type: Trick
Once you goes expert in Microsoft Command Prompt Operations, now you need to power yourself in CMD and start executing multiple commands at once. To do this you have to use the && separator after each command you type in a line. For example: systeminfo && ipconfig /all. If you didn’t understand see the above screenshot. You can type many in a single line.