본문 바로가기

OS 운영체제/LINUX34

/etc/passwd (사용자 정보 파일) 00 개요리눅스에는 여러 디렉토리가 있다 (참조: 2024.03.20 - [LINUX] - Linux 디렉토리 구조)그 중 구성 (Configueation) 파일들이 모여있는 etc 폴더 안에는 passwd라는 파일이 있는데 이 파일은 사용자에 관한 정보를 담고 있다01 passwd 파일1. passwd 파일이란?시스템 액세스 권한이 있는 모든 등록 사용자를 추적하는 데 사용2. passwd 내용콜론 (:)으로 분리되어 있으며 다음과 같은 정보를 담음사용자 이름 - User name암호화된 비밀번호 - Encrypted password사용자 ID  번호 - User ID number (UID)  사용자의 그룹 ID 번호 - User's group ID number (GID) 사용자 전체 이름 - Full.. 2024. 4. 8.
find (파일 검색 명령어) 01 find 명령어란1. find 정의'찾다'2. find 명령어 기능Linux 에서 파일 및 디렉토리를 검색할 때 사용옵션을 사용해 원하는 파일 및 디렉토리 검색 가능3. find 명령어 문법# find [path] [options] [expression]path (경로): Starting directory for the searchoptions (옵션): Additional settings or conditions for the searchexpression (표현식): Criteria for filtering and locating filesfind 명령에는 몇 가지 옵션(option)과 많은 수의 표현식(expression)이 존재 find 명령의 검색 결과가 지정된 expression의 조합에.. 2024. 4. 5.
swap (가상 저장 공간) 00 용어 정리공간 = 메모리 swap (v.): to give in trade; exchange 바꾸다, 서로 교환하다01 swap이란1. 정의Swap: Linux 기반 OS에서 가상 메모리 (virtual memory)로 작동하는 저장 장치 (예: HHD, SSD, 가상 저장 장치)의 전용 공간/메모리시스템의 사용 가능한 메모리 부족 시 물리적 RAM (random access memory)을 보충하는 데 사용됨swap 공간/메모리를 통해 OS는 덜 자주 사용되는 데이터를 RAM에서 swap 공간/메모리로 이동하여 더 중요/자주 접근하는 데이터를 위해 RAM 공간 확보 가능아주 쉬운 설명: 물리적인 RAM(메모리)이 부족할 때 사용할 수 있는 디스크 공간2. 형태swap은 partition 또는 fi.. 2024. 4. 4.
tar (archive 파일 작업 명령어) 00 서론0. 용어 정리archive file: 하나 또는 여러개의 파일을 압축한 파일. 파일을 압축하여 저장 공간 절약하며 데이터의 휴대성을 높임01 tar이란1. tar의 정의$ tar [options] [archive-file] [file or dir to be archived]'Tape Archive'의 약자Linux 명령어archive 파일 관련 작업 기능 제공2. tar 옵션옵션설명-carchive file 생성 (create)-xarchive file 추출 ( extract)-farchive file의 이름을 지정 (specify filename)-v터미널에 tar operation의 verbose info 출력 (print verbose info) *verbose: 장황하게 말이 많은 연설.. 2024. 3. 28.
scp (서버간 파일 복사 명령어) 00 scp란secure copy (remote file copy program)의 약자ssh 사용하여 네트워크로 연결된 호스트간 파일을 주고 받는 명령어ssh를 사용하기에 password를 입력하거나 ssh key파일과 같은 identity file을 이용해 파일 송수신 가능1) Local → Remote (보내기) 2) Remote →  Local (가져오기) 3) Remote →  Remote (다른 호스트끼리) 가능 01 문법기본 문법:scp [options ...] [source] [target]​​1. Local → Remote (보내기)scp 목적파일명(경로) 유저명@IP주소:목적디렉토리 scp test1.txt root@10.0.0.135:/opt​2. Remote →  Local (가져오.. 2024. 3. 20.
Linux 디렉토리 구조 경로설명 (간략)설명 (상)/The Root Directoryeverything on your Linux system is located under the / directory/binEssential User Binaries- The /bin directory contains the essential user binaries (programs) that must be present when the system is mounted in single-user mode- Applications such as Firefox are stored in /usr/bin, while important system programs and utilities such as the bash shell are located i.. 2024. 3. 20.
Environment Variables 목록 00 환경변수란 01 환경변수 확인 02 환경변수 관리 00 환경변수란 01 환경변수 확인 0. 참조 https://www.cherryservers.com/blog/how-to-set-list-and-manage-linux-environment-variables 1. printenv 사용 모든 환경변수 확인 printenv 결과값 예시 SHELL=/bin/bash PWD=/root LOGNAME=root HOME=/root LANG=C.UTF-8 LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42.. 2024. 3. 18.