Ubuntu Server admin

우분투 서버 대기모드/절전모드 확인

현재 상태 확인 명령어

1
systemctl status sleep.target suspend.target hibernate.target hybrid-sleep.target

결과 출력

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
root@super:~# systemctl status sleep.target suspend.target hibernate.target hybrid-sleep.target
● sleep.target - Sleep
     Loaded: loaded (/lib/systemd/system/sleep.target; static; vendor preset: e>
     Active: inactive (dead)
       Docs: man:systemd.special(7)

● suspend.target - Suspend
     Loaded: loaded (/lib/systemd/system/suspend.target; static; vendor preset:>
     Active: inactive (dead)
       Docs: man:systemd.special(7)

● hibernate.target - Hibernate
     Loaded: loaded (/lib/systemd/system/hibernate.target; static; vendor prese>
     Active: inactive (dead)
       Docs: man:systemd.special(7)

● hybrid-sleep.target - Hybrid Suspend+Hibernate
     Loaded: loaded (/lib/systemd/system/hybrid-sleep.target; static; vendor pr>
     Active: inactive (dead)
       Docs: man:systemd.special(7)

우분투 서버 대기모드/절전모드 비활성화

대기모드/절전모드 비활성화 명령어

1
systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target

결과 출력

1
2
3
4
5
root@super:~# systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
Created symlink /etc/systemd/system/sleep.target → /dev/null.
Created symlink /etc/systemd/system/suspend.target → /dev/null.
Created symlink /etc/systemd/system/hibernate.target → /dev/null.
Created symlink /etc/systemd/system/hybrid-sleep.target → /dev/null.

대기모드/절전모드 비활성화한 현재 상태 출력

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
root@super:~# systemctl status sleep.target suspend.target hibernate.target hybrid-sleep.target
● sleep.target
     Loaded: masked (Reason: Unit sleep.target is masked.)
     Active: inactive (dead)

● suspend.target
     Loaded: masked (Reason: Unit suspend.target is masked.)
     Active: inactive (dead)

● hibernate.target
     Loaded: masked (Reason: Unit hibernate.target is masked.)
     Active: inactive (dead)

● hybrid-sleep.target
     Loaded: masked (Reason: Unit hybrid-sleep.target is masked.)
     Active: inactive (dead)

우분투 서버 대기모드/절전모드 활성화

대기모드/절전모드 활성화 명령어

1
systemctl unmask sleep.target suspend.target hibernate.target hybrid-sleep.target

변경 후 리부팅!!

1
sudo shutdown -r
0%