查看所有服务的开机启动项
systemctl list-unit-files
查看具体开机启动项
systemctl list-unit-files | grep 程序名字
例如firewalld防火墙服务
systemctl list-unit-files | grep firewalld.service
显示未开机启动
查看设置为开机启动的开机启动项
systemctl list-unit-files | grep enable
设置开机启动项
以firewalld防火墙为例
sudo systemctl enable firewalld.service
设置成功
移除开机启动
sudo systemctl disable firewalld.servic
移除成功