linux添加开机启动项的方法

概览:

修改/etc/rc.local

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
guzal@GuzalAida:~/workspace$ cat /etc/rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

/opt/GuzalAida/bin/displayinfo4lcd
exit 0

像这样/opt/GuzalAida/bin/displayinfo4lcd,在最后的exit 0,前添加需要自启的完整程序名。

------ 文章已经结束,谢谢你的阅读 ------
------ article has ended,thank you for reading ------
Thanks support Me

---------------- The End ----------------