systemctl 명령어

✒️ 2025-05-22 14:16 내용 수정


서비스 관리

명령어 설명
systemctl start|stop|restart 서비스이름 서비스 시작|종료|재시작 설정
systemctl enable/disable 서비스이름 재부팅 시 서비스 설정
systemctl status 서비스이름 서비스 상태 확인
명령어 설명
systemctl start|stop|restart telnet.socket telnet 사용 설정
systemctl enable/disable telnet.socket 재부팅 시 telnet 서비스 설정
systemctl status telnet.socket telnet 서비스 상태 확인
명령어 설명
systemctl start|stop|restart sshd sshd (데몬) 사용 지정
`systemctl enable/disable sshd 재부팅 시 sshd 서비스 설정
systemctl status sshd sshd 서비스 상태 확인
명령어 설명
systemctl start|stop xinetd xinted (슈퍼데몬) 서비스 시작/중지
systemctl enable xinetd 재부팅 시 xinted (슈퍼데몬) 서비스 옵션
systemctl status xinetd xinted (슈퍼데몬) 서비스 상태 확인

방화벽 관리

OS 명령어 설명
CentOS, Rocky systemctl start|stop|restart firewalld 서비스 시작|종료|재시작 설정
systemctl enable/disable firewalld 재부팅 시 서비스 설정
systemctl status firewalld 서비스 상태 확인
gedit /etc/sysconfig/selinux SELINUX 옵션을 disable로 변경, 재부팅 필수
우분투 ufw disabled 우분투 방화벽 해제 옵션 설정
systemctl stop|start ufw 서비스 중지|시작
ststemctl disable|enable ufw 재부팅시 서비스 사용 설정
systemctl status ufw 현재 서비스 상태 확인

기타

명령어 옵션 설명
hostnamectl set-hostname 이름 호스트 이름 변경