리눅스 / 명령어

명령어 개요
adduser 사용자 추가하는 명령어.
alias 명령어 별칭을 만든다.
cal calendar. 달력을 출력하는 명령어.
cat concatenate. 파일 내용 출력하는 명령어.
cd change directory. 다른 디렉토리로 이동하는 명령어.
chmod 파일 또는 디렉토리의 읽기, 쓰기, 실행 권한 설정하는 명령어
chown 파일 또는 디렉토리의 소유자(그룹) 설정하는 명령어
clear 터미널 화면의 내용을 다 지운다.
cp copy. 파일 또는 디렉토리 복사.
du disk usage. 디스크 사용량 출력.
file 파일의 종류를 출력하는 명령어
find 파일 또는 디렉토리를 검색하는 명령어
free 메모리 사용량 확인하는 명령어
grep 문자열이나 정규 표현식을 검색하고, 해당 줄 출력
history 이전에 실행한 명령어 목록 출력
locate 명령어 위치 찾기
ls list. 디렉토리와 파일 목록 출력
man manual. 설명서 출력. rm 명령어의 설명서를 보고 싶다면 man rm
mkdir make directory. 디렉토리를 만드는 명령어.
mv move. 파일 또는 디렉토리 이동.
passwd password. 사용자 비밀번호 생성 또는 변경.
poweroff 시스템 종료
pwd print working directory. 현재 작업 중인 디렉토리 출력.
rdate 타임서버의 시간과 동기화해주는 명령어
reboot 재부팅
rename 파일 이름 변경
rm remove. 파일 또는 디렉토리 삭제
rmdir remove directory. 빈 디렉토리를 삭제.
scp secure copy. ssh 프로토콜로 파일 복사
sftp SSH File Transfer Protocol
shutdown 종료 또는 재부팅
systemctl Control the systemd system and service manager.
touch 빈 파일 만들거나 파일 최종 수정 시간 변경.
useradd 사용자 추가하는 명령어.
userdel user delete. 사용자 삭제하는 명령어.
which 명령어 위치 찾기
whereis 명령어 위치 찾기
같은 카테고리의 다른 글

Ubuntu 24.04 Server / SSH / 포트 변경하는 방법

보안 등의 이유로 SSH 포트를 변경해야 한다면, 다음과 같이 한다. /etc/ssh/sshd_config에서 다음의 코드를... #Port 22 다음으로 변경한다. Port 1980 방화벽이 활성화되어 있다면 1980 포트를 열어준다. ufw allow 1980/tcp SSH 서비스를 다시 시작한다. systemctl restart ssh SSH 서비스를 다시 시작해도 적용되지 않으면, 컴퓨터를 다시 시작한다.

리눅스 / 명령어 / cat / 파일 내용 출력하는 명령어

리눅스의 cat(concatenate의 약자) 명령어는 파일의 내용을 화면에 출력하거나 파일을 결합하는 데 사용됩니다. cat 명령어는 주로 텍스트 파일을 다룰 때 유용하며, 여러 개의 파일을 한 번에 읽거나 결합할 수 있습니다. 다음과 같은 두 개의 파일이 있다고 할 때 file1 1-1 1-2 1-3 file2 2-1 2-2 2-3 cat filename cat 뒤에 파일 이름을 넣으면 파일 안의 내용을 보여줍니다. # cat file1 1-1 1-2 1-3 파일 이름을 연달아 넣으면 ...

리눅스 / 명령어 / 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 18.04 / 해상도 변경하는 방법

Ubuntu 18.04 / 해상도 변경하는 방법

Ubuntu 18.04 Desktop에서 해상도 변경하는 방법입니다. 바탕화면에서 마우스 우클릭을 합니다. 를 클릭합니다. 왼쪽 메뉴에서 를 클릭합니다. 왼쪽 메뉴에서 를 클릭하고, 오른쪽에서 해상도를 선택합니다. 오른쪽 위의 버튼을 클릭합니다. 를 클릭합니다.

Rocky Linux 8 / DNF 사용법

Rocky Linux 8 / DNF 사용법

dnf는 패키지를 관리하는 명령어이다. 도움말 도움말 보기 # dnf -h 목록 보기 패키지 목록 보기 # dnf list 그룹 목록 보기 # dnf grouplist 검색 zip을 키워드로 패키지 검색 # dnf search zip 정보 출력 zip 패키지 정보 출력 # dnf info zip Server with GUI 그룹 정보 출력 # dnf groupinfo 'Server with GUI' 설치 zip 패키지 설치 # dnf install zip httpd와 php 설치 # dnf install httpd php Server ...

Ubuntu 18.04 Server / 설치하기

Ubuntu 18.04 Server / 설치하기

다운로드 Ubuntu Server 다운로드 페이지는 다음과 같다. https://ubuntu.com/download/server 최신 버전에 대한 안내가 주로 있으므로, 구버전을 다운로드하고 싶다면 아래 링크가 편하다. https://mirror.kakao.com/ubuntu-releases/ 가상 머신에 설치한다면 다운로드한 ISO 파일을 그대로 사용하면 되고, 물리 서버에 설치한다면 Rufus 같은 툴을 이용하여 부팅 USB를 만든다. 설치 설치 미디어로 부탕하고 잠시 기다리면 언어를 선택하는 화면이 나온다. 원하는 언어를 선택하고 엔터키를 누른다. 키보드 레이아웃을 정하고 ...

리눅스 / 배포판 / 록키 리눅스(Rocky Linux) - 역사, 특징, 장점

록키 리눅스의 역사 록키 리눅스(Rocky Linux)는 2020년 12월에 발표된 오픈 소스 리눅스 배포판으로, CentOS 프로젝트의 공동 창립자인 그레고리 커츠너(Gregory Kurtzer)가 주도하여 개발되었습니다. 록키 리눅스는 CentOS 8의 종료 발표 이후, 기존의 CentOS 사용자들에게 안정적인 대안을 제공하기 위해 만들어졌습니다. 록키 리눅스는 레드햇 엔터프라이즈 리눅스(RHEL)와의 완전한 호환성을 목표로 하며, 커뮤니티 주도 프로젝트로 운영됩니다. CentOS와의 관계 CentOS는 ...

리눅스 / 명령어 / systemctl

systemctl은 서비스를 관리하는 명령어이다. 서비스 상태 확인 systemctl status service_name.service 서비스 시작 systemctl start service_name.service 서비스 재시작 systemctl restart service_name.service 서비스 중지 systemctl stop service_name.service 부팅 시 서비스 자동 시작 systemctl enable service_name.service 부팅 시 서비스 자동 시작 해제 systemctl disable service_name.service 서비스 목록 보기 systemctl list-units --type=service

CentOS 7 / Apache / 하나의 서버에 여러 사이트 운영하기

CentOS 7 / Apache / 하나의 서버에 여러 사이트 운영하기

하나의 서버에 하나의 사이트만 운영하는 것이 가장 이상적일 것입니다. 하지만 사이트 접속자가 많지 않거나 서버 사양이 훌륭하다면 여러 사이트를 하나의 서버에서 운영하는 게 경제적입니다. CentOS에 Apache 웹서버를 설치하고 운영하는 경우 여러 사이트를 운영할 수 있게 설정하는 방법을 요약해보겠습니다. 네임 서버 설정 각 도메인의 네임 서버의 호스트 IP를 웹서버 아이피로 설정합니다. 디렉토리 만들기 한 서버에 aaa.com과 ...

리눅스 / 명령어 / history / 이전에 실행했던 명령어 목록 출력하는 명령어

history는 이전에 실행했던 명령어 목록 출력하는 명령어이다. history 이전에 실행했던 명령어 목록을 일련번호와 함께 출력한다. # history history n 최근 n개의 명령어 목록을 출력한다. 다음과 같이 명령하면 최근 실행한 10개의 명령어를 출력한다. # history 10 !! !!를 입력하고 엔터를 누르면 직전에 실행했던 명령어를 다시 실행한다. !n 일련번호가 n인 명령어를 실행한다. 다음과 같이 명령하면 번호가 202인 명령어를 실행한다. # !202