• 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

poweroff Command Examples in Linux

by admin

The poweroff command closes out filesystems, shutdowns the system, and power it off. Because this command immediately stops all processes, it should be run only in single-user mode. If the system is not in runlevel 0 or 6, poweroff calls shutdown -h, then performs a poweroff.

Syntax:

# poweroff [options]

poweroff Command Examples

1. To shutdown the machine:

# poweroff 

2. Call reboot or halt and not shutdown, even when shutdown would normally be called. This option is used to force a hard halt or reboot:

# poweroff -f
# poweroff --force 

3. To instructs the halt command to instead behave as poweroff:

# poweroff -p
# poweroff --poweroff 

4. Do not shutdown but make an entry into wtmp file:

# poweroff -w
# poweroff --wtmp-only 

5. Shut down network interfaces before reboot.

# poweroff -i

6. Place hard drives in standby mode before halt or poweroff.

# poweroff -h

7. Suppress writing to /var/log/wtmp.

# poweroff -d

8. Suppress normal call to sync.

# poweroff -n

5. Set to the verbose mode:

# poweroff --verbose 

Filed Under: Linux

Some more articles you might also be interested in …

  1. How to persistently set nr_requests using UDEV rules
  2. Status Commands in Linux – date, ps, who, uptime, finger, rup, ruser
  3. UNIX / Linux : How crontab validates the access based on the cron.allow and cron.deny files
  4. How to Set Resource Limits for a Process with Systemd in CentOS/RHEL 7 and 8
  5. Creating and Removing Files and Directories Under Linux
  6. Understanding Mac file timestamps
  7. Configure Persistent NIC Names of Network Adaptors in CentOS/RHEL using udev Rules
  8. CentOS / RHEL : How to allow or deny Users to login to VSFTP Server
  9. How to remove the noatime mount option from root mount point without reboot (CentOS/RHEL)
  10. Echo Command with Practical Examples

You May Also Like

Primary Sidebar

Recent Posts

  • JavaFX ComboBox: Set a value to the combo box
  • Nginx load balancing
  • nginx 504 gateway time-out
  • Images preview with ngx_http_image_filter_module

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright