• Homepage
  • Categories
deepin20 如何开机以root运行.sh脚本
deepin Talks152Views ·3Replies
ToFloorFloorX
langkye
deepin^1
On2020-11-25 10:18
Author

我有一个脚本,开机后运行,需要root权限,怎么操作?

如: sudo ~/.sbin/startup.sh

echo "admin"

ReplyFavoriteViewAuthor
AllReplies
SamLukeYes
deepin^6
On2020-11-25 10:32
One
HasDeleted
SamLukeYes
deepin^6
On2020-11-25 10:34
Two

写一个 systemd unit

ReplyViewAuthor
ericneon
deepin^2
On2020-11-25 14:48
Three

这样做很不安全啊!

ReplyViewAuthor
忘记、过去
deepin^6
On2020-11-25 18:17
XFloor

echo "你的密码" | sudo -S xxxxxxxxxx

就不用手动输入密码了。

ReplyViewAuthor
NewPost

HonorRoll

  • Weekly
  • Monthly
  • Total