Starting Up
When the system is powered on, the BIOS (Basic Input/Output System) or UEFI (Unified Extensible Firmware Interface) performs initial checks on the hardware, including peripherals like the keyboard, mouse, and disk drives. It initializes these devices and hands control over to the bootloader.
Shut Down
During the shutdown process, peripherals are systematically turned off or put into a low-power state. For example, the file systems are unmounted, and any data in buffers are written to disk.