Shut down, restart, unlock your system from the terminal

watch linux command

Shut down or restart the system From the graphical interface it is very simple, but sometimes we may have to make use of other more powerful tools that give us more power or functionalities that we do not have in the graphical system. For example, you may need to shut down or schedule a restart after a certain period of time, because you have to leave home and leave your computer on, or for any other reason.

It may also happen that our work program got stuck and this has caused us to waste time waiting for the blockage to be resolved, if it is resolved, and the console can take the chestnuts out of the fire. Be that as it may, we are going to see a series of simple commands that can help us in our daily routine, adding an extra to what we have:

Turn off your computer immediately:

sudo shutdown -h now

Turn off your computer after 15 minutes, you can change the figure for whatever you want:

sudo shutdown -h +15

Turn off your computer at one hour, for example at 21:03:

sudo shutdown -h 21:03

Restart your computer immediately, you can use one of the two (if you want to add a temporary restart, you can put behind the hour or the time as we have done before with the automatic shutdown in the first command):

sudo shutdown -r now
sudo reboot

A program has been blocked, To close it if it does not respond, you can use this command, a cross-shaped cursor will appear and the graphic window that you touch will be forcibly closed:

xkill

You use Ubuntu and your system has been totally blocked, you can't do anything ... I encourage you to use this key combination (hold down Print Screen + Alt and then type the others, it is not necessary to hold them all at the same time, only the first two):

 Alt+Impr. Pant+RESIUB

I hope they have helped you, they are very basic commands, but many newcomers may not know them.


The content of the article adheres to our principles of editorial ethics. To report an error click here!.

3 comments, leave yours

Leave a Comment

Your email address will not be published.

*

*

  1. Responsible for the data: AB Internet Networks 2008 SL
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Pedro Exposito Hervás said

    Hola!
    Your summary is great. Just a note: it is not "REISUB" (On the internet, the trick of REInitiates SUBnormal is used to remember it and that is why it caught my attention.
    Keep up your blog because even though I've never written, I follow it daily and it's great!

  2.   dhouard said

    A couple of notes.

    "Sudo shutdown -h now" also has a "short" command, it is "halt". With that the system will turn off automatically.

    To put an end to those programs that have been left hanging, the "top" program can be opened in a terminal, which will show a list of the programs that consume the most. By pressing the «k» key, it will ask us for the pid (the number that appears in the leftmost column) and the signal to send (the 9 kills it without remorse).

    A greeting.

  3.   Javi said

    Thank you, simply. For those of us who are 'somewhat clumsy' (let's leave it there, let's not punish ourselves anymore), people like you are a real lifeline.
    THANK YOU.