- 查看開機啓動項
systemctl list-unit-files #查看所有開機啓動項的狀態
systemctl list-unit-files|grep ‘服務名成’ #查看指定服務是否已設置開機啓動
systemctl list-unit-files|grep enable #查看所有已設置開機啓動的服務
- 設置開機自啓動
systemctl enable ‘服務名稱’ #將制定服務設置爲開機啓動
例如:
systemctl enable nginx #將nginx設置爲開啓自啓動
systemctl enable supervisord #將supervisor設置爲開啓自啓動