How to execute commands with administrator rights when starting Linux?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
36 views
Good day!
You need to run a few programs at startup, but they run only as administrator. How to make so that at startup the command run as administrator?
by | 36 views

4 Answers

0 like 0 dislike
add them to /etc/rc.local
by
0 like 0 dislike
The best way is to create a systemd unit to Type=simple.
Bonus is a convenient logging and management.

Example the link:
\rhttps://www.devdungeon.com/content/creating-system...
by
0 like 0 dislike
to deal with the crontab for root, option @reboot
by
0 like 0 dislike
I would add the commands in the file /etc/rc.local, the commands are executed each time you boot the system(by row)
by

Related questions

110,608 questions
257,187 answers
0 comments
40,796 users