Linux

[superuser] 시스템을 종료합니다. (halt, poweroff)

aucd29 2013. 9. 26. 20:49
시스템을 종료합니다. (halt, poweroff) 조회수:1025


halt, poweroff

이 명령어는 서버를 종료하는 명령어입니다.
이 명령어가 실행이 되면 먼저 /var/log/wtmp에 정보를 기록합니다. 

사용형식

       /sbin/halt [-n] [-w] [-d] [-f] [-i] [-p] [-h]
       /sbin/reboot [-n] [-w] [-d] [-f] [-i]
       /sbin/poweroff [-n] [-w] [-d] [-f] [-i] [-h]


사용예 #1

간단히 halt라고하면 시스템을 종료합니다.

[root@host3 root]# halt 

Broadcast message from root (pts/0) (Sat Oct  4 14:12:03 2003):

The system is going down for system halt NOW!
[root@host3 root]#


사용예 #2

-n옵션을 사용하면 sync작업을 하지않은채로 시스템을 종료합니다.

[root@host3 root]# reboot -n

Broadcast message from root (pts/0) (Sat Oct  4 14:15:17 2003):

The system is going down for reboot NOW!
[root@host3 root]#


사용예 #3

-w옵션을 사용하면 wtmp에 기록만을 남기며 시스템은 종료하지 않습니다.

[root@host3 root]# halt -w
[root@host3 root]#


사용예 #4

만약 다음과같이 -d옵션을 사용하시면 /var/log/wtmp에 기록을 남기지 않은채로 시스템을 종료합니다.

[root@host3 root]# halt -d

Broadcast message from root (pts/0) (Sat Oct  4 14:20:08 2003):

The system is going down for system halt NOW!
[root@host3 root]#