Skip to main content

Shutdown or Restart Ubuntu

Ubuntu commands to restart or shutdown the server 

1. Ubuntu Reboot command

Ubuntu Linux terminal we can run to restart it is “Reboot“.  

This command can be used with or without sudo,

however, if some Admin process is not allowing you to restart the computer then it is recommended to use sudo with the command.

    Sudo reboot

The system will prompt you to enter the current user password to initiate the reboot command.

2. Sudo Shutdown Command

“shutdown” command with the -r option. It will properly first shut down the computer and then restart the same because we have used the -r option with it.

The syntax to use is here:

    sudo shutdown -r now

3. REISUB Sequence (Emergency Restart)

If your Ubuntu system is not responding properly then the REISUB sequence is quite handy to safely start it. In this method, we have to type REISUB in our command terminal in the same sequence it is written while holding ALT and Print screen keys.

So, on your computer open the command terminal and then press the left-side Alt key and then Print Screen or SysRq keys on your Keyboard. After that type REEISUB sequence letters this will immediately restart your computer.

Let’s also learn what the letter of the REISUB command means.

    R: Switch the keyboard from raw mode to XLATE mode.

    E: Send the SIGTERM signal to terminate all processes except init.

    I: Send the SIGKILL signal to kill all processes except init.

    S: Sync all mounted filesystems to reduce the risk of data loss.

    U: Remount all filesystems in read-only mode.

    B: Immediately reboot the system.

4. Sudo Power- Off commands

Although the above command examples are enough to restart Ubuntu Linux, however those who just want to shut down their PC can use “power0ff“. 

Note: it will not restart your computer only shut down.

It is not only easy to remember but also to use.

    sudo poweroff

That’s it, your system will turn itself off immediately after running the above command.

If the previous command is not what you want then there is another one – “HALT“. 

It also works the same as the previous one.

Let’s know how to use it: You just need to type halt along with sudo.

    sudo halt

Well, the above command will immediately shut all processes which could sometimes cause data loss of currently running software. 

So, to shut down everything properly we will use -p option that refers to Power off. If we don’t use this option then the command stops the CPU process at once instead of stopping them gracefully.

    sudo halt -p


in addition I have add these thing for your easy reference 

Shutdown System at a Specific Time

You can use time argument with shutdown command to (in two different formats – hh:mm and relative time format +m where m is the number of minutes from now).

The following example will schedule system shutdown at 10 A.M (note that the system clock follows 24 hour format):

    sudo shutdown 10:00

To shutdown the system after 10 minutes from the current time (now), use the following command:

    sudo shutdown +10

+10 is the minutes after which you want the system to shutdown.


Shutdown System Immediately

To shut down the system immediately use +0 or its alias now with shutdown command. Look below for the command usage example:

    sudo shutdown +0

or

    sudo shutdown now


Broadcast a Custom Message for Shutdown

You can broadcast a custom message to let people know that system is going to shutdown.

    $ sudo shutdown -h +5 "System will shutdown. Please save your work."


Automatically Schedule Ubuntu System Shutdown

To schedule system shutdown using terminal, use the following command format:

    shutdown -h (time in minutes)

If you want to shutdown the system in next 90 minutes, run:

    shutdown -90

To cancel shutdown command, type the following command:

    shutdown -c

Restart

The shutdown command can be used to restart a system with the r option instead of the h option. Usage is same as before. Just replace the h option with r option.

$ sudo shutdown -r +5 "System will shutdown in 5 minutes. Please save your work."



Comments

Popular posts from this blog

Word to PDF Convertor

 A Word document may be easily converted to a PDF file However, what happens if you need to convert a ton of Word files into PDFs? It will take a long time to open every file by hand and save it to PDF.  You may quickly and easily convert large amounts of Word to PDF with the help of this method. And without utilizing any outside tools either. Ms. Word is all you need. Copy the following code into Notepad or Notepad++, then save the file as "PDF.js" in a folder var obj = new ActiveXObject("Scripting.FileSystemObject"); var docPath = WScript.Arguments(0); docPath = obj.GetAbsolutePathName(docPath); var pdfPath = docPath.replace(/\.doc[^.]*$/, ".pdf"); var objWord = null; try {     objWord = new ActiveXObject("Word.Application");     objWord.Visible = false;     var objDoc = objWord.Documents.Open(docPath);     var format = 17;     objDoc.SaveAs(pdfPath, format);     objDoc.Close();     WScript.Echo("Saving '" + docPath + "'

BACKUPPC INSTALLATION AND CONFIGURATIONS

BACKUPPC INSTALLATION AND CONFIGURATIONS BackupPC is a backup solution that can be configured to back up remote Linux and Windows systems. It can use a variety of different protocols and has a flexible scheduler to coordinate full and incremental backups. I have installed this on ubutnu 14.04 LTS and its running fine for me for a long time since the installation Open a terminal and enter the following commands: sudo apt-get update sudo apt-get install backuppc During the installation, you will be asked what kind of mail server configuration is needed. We can select the "Local only" option, because we will not be configuring internet-aware mail ???????? Postfix Configuration ????????? ? General type of mail configuration: ? ? ? ? No configuration ? ? Internet Site ? ? Internet wi

Flash For EVONY 2021

Flash is now officially dead.   with this way you can still use Flash. if you have any problem while installing or working on this please feel free to contact me to help you first we have to go to pale moon https://www.palemoon.org/ Download and install PaleMoon then lets go to adobe archive page  https://web.archive.org/web/20200630185339/https://helpx.adobe.com/flash-player/kb/archived-flash-player-versions.html go to bottom of the page until you find the  Flash Player archives this site is little bit slower than others  Download this version,after May it is not working (Released 5/12/2020)  Flash Player 32.0.0.371  (425 MB)    https://web.archive.org/web/20200630185339/https://fpdownload.macromedia.com/pub/flashplayer/installers/archive/fp_32.0.0.371_archive.zip Unzip the archive and install the flash player for windows, Goto control panel and find the flash adon there Click on never check for updates  then open your c drive  and search where adobe is get installed. in here i am usi