LinuxCommandLibrary

suspend

Enter system suspend (sleep) mode

TLDR

Suspend the current shell (useful for when you are in nested shells like su)

$ [bash] <Enter> suspend
copy

Continue from suspension if suspend was used in a non-nested shell (run this in a separate terminal)
$ pkill -CONT bash
copy

Force suspension even if this would lock you out of the system
$ suspend -f
copy

SYNOPSIS

suspend

DESCRIPTION

The suspend command puts the system into a low power state, either suspending to RAM (S3 state, also known as "sleep") or suspending to disk (S4 state, also known as "hibernate"). Suspending to RAM generally results in a faster resume time but requires power to maintain the system state in memory. Suspending to disk saves the system's memory contents to a swap partition or file, allowing for complete power-off, but the resume takes longer as the data needs to be read back from disk. The exact behavior and availability of suspend features depend on the system's hardware, kernel configuration, and power management settings.

Many systems now use systemd for power management, and the systemctl suspend and systemctl hibernate commands are preferred. However, the suspend command may still be present and functional, especially in older systems or systems with specific power management configurations. The command usually requires root privileges to execute successfully.

CAVEATS

The suspend command's functionality can vary significantly between systems. Its behavior depends heavily on the system's BIOS/UEFI, kernel configuration (specifically ACPI and power management settings), and the presence of relevant drivers.

Modern distributions often default to using systemd for power management via systemctl, making the direct suspend command less relevant.

The user should always check the power management configuration of their OS to ensure that suspend and hibernate are properly setup.

MODERN USAGE

While the bare suspend command might still exist, it's generally recommended to use systemctl suspend (for suspend-to-RAM) and systemctl hibernate (for suspend-to-disk) in modern Linux distributions that utilize systemd. systemctl provides a more unified and reliable interface for managing system services, including power management.

HISTORY

The suspend command has its roots in early Linux power management efforts. As hardware capabilities for low-power states evolved, tools were needed to trigger these states from the command line. Before systemd, specific utilities like pm-utils (containing commands like pm-suspend and pm-hibernate) were more commonly used. The direct suspend command might have been a symbolic link or a wrapper script around these lower-level utilities in some distributions.

SEE ALSO

systemctl(1), pm-suspend(8), pm-hibernate(8), shutdown(8)

Copied to clipboard