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

로그아웃 명령어

# 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 20.04 Server / Samba / 설치하고 공유 폴더 만드는 방법

Ubuntu 20.04 Server / Samba / 설치하고 공유 폴더 만드는 방법

Samba를 이용하여 Ubuntu Server에 공유 폴더를 만들고, Windows 클라이언트에서 접속하는 방법을 알아본다. Samba 설치 Samba를 설치한다. 설치하면 바로 시작하고, 재부팅을 해도 자동으로 시작한다. apt install samba 공유할 폴더를 만들고 권한을 777로 설정한다. mkdir /sharedfolder chmod 777 /sharedfolder 설정 파일은 /etc/samba/smb.conf이다. 텍스트 에디터로 열고 제일 밑에 다음 코드를 추가한다. 폴더 이름은 sharedfolder이지만, 네트워크에서는 Shared Folder로 보인다. comment = ...

CentOS 7 / ntsysv로 부팅할 때 서비스 자동으로 시작하게 하기

CentOS 7 / ntsysv로 부팅할 때 서비스 자동으로 시작하게 하기

서비스 관리는 보통 systemctl 명령어로 합니다. systemctl 명령어의 enable을 이용하면 시스템이 부팅할 때 서비스가 자동으로 시작하게 할 수 있습니다. 예를 들어 systemctl enable httpd.service 는 서버가 부팅할 때 httpd 서비스를 자동으로 시작합니다. 만약 이러한 서비스 관리를 명령어로 하는 불편하다면 ntsysv를 사용해보세요. TUI로 자동으로 시작하는 서비스를 관리할 수 있습니다. 다음과 같이 명령하여 ntsysv 패키지를 설치합니다. yum install ntsysv 다음과 같이 ...

리눅스 / CPU 이름, 코어 수, 스레드 수 확인하는 방법

리눅스에서 lscpu 명령으로 CPU의 정보를 확인할 수 있습니다. 출력하는 내용 중에 CPU 이름, 코어 수, 스레드 수가 있습니다. 아래는 lscpu 명령을 내린 결과 예시입니다. # lscpu Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: ...

리눅스 / 캐시 메모리 삭제하는 방법

free 명령어로 메모리 사용 현황을 볼 수 있다. 아래의 경우 free에 여유가 있는데, 만약 buff/cache 사용량이 많아 free에 공간이 없다면 시스템이 느려진다. 그런 경우 메모리 캐시를 삭제하여 속도를 향상 시킬 수 있다. # free total ...

리눅스 / 명령어 / 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 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 인증서 ...

리눅스 / 배포판 / 우분투(Ubuntu) - 역사, 특징, 장점

우분투의 역사 우분투(Ubuntu)는 2004년 10월 20일에 첫 번째 버전이 출시된 이후로 리눅스 배포판 중에서 가장 인기 있는 배포판 중 하나로 자리매김했습니다. 우분투는 데비안(Debian) 리눅스를 기반으로 하며, 캐노니컬(Canonical Ltd.)의 설립자인 마크 셔틀워스(Mark Shuttleworth)가 주도하여 시작되었습니다. 셔틀워스는 우분투를 통해 누구나 쉽게 접근할 수 있는 무료 운영체제를 제공하고자 했습니다. 데비안 기반 우분투는 데비안의 강력한 패키지 관리 ...

리눅스 / 명령어 / touch / 빈 파일 만들기, 최종 수정 시간 변경하기

touch는 빈 파일 만들거나 파일의 최종 수정 시간을 현재 시간으로 바꾸는 명령어이다. abc.txt 파일이 없다면, 내용이 없는 abc.txt 파일을 만듭니다. abc.txt 파일이 있다면, 파일의 최종 수정 시간을 현재로 변경합니다. # touch abc.txt

CentOS 7 / 설치하기

CentOS 7 / 설치하기

CentOS ISO 다운로드 CentOS ISO 파일은 DVD ISO, Everything ISO, Minimal ISO, NetInstall ISO 등 여러 가지가 있습니다. 이 중에서 가장 파일 크기가 작은 NetInstall ISO 파일로 설치하겠습니다. NetInstall ISO는 설치에 필요한 최소한의 파일만 포함하고 있고, 추가 소프트웨어는 다운로드 받아 설치합니다. CentOS 7의 NetInstall ISO 파일은 다음 링크에서 다운로드를 받을 수 있습니다. http://mirror.navercorp.com/centos/7/isos/x86_64/ 파일 이름은 CentOS-7-x86_64-NetInstall-xxxx.iso입니다. CD로 부팅 ISO 파일을 CD에 ...

Ubuntu 24.04 / 언어 변경하는 방법

현재 언어 확인하기 locale 명령어로 현재 언어를 확인할 수 있다. # locale LANG=en_US.UTF-8 LANGUAGE= LC_CTYPE="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_PAPER="en_US.UTF-8" LC_NAME="en_US.UTF-8" LC_ADDRESS="en_US.UTF-8" LC_TELEPHONE="en_US.UTF-8" LC_MEASUREMENT="en_US.UTF-8" LC_IDENTIFICATION="en_US.UTF-8" LC_ALL= 언어 추가하기 사용 가능한 언어는 locale -a로 확인할 수 있다. # locale -a C C.utf8 en_US.utf8 POSIX 예를 들어 한국어를 추가하고 싶다면 아래와 같이 명령한다. # apt install language-pack-ko locale -a로 설치 확인을 한다. # locale -a C C.utf8 en_US.utf8 ko_KR.utf8 POSIX 언어 변경하기 다음과 같이 명령하면 사용하는 언어가 한국어로 바뀐다. update-locale LANG=ko_KR.utf8 로그아웃 후 다시 로그인하거나, 컴퓨터를 다시 시작하면 ...