리눅스 / 로그아웃 명령어, 재부팅 명령어, 종료 명령어

로그아웃 명령어

# logout
# exit

재부팅 명령어

즉시 재부팅

# reboot
# shutdown -r now
# init 6

일정 시간 또는 일정 시간 후 재부팅

  • 10분 후 재부팅
# shutdown -r 10
  • 12시에 재부팅
# shutdown -r 12:00
  • 취소
# shutdown -c

종료 명령어

즉시 종료

# poweroff
# shutdown -h now
# shutdown -P now
# halt -p
# init 0

일정 시간 또는 일정 시간 후에 종료

  • 10분 후에 종료
# shutdown -P 10
  • 13시에 종료
# shutdown -P 13:00
  • 취소
# shutdown -c

기타

  • 10분 후에 종료할 거라는 메시지를 사용자에게 보내지만, 종료하지는 않음.
# shutdown -k 10
같은 카테고리의 다른 글
Ubuntu Server / 22.04 / 네트워크 세팅에 이더넷(Wired) 보이지 않을 때 해결 방법

Ubuntu Server / 22.04 / 네트워크 세팅에 이더넷(Wired) 보이지 않을 때 해결 방법

우분투 설정의 네트워크에 Wired가 보이지 않는다. 그것이 보여야 GUI로 IP 설정이 가능한데 말이다. 이를 보이게 하는 방법이 여러 가지가 있는 거 같은데, 내가 성공한 방법은... /etc/netplan/00-installer-config.yaml의 내용은 다음처럼 생겼을 것이다. # This is the network config written by 'subiquity' network: ethernets: eth0: dhcp4: true ...

Ubuntu 22.04 Server / root 계정으로 로그인하는 방법, root 계정으로 ssh 접속하는 방법

Ubuntu는 설치할 때 일반 사용자 계정만 만듭니다. 관리자 권한이 필요할 때는 sudo를 이용하죠. 그런데 공부를 위해 혼자만 사용하거나, 여러 가지 이유로 보안에 문제가 없는 경우 root 계정으로 로그인해서 작업하는 게 편합니다. root 계정으로 로그인 하는 방법 일반 사용자 계정으로 로그인합니다. 다음과 같이 명령하여 root 계정의 비밀번호를 만들면 root 계정으로 로그인할 수 있습니다. # sudo ...

리눅스 / 그룹 / 그룹 조회, 그룹 추가, 그룹 삭제, 그룹 수정

그룹 조회 그룹 목록은 /et/group 파일에 있습니다. cat 명령어로 전체를 조회하거나... cat /etc/group tail 명령어로 마지막 부분을 조회할 수 있습니다. # tail -n 5 /etc/group avahi:x:70: slocate:x:21: rngd:x:974: tcpdump:x:72: vboxsf:x:973: X:Y:Z 형식으로 나오는데, X는 그룹 이름, Y는 그룹 비밀번호, Z는 그룹 ID입니다. 그룹 추가 groupadd 명령으로 그룹을 추가합니다. # groupadd group-1 # tail -n 5 /etc/group slocate:x:21: rngd:x:974: tcpdump:x:72: vboxsf:x:973: group-1:x:1000: 그룹 삭제 groupdel 명령으로 그룹을 삭제합니다. # ...

CentOS 7 / mod_security 설치하는 방법

CentOS 7 / mod_security 설치하는 방법

mod_security는 아파치 웹서버에 사용할 수 있는 방화벽 모듈입니다. ModSecurity is an open source, cross-platform web application firewall (WAF) module. Known as the "Swiss Army Knife" of WAFs, it enables web application defenders to gain visibility into HTTP(S) traffic and provides a power rules language and API to implement advanced protections. 설치 yum install ...

Ubuntu 20.04 Server / hostname 확인하는 방법, 변경하는 방법

Ubuntu 20.04 Server / hostname 확인하는 방법, 변경하는 방법

hostname 확인하는 방법 방법 1 - 명령어로 확인하기 다음과 같이 명령하면 hostname을 출력한다. hostname 방법 2 - 설정 파일 열어서 확인하기 /etc/hostname 파일에 hostname이 있다. cat /etc/hostname hostname 변경하는 방법 방법 1 - 명령어로 변경하기 다음과 같이 명령하면 hostname이 abc로 바뀐다. hostnamectl set-hostname abc 방법 2 - 설정 파일 열어서 변경하기 텍스트 에디터로 /etc/hostname 파일을 열어서 내용을 abc로 바꾸면 hostname이 abc로 바뀐다. 재부팅 재부팅을 하면 변경사항이 ...

CentOS 7 / Let’s Encrypt에서 무료 SSL 인증서 발급 받는 방법

CentOS 7 / Let’s Encrypt에서 무료 SSL 인증서 발급 받는 방법

CentOS 7에서 Let’s Encrypt 인증서를 발급 받는 방법을 요약합니다. 환경 CentOS 7 Apache Web Server 설치 저장소 추가 yum install epel-release 설치 yum install python-certbot-apache 인증서 발급 abc.com 인증서 발급 certbot --apache -d abc.com abc.com과 www.abc.com 인증서 동시 발급 certbot --apache -d abc.com -d www.abc.com 인증서 갱신 certbot renew Let’s Encrypt 인증서는 90마다 갱신해야 합니다.

리눅스 / 명령어 / which, whereis, locate / 명령어 위치 찾기

명령어의 위치를 찾을 때 사용할 수 있는 명령어에는 which, whereis, locate가 있다. 명령어의 위치만 찾을 때는 which를 사용하고, 관련된 파일들의 위치까지 찾을 때는 whereis나 locate를 사용한다. which 명령어로 find 명령어를 찾는다. # which find /usr/bin/find whereis 명령어로 find 명령어를 찾는다. # whereis find find: /usr/bin/find /usr/share/man/man1/find.1.gz locate 명령어로 find 명령어를 찾는다. # locate find /usr/bin/find /usr/bin/find2perl /usr/bin/findmnt /usr/bin/nl-link-ifindex2name /usr/bin/nl-link-name2ifindex /usr/bin/oldfind /usr/lib64/python2.7/modulefinder.py /usr/lib64/python2.7/modulefinder.pyc /usr/lib64/python2.7/modulefinder.pyo /usr/sbin/btrfs-find-root /usr/sbin/findfs /usr/share/bash-completion/completions/findmnt /usr/share/doc/findutils-4.5.11 /usr/share/doc/findutils-4.5.11/AUTHORS /usr/share/doc/findutils-4.5.11/COPYING /usr/share/doc/findutils-4.5.11/ChangeLog /usr/share/doc/findutils-4.5.11/NEWS /usr/share/doc/findutils-4.5.11/README /usr/share/doc/findutils-4.5.11/THANKS /usr/share/doc/findutils-4.5.11/TODO /usr/share/doc/wpa_supplicant-2.6/examples/p2p/p2p_find.py /usr/share/doc/wpa_supplicant-2.6/examples/p2p/p2p_stop_find.py /usr/share/info/find-maint.info.gz /usr/share/info/find.info.gz /usr/share/locale/be/LC_MESSAGES/findutils.mo /usr/share/locale/bg/LC_MESSAGES/findutils.mo /usr/share/locale/ca/LC_MESSAGES/findutils.mo /usr/share/locale/cs/LC_MESSAGES/findutils.mo /usr/share/locale/da/LC_MESSAGES/findutils.mo /usr/share/locale/de/LC_MESSAGES/findutils.mo /usr/share/locale/el/LC_MESSAGES/findutils.mo /usr/share/locale/eo/LC_MESSAGES/findutils.mo /usr/share/locale/es/LC_MESSAGES/findutils.mo /usr/share/locale/et/LC_MESSAGES/findutils.mo /usr/share/locale/fi/LC_MESSAGES/findutils.mo /usr/share/locale/fr/LC_MESSAGES/findutils.mo /usr/share/locale/ga/LC_MESSAGES/findutils.mo /usr/share/locale/gl/LC_MESSAGES/findutils.mo /usr/share/locale/hr/LC_MESSAGES/findutils.mo /usr/share/locale/hu/LC_MESSAGES/findutils.mo /usr/share/locale/id/LC_MESSAGES/findutils.mo /usr/share/locale/it/LC_MESSAGES/findutils.mo /usr/share/locale/ja/LC_MESSAGES/findutils.mo /usr/share/locale/ko/LC_MESSAGES/findutils.mo /usr/share/locale/lg/LC_MESSAGES/findutils.mo /usr/share/locale/lt/LC_MESSAGES/findutils.mo /usr/share/locale/ms/LC_MESSAGES/findutils.mo /usr/share/locale/nl/LC_MESSAGES/findutils.mo /usr/share/locale/pl/LC_MESSAGES/findutils.mo /usr/share/locale/pt/LC_MESSAGES/findutils.mo /usr/share/locale/pt_BR/LC_MESSAGES/findutils.mo /usr/share/locale/ro/LC_MESSAGES/findutils.mo /usr/share/locale/ru/LC_MESSAGES/findutils.mo /usr/share/locale/rw/LC_MESSAGES/findutils.mo /usr/share/locale/sk/LC_MESSAGES/findutils.mo /usr/share/locale/sl/LC_MESSAGES/findutils.mo /usr/share/locale/sr/LC_MESSAGES/findutils.mo /usr/share/locale/sv/LC_MESSAGES/findutils.mo /usr/share/locale/tr/LC_MESSAGES/findutils.mo /usr/share/locale/uk/LC_MESSAGES/findutils.mo /usr/share/locale/vi/LC_MESSAGES/findutils.mo /usr/share/locale/zh_CN/LC_MESSAGES/findutils.mo /usr/share/locale/zh_TW/LC_MESSAGES/findutils.mo /usr/share/man/man1/find.1.gz /usr/share/man/man1/find2perl.1.gz /usr/share/man/man1/oldfind.1.gz /usr/share/man/man8/btrfs-find-root.8.gz /usr/share/man/man8/findfs.8.gz /usr/share/man/man8/findmnt.8.gz locate 명령어는 -n 옵션으로 출력 ...

Ubuntu 20.24 Server / Apache, PHP, MariaDB 설치하는 방법

Ubuntu 20.24 Server / Apache, PHP, MariaDB 설치하는 방법

Ubuntu Server에 웹서버 Apache, 웹프로그래밍 언어 PHP, 데이터베이스 MariaDB를 설치하는 방법입니다. 웹서버 운영을 위한 최소한의 설치로, 실제로 서비스할 때는 더 많은 패키지가 필요할 수 있습니다. 설치 Apache, PHP, MariaDB를 설치합니다. php-mysql은 PHP와 MariaDB 연동을 위한 패키지입니다. # apt install apache2 mariadb-server php php-mysql MariaDB 설정 다음과 같이 명령하여 몇 가지 설정을 합니다. # mysql_secure_installation MariaDB의 root 계정 ...

Rocky Linux 9 / Apache / Virtulahost 만드는 방법

Rocky Linux 9 / Apache / Virtulahost 만드는 방법

하나의 서버에서 여러 사이트를 운영할 수 있다. Rocky Linux 9에서 Apache 웹서버로 구현하는 방법을 정리한다. Selinux가 활성화되어 있으면 작동하지 않고, 별도의 설정이 필요하다. 여기서는 Selinux를 끄고 진행한다. 목표 하나의 서버에서 두 개의 사이트를 운영한다. http://aaa.manualfactory.net로 접속하면 Welcome to AAA!, http://bbb.manualfactory.net으로 접속하면 Welcome to BBB!를 출력한다. DNS 설정 aaa.manualfactory.net. bbb.manualfactory.net 모두 같은 IP로 가도록 설정한다. 폴더와 파일 생성 /home/aaa ...

Ubuntu 18.04 Server / Nginx, PHP, MariaDB 설치하고 설정하기

Ubuntu 18.04 Server / Nginx, PHP, MariaDB 설치하고 설정하기

Nginx 설치 Nginx를 설치합니다. # apt install nginx 만약 방화벽을 사용하고 있다면 포트를 열어줍니다. # ufw allow 'Nginx Full' 서버 주소로 접속했을 때 다음과 같이 나오면 제대로 된 것입니다. 시작, 정지 등 Nginx를 시작합니다. # systemctl start nginx Nginx를 멈춥니다. # systemctl stop nginx Nginx를 재시작합니다. # systemctl restart nginx Nginx를 다시 로드합니다. # systemctl reload nginx Nginx를 설치하면 부팅 시 자동으로 시작하게 설정됩니다. 만약 자동 ...