KOSKERS
V2EX  ›  问与答

ubuntu 18.04 下如何增加开机启动的命令??? RC local 不管用。。。

  •  
  •   KOSKERS · Oct 5, 2018 · 7941 views
    This topic created in 2958 days ago, the information mentioned may be changed or developed.

    ubuntu 18.04 下如何增加开机启动的命令??? RC local 和 rc5 下加了命令不管用。。。

    有哪位大虾知道吗???

    18 replies  •  2018-10-06 13:23:28 +08:00
    KOSKERS
    KOSKERS
    OP
    Oct 5, 2018
    1
    我参考这篇文章,貌似还是不行。。。


    http://www.r9it.com/20180613/ubuntu-18.04-auto-start.html
    DevRoss
    DevRoss
    Oct 5, 2018 via Android
    2
    systemd
    KOSKERS
    KOSKERS
    OP
    Oct 5, 2018
    3
    @DevRoss 我按照上面 systemd 的配置还是不行。
    msg7086
    msg7086
    Oct 5, 2018
    4
    找篇好点的。
    benjix
    benjix
    Oct 5, 2018 via iPhone❤️2
    5
    自己去创建 rc.local,然后 systemctl enable rc-local 启用就可以了
    Sanko
    Sanko
    Oct 5, 2018 via Android
    6
    开启启动我一般都是用 crontab 设置的
    @reboot python3 /root/test.py
    richangfan
    richangfan
    Oct 5, 2018
    8
    ubuntu 不是有自带的开机启动管理工具吗,GUI 的
    innoink
    innoink
    Oct 5, 2018 via Android
    9
    开机启动分好多种
    服务启动用
    随 x 启动
    随终端启动
    随 dm 启动
    都不一样
    KOSKERS
    KOSKERS
    OP
    Oct 5, 2018
    10
    @paperseller 可以了。多谢
    lionseun
    lionseun
    Oct 5, 2018 via Android
    11
    感觉楼主这样问问题,有点难得到满意回复
    flowfire
    flowfire
    Oct 5, 2018 via iPhone
    12
    crontab
    KyonLi
    KyonLi
    Oct 5, 2018 via iPhone
    13
    hahasong
    hahasong
    Oct 5, 2018
    14
    @paperseller
    @KOSKERS
    这种我试过,有一个问题,用它启动的进程用户是 anonymous,并不是以前的 root.权限会有些问题,什么原因,手动在服务里指定用户也没用
    KOSKERS
    KOSKERS
    OP
    Oct 5, 2018
    15
    @hahasong 应该是有 root 权限的。我的命令是用来降显卡电压的。一定要 root 权限才能执行。
    yanest
    yanest
    Oct 6, 2018
    16
    Ubuntu18 放弃了,老是喜欢改来改去的,不愿意每次都重新学习一下
    KOSKERS
    KOSKERS
    OP
    Oct 6, 2018
    17
    @yanest 哈哈。是的
    KOSKERS
    KOSKERS
    OP
    Oct 6, 2018
    18
    @yanest 老是喜欢推翻重来
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   926 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 41ms · UTC 20:43 · PVG 04:43 · LAX 12:43 · JFK 15:43
    ♥ Do have faith in what you're doing.