arm linux rc.local systemd设置开机启动
发布日期:2021-07-01 01:01:29 浏览次数:2 分类:技术文章

本文共 802 字,大约阅读时间需要 2 分钟。

ubuntu18.04不再使用initd管理系统,改用systemd。

然而systemd很难用,改变太大,跟之前的完全不同。

使用systemd设置开机启动

为了像以前一样,在/etc/rc.local中设置开机启动程序,需要以下几步:
1、systemd默认读取/etc/systemd/system下的配置文件,该目录下的文件会链接/lib/systemd/system/下的文件。一般系统安装完/lib/systemd/system/下会有rc-local.service文件,即我们需要的配置文件。
链接过来:

ln -fs /lib/systemd/system/rc-local.service /etc/systemd/system/rc-local.service

cd /etc/systemd/system/
cat rc-local.service
rc-local.service内容

#  SPDX-License-Identifier: LGPL-2.1+

#
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.

# This unit gets pulled automatically into multi-user.target by

# syste

转载地址:https://mao0514.blog.csdn.net/article/details/115581370 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:对AM572x进行引脚复用使能UART1
下一篇:Linux开机启动管理---systemd使用

发表评论

最新留言

初次前来,多多关照!
[***.217.46.12]2024年04月07日 21时06分16秒