![systemd에서 서비스를 비활성화하는 방법은 무엇입니까?](https://linux55.com/image/77166/systemd%EC%97%90%EC%84%9C%20%EC%84%9C%EB%B9%84%EC%8A%A4%EB%A5%BC%20%EB%B9%84%ED%99%9C%EC%84%B1%ED%99%94%ED%95%98%EB%8A%94%20%EB%B0%A9%EB%B2%95%EC%9D%80%20%EB%AC%B4%EC%97%87%EC%9E%85%EB%8B%88%EA%B9%8C%3F.png)
명령어가 뭔지는 알겠 sytemctl disable NAME
는데, 매개변수에 관해 궁금한 점이 있습니다 NAME
.
예를 들어 bluetooth
Fedora 21의 service[1]입니다. 매개변수에는 or 또는 을 NAME
입력해야 합니까 ?bluetooth
bluetooth.service
bluetooth.target
예를 들어 블루투스를 사용하고 있지만 질문은 일반적인 것입니다(예: 서비스에 연결된 장치(예: 소켓, 대상, 서비스)가 많은 경우).
[1] Bluetooth 서비스를 검색했을 때 "bluetooth" grep 문자열과 일치하는 몇 가지 항목을 찾았습니다.
$ systemctl list-unit-files|grep -i bluetooth
bluetooth.service enabled
bluetooth.target static
답변1
서비스는 접미사가 붙은 단위 파일에 정의됩니다 .service
.
서비스를 비활성화하기 위해 특별히 사용되는 경우 systemctl
단위 파일의 전체 이름(예 bluetooth.service
: )을 지정해야 합니다. 접미사가 생략된 경우 가정 .service
합니다 .service
. 예를 들어 다음 두 명령은 동일합니다.
명시적인 접미사 포함 .service
:
$ systemctl disable bluetooth.service
암시적 접미사를 사용하세요 .service
.
$ systemctl disable bluetooth
파일 정보 bluetooth.target
: SysV Init Runlevels의 개념이 다음으로 대체되었습니다.표적존재하다 systemd
. 당신은 참조해야남자 systemd.target더 많은 정보를 알고 싶습니다.