Skip to content

Schedule System Restart

Lean's edited this page Dec 15, 2025 · 2 revisions

Update and restart system

  • sudo vim /usr/local/bin/update_and_reboot.sh
#!/bin/sh
pacman -Syu --noconfirm
systemctl reboot
  • sudo chmod +x /usr/local/bin/update_and_reboot.sh
  • sudo vim /etc/systemd/system/update_and_reboot.service
[Unit]
Description=Update Arch Linux and Reboot

[Service]
Type=oneshot
ExecStart=/usr/local/bin/update_and_reboot.sh
  • sudo vim /etc/systemd/system/update_and_reboot.timer
[Unit]
Description=Timer for weekly Arch Linux update and reboot

[Timer]
OnCalendar=Tue 20:00:00
Persistent=true

[Install]
WantedBy=timers.target
  • sudo systemctl enable --now update_and_reboot.timer

Clone this wiki locally