KOSKERS
V2EX  ›  问与答

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

  •  
  •   KOSKERS · Oct 5, 2018 · 7476 views
    This topic created in 2798 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
        1
    KOSKERS  
    OP
       Oct 5, 2018
    我参考这篇文章,貌似还是不行。。。


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