Useful MS DOS commands that everyone should know
In this article Iam going to list useful MS DOS commands which is supported on most versions of Windows OS.
Table of contents
- Identify running processes,
- Show current system date & time,
- Shutdown PC after specific time,
- Show any website IP address.
1-Identifying Running Processes on Win machines
Use the “tasklist” commands to view all running processes
You can output the result to txt file as follow
C:>tasklist >> output.txt
Go to your C: directory and you will see a file named “output.txt” which includes the result of running “tasklist” command.
2-Show current date & time
C:>Date /t & time /t
3-Shutdown PC after specific period of time
Open CMD or open the Run command and type the following
The above command stats that the system will be shutting down after one hour (1 Hour = 3600) , here we need to specify the time before the system turn off in seconds.
In windows XP the above screen will appear indicating that the system will turn off after one hour.
we can terminate the running command through typing the following
This will cause the scheduled shutdown to stop immediately
We can also type the following command in the RUN window to shut down PC immediately
We can also schedule a shutdown and warn the user with a message as follow
shutdown -s -t 600 -c "PC is going to shutdown after 10 Minutes!"
The following command will make the PC restarts after 2 minutes
shutdown -r -t 120 -c ” PC will restart after two minutes”
4-Show any website IP address
open command prompt and type the followng
nslookup <website name>
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
DNS request timed out.
timeout was 2 seconds.
darknessgate.com IP address is 18.104.22.168
We can also do the same thing and find the IP address of a specific website through using the PING utility, to begin do the following:
Open command prompt , type PING <website name> then press ENTER