Shutting down the computer through the command line, timer, cancel

It's no secret that in our time the computer greatly facilitates life. It is convenient to use, and it really helps to save a lot of time in finding information. It is also often used for entertainment. Many people watch TV shows, movies, or play games. It often happens like this: you watch a movie on your computer, and after the final credits you don’t feel like getting up and turning it off. Knowing special commands, you can avoid these operations. The computer can be put on completion. Turning off the computer through the command line will make watching movies more comfortable. Here you will learn about the procedure, as well as a shortcut that acts as a shutdown button.

Shutting down the computer through the command line

Any user can do this. The shutdown command will help you with this. First you need to enter the control line itself. To do this, click "Start", hover over "All Programs" and try to find "Standard" there. When you click on it, a Windows menu will open in front of you, which can facilitate the work. One of these programs is the command line. Open it, a black window will appear in front of you. This is our search. With it, you can control the computer. You can also turn off the PC or put on a timer. In order to set it for a certain time, just enter the command "Turn off the computer" through the command line. You need to write shutdown text in English. From English, this translates as "close." However, just entering this command is not enough. You must additionally put a "-" and the English letter "s". All code looks like this: "shutdown-s". After you press Enter, the computer shutdown button will work.

shutting down the computer through the command line

How to put the computer on automatic shutdown through the command line?

Now we will talk about how to make your PC more convenient. It would be nice if the computer shuts down on its own after some period of time. This can also be done via the command line. You need to go into it through "Start" / "All Programs" / "Accessories" / "Command Prompt". Further, in the open black window, you enter the same command as for shutting down - "shutdown-s". But it is necessary to add a note to it that the computer should not be turned off now, but after a while, that is, add β€œ-t” after a space. This will make it clear to the computer that it should turn off after a certain time. Next, indicate the time in seconds after which your computer should shut down. Say by writing "shutdown -s -t 10", wait for the shutdown in ten seconds. If you write shutdown -s -t 6000, the computer will shut down after 100 minutes. We want to remind you that a window with the remaining time will appear on the screen 10 minutes before the completion of work. If you wish to cancel the shutdown, you can do it. How to implement this action, you can see below in the article.

computer shutdown command

How to cancel computer shutdown?

If you needed to put the PC on the timer, but then you changed your mind and do not need this action, you need to enter the code "shutdown -a" at the command line. After that, the previous operation will be canceled, and you can continue to work further.

computer shutdown shortcut

Computer shutdown shortcut

Agree, this is convenient if you can turn off the computer from the icon on the desktop. You do not need to go into the "start-off" every time. Just by clicking on the icon, you start the shutdown. You can do it yourself and it won’t take you much time.

computer shutdown button

How to create a shutdown shortcut?

If you decide to create a shortcut to turn off the computer, you need to perform some actions. You will succeed if you follow the instructions. To do this, right-click on an empty spot on the desktop to bring up the context menu. In it, select "Create." Next click on the "shortcut". A simple icon will be created on your desktop. After its formation, a window pops up with the question "For which element do I need to create a shortcut?". It will have a line for input with the name "indicate the location of the object." In it you need to write a text similar to the control words to turn off the computer through the command line. But it will be a little different. The command will look like this: Shutdown.exe -s -t 00. After entering the command, press Enter. Next you have to name the folder. You can call it "turn off the computer" or in another way - as it will be convenient or as you like. Click "Finish" - and the folder is created. You can also change the icon of this shortcut. Right-click on it, then select "Properties". Go to the "Shortcut" section and below you will see "Change Icon". Click, select the one you like, click "Save" and "Finish." Place this symbol separately from the rest, so that you do not accidentally turn off the PC. We hope the article helped you understand what the command to turn off the computer is, and how to create a shortcut for this.

Source: https://habr.com/ru/post/K15888/


All Articles