런레벨

신명철·2022년 2월 18일
0

기본 명령어

종료 명령어

poweroff, shutdown -p now, halt -p, init 0

  • shutdown -h +5 : 5분 후에 꺼짐
  • shutdown -k +5 : 5분 후에 꺼지니까 나가라 (진짜 꺼지는거 아님, root 가 자원이 필요할 때 사용)
  • shutdown -c : shudown 취소

시스템 재부팅

shutdown -r now, reboot, init6

로그아웃

logout, exit


런 레벨(Runlevel)

init 명령어 뒤에 붙는 숫자를 런레벨(Runlevel)이라고 한다.

  • 런레벨 모드는 /lib/systemd/system 디렉터리의 runlevel?.target 파일을 확인하면 알 수 있음

런 레벨 변경하기

  • default.target -> graphical.target : runlevel의 기본값이 graphical 모드로 되어 있음

  • defualt.targetmulti-user.target 으로 바꾸기 위해서는 ln -sf /lib/systemd/system/multi-user.tager /lib/systemd/system/default.target 을 써주면 아래와 같이 바뀐 걸 확인할 수 있음

  • reboot 시 아래와 같이 변경됐음

  • 다시 graphical 모드로 부팅하고 싶다면 starx 입력

profile
내 머릿속 지우개

0개의 댓글