Forrest logo
back to the rtcwake tool

rtcwake:tldr:e69a1

rtcwake: Perform a dry run to wakeup the computer at a given time. (Press Ctrl + C to abort).
$ sudo rtcwake -m on --date ${hh:ss}
try on your machine

The command "sudo rtcwake -m on --date ${hh:ss}" is used to put the system into a sleep mode until a specific time. Here's an explanation of each part of the command:

  • "sudo": This command is used to execute the rest of the command as a superuser or administrator. It provides administrative privileges to the subsequent command.

  • "rtcwake": This is the main command responsible for managing the system's real-time clock (RTC) wake-up functions. The RTC is a hardware component that keeps track of time even when the computer is powered off.

  • "-m on": This parameter specifies the sleep mode to enter. In this case, "on" indicates that the system should be put into the sleep mode.

  • "--date ${hh:ss}": This parameter allows you to specify when the system should wake up from sleep. The "${hh:ss}" is a placeholder that should be replaced with the desired time in hours and minutes. For example, if you wanted the system to wake up at 8:30, it will be "--date 08:30".

By executing this command with the appropriate time, the system will enter sleep mode and automatically wake up at the specified time.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the rtcwake tool