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

로그아웃 명령어

# 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
같은 카테고리의 다른 글
CentOS / 버전 확인하는 방법

CentOS / 버전 확인하는 방법

cat /etc/redhat-release # cat /etc/redhat-release CentOS Linux release 7.4.1708 (Core) cat /etc/*release* # cat /etc/*release* CentOS Linux release 7.4.1708 (Core) Derived from Red Hat Enterprise Linux 7.4 (Source) NAME="CentOS Linux" VERSION="7 (Core)" ID="centos" ID_LIKE="rhel fedora" VERSION_ID="7" PRETTY_NAME="CentOS Linux 7 (Core)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:centos:centos:7" HOME_URL="https://www.centos.org/" BUG_REPORT_URL="https://bugs.centos.org/" CENTOS_MANTISBT_PROJECT="CentOS-7" CENTOS_MANTISBT_PROJECT_VERSION="7" REDHAT_SUPPORT_PRODUCT="centos" REDHAT_SUPPORT_PRODUCT_VERSION="7" CentOS Linux release 7.4.1708 (Core) CentOS Linux release 7.4.1708 (Core) cpe:/o:centos:centos:7

Ubuntu 22.04 Server / ZIP 압축 파일 푸는 방법

ZIP 파일을 압축 해제하기 위해서는 unzip 패키지가 필요하다. # apt install unzip xxx.zip 파일을 압축 해제하려면 다음과 같이 명령한다. # unzip xxx.zip 다음과 같이 명령하여 도움말을 볼 수 있다. # unzip -h 결과는 다음과 같다. UnZip 6.00 of 20 April 2009, by Debian. Original by Info-ZIP. Usage: unzip Default ...

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

Ubuntu 22.04 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 계정 ...

Ubuntu Server / Let’s Encrypt 무료 SSL 인증서 발급 받기

Ubuntu Server에서 Apache Web Server를 사용하는 경우 Let’s Encrypt 인증서 발급 받는 방법이다. Apache용 Certbot 설치 Ubuntu Server 20.04, Ubuntu Server 22.04 snap install core snap refresh core snap install --classic certbot ln -s /snap/bin/certbot /usr/bin/certbot Ubuntu Server 18.04 apt install software-properties-common add-apt-repository universe add-apt-repository ppa:certbot/certbot apt update apt upgrade apt install certbot python3-certbot-apache Ubuntu Server 16.04 add-apt-repository ppa:certbot/certbot apt update apt upgrade apt install python-certbot-apache 인증서 발급 abc.com 인증서 ...

CentOS 8 / 언어 변경하는 방법

CentOS 8 / 언어 변경하는 방법

현재 언어 확인하기 # localectl System Locale: LANG=en_US.UTF-8 VC Keymap: us X11 Layout: us 사용 가능한 언어 확인하기 # localectl list-locales C.utf8 en_AG en_AU en_AU.utf8 en_BW en_BW.utf8 en_CA en_CA.utf8 en_DK en_DK.utf8 en_GB en_GB.iso885915 en_GB.utf8 en_HK en_HK.utf8 en_IE en_IE.utf8 en_IE@euro en_IL en_IN en_NG en_NZ en_NZ.utf8 en_PH en_PH.utf8 en_SC.utf8 en_SG en_SG.utf8 en_US en_US.iso885915 en_US.utf8 en_ZA en_ZA.utf8 en_ZM en_ZW en_ZW.utf8 ko_KR.euckr ko_KR.utf8 언어를 한글로 변경하기 # localectl set-locale LANG=ko_KR.utf8 # localectl System Locale: LANG=ko_KR.utf8 ...

Ubuntu 22.04 Server / NGINX / 설치와 설정

Ubuntu 22.04 Server / NGINX / 설치와 설정

Nginx는 높은 성능과 안정성을 제공하는 웹 서버 소프트웨어로, 웹 서버 외에도 리버스 프록시, 로드 밸런서, 메일 프록시 등의 기능을 수행할 수 있다. Igor Sysoev가 2004년에 처음 개발했으며, 현재는 오픈 소스 소프트웨어로 널리 사용되고 있다. 가정 Ubuntu 22.04 Server의 IP는 192.168.3.242이고, 내 컴퓨터에서 IP로 접근 가능하다. 내 컴퓨터의 OS는 Windows이다. 설치 nginx 패키지 설치 다음과 같이 명령하여 ...

CentOS 7 / SELinux 끄는 방법

CentOS 7 / SELinux 끄는 방법

방법 1 다음과 같이 명령하면 SELinux가 꺼진다. 재부팅하면 다시 SELinux가 켜진다. setenforce 0 만약 다시 SELinux를 사용하고 싶다면 다음과 같이 명령한다. setenforce 1 방법 2 /etc/selinux/config에 다음과 같은 코드가 있다. SELINUX=enforcing 다음과 같이 바꾼다. SELINUX=disabled 시스템을 재부팅하면 적용된다. 방법 1과는 달리 재부팅해도 설정이 유지된다.

리눅스 / CD, ISO 마운트하는 방법

CD 마운트 마운트할 디렉토리 생셩 mkdir /aaa 마운트 # mount /dev/cdrom /aaa mount: /aaa: WARNING: source write-protected, mounted read-only. 마운트 해제 umount /aaa ISO 마운트 마운트할 디렉토리 생셩 mkdir /aaa 마운트 mount /root/Disc.iso /aaa -o loop mount: /aaa: WARNING: source write-protected, mounted read-only. 마운트 해제 umount /aaa

Ubuntu 18.04 Server / 시간대(time zone) 설정하는 방법

Ubuntu 18.04 Server / 시간대(time zone) 설정하는 방법

현재 서버의 시간대 확인 현재 서버에 설정된 시간대는 date 명령어로 확인할 수 있다. # date 시간대 설정 방법 1 - dpkg-reconfigure tzdata 시간대를 설정하고 싶다면 다음과 같이 명령한다. # dpkg-reconfigure tzdata 한국이라면 Asia를 선택하고 Seoul을 선택합니다. 시간대 설정 방법 2 - tzselect tzselect 명령으로 설정할 수 있다. 번호를 입력하여 시간대를 정한다. # tzselect Please identify a location so that time ...

리눅스 / 명령어 / cp - 복사하는 명령어, mv - 이동하는 명령어

cp는 copy의 약자로 복사하는 명령어, mv는 move의 약자로 이동하는 명령어이다. 복사하기 abc.txt 파일을 def.txt로 이름을 바꾸어 복사한다. cp abc.txt def.txt xyz라는 디렉토리가 없다면 abc.txt 파일을 xyz 파일로 복사한다. xyz라는 디렉토리가 있다면 xyz 디렉토리 안에 abc.txt 파일을 복사한다. cp abc.txt xyz abc.txt 파일을 xyz 디렉토리 안에 def.txt라는 이름으로 복사한다. cp abc.txt xyz/def.txt abc가 디렉토리이고 xyz라는 디렉토리가 없다면, abc 디렉토리를 xyz로 ...