ARTICLE DETAIL

资讯详情

深耕网站建设与运营推广的一线实战洞察。

Linux开机自启动服务创建

Linux开机自启动服务创建

例如:在KylinV10操作系统中,开机自启动depmod -a

#创建服务单元 vi /etc/systemd/system/depmod.service #写入配置 [Unit] Description=Run depmod at boot After=systemd-modules-load.service [Service] Type=oneshot ExecStart=/sbin/depmod -a [Install] WantedBy=multi-user.target # 重载systemd配置 systemctl daemon-reload # 设置开机启用 systemctl enable depmod.service # 立即测试执行一次 systemctl start depmod.service # 查看运行状态 systemctl status depmod.service
返回列表