How do I run a sudo command on startup?

How do I run a sudo command on startup?
Answer
2 Answers
  1. Either load a root shell ( sudo bash ) or prefix most of the commands with sudo to run as root.
  2. Create a shell script for the systemd service unit to execute. Typically, you will put the file in /usr/local/sbin . Let’s call it /usr/local/sbin/fix-backlight.sh (as root): editor /usr/local/sbin/fix-backlight.sh.
 

Tìm kiếm

Back
Top