• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

reboot Command Examples in Linux

by admin

The reboot command is a command-line utility that is used to reboot the system in Linux and other Unix-like operating systems. It is usually found in the init system folder (such as /sbin/reboot or /usr/sbin/reboot).

To use the reboot command, open a terminal and type reboot followed by any necessary options. For example:

  • reboot: Immediately reboots the system.
  • reboot -h: Immediately reboots the system and halts it after shutdown.
  • reboot -r: Immediately reboots the system and performs a system shutdown before rebooting.
Note: It is generally a good idea to save any open documents and close all programs before rebooting the system to avoid data loss.

Here are some additional options that you can use with the reboot command:

  • -d: Delays the reboot by the specified number of seconds.
  • -f: Forces a reboot, even if the system is not responding.
  • -n: Skips the system shutdown and goes straight to the reboot.
  • -w: Prints a warning message to all logged-in users before rebooting.

For a full list of options, you can type man reboot to view the manual page for the reboot command.

reboot Command Examples

1. Reboot the system:

# reboot

2. Power off the system (same as `poweroff`):

# reboot --poweroff

3. Halt the system (same as `halt`):

# reboot --halt

4. Reboot immediately without contacting the system manager:

# reboot --force

5. Write the wtmp shutdown entry without rebooting the system:

# reboot --wtmp-only

Filed Under: Linux

Some more articles you might also be interested in …

  1. dmidecode Command Examples in Linux
  2. e2fsck: command not found
  3. All Linux Compress/Decompress Commands
  4. asciiart Command Examples in Linux
  5. How systemd-tmpfiles cleans up /tmp/ or /var/tmp (replacement of tmpwatch) in CentOS / RHEL 7
  6. How To Create a Partition Using “parted” Command
  7. setenforce Command Examples in Linux
  8. How to Reset Root Password in CentOS/RHEL 8
  9. apt-mark Command Examples in Linux
  10. nmap: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • protonvpn-cli Command Examples in Linux
  • protonvpn-cli connect Command Examples
  • procs Command Examples in Linux
  • prlimit: command not found

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright