$
학습 Linux 안내서
ko
XP:0
퀘스트 91Boot-Architect
+220 XP

Enabling Services at Boot (systemctl enable & disable)

이 퀘스트를 위한 인터랙티브 터미널 시작→설치 불필요 • 브라우저에서 바로 실행

개념 및 개요

Starting a service with systemctl start only launches it for the current session. If the server reboots, the service will stay offline unless you configure it to start automatically on system initialization.

- To start a service at boot, run sudo systemctl enable .
- To verify whether a service is scheduled to launch at boot, run systemctl is-enabled .
- When creating or editing systemd unit files, always notify systemd to reload its configuration cache with sudo systemctl daemon-reload.
- To disable a service from starting at boot, run sudo systemctl disable .

Configure the nginx web service to launch at boot. Run sudo systemctl enable nginx. Next, verify that it is configured correctly with systemctl is-enabled nginx. Finally, refresh systemd's unit configurations by executing sudo systemctl daemon-reload.

명령어 구문 참조

Command / SyntaxDescription
sudo systemctl enable nginxEnable nginx to start at system boot
systemctl is-enabled nginxCheck if nginx is enabled at boot
sudo systemctl daemon-reloadReload systemd manager configuration

검증 목표

  • ○
    Enable nginx service at boot with "sudo systemctl enable nginx"
  • ○
    Verify enabled status with "systemctl is-enabled nginx"
  • ○
    Reload systemd daemon configuration with "sudo systemctl daemon-reload"

퀘스트를 완료할 준비가 되셨나요? 91?