Linux 명령어 레퍼런스
파일 관리, 텍스트 처리, 프로세스, 네트워킹 등 필수 Linux/Unix 명령어를 빠르게 검색하세요.
파일 & 디렉토리
ls -laList files with details and hidden filescd <dir>Change directorypwdPrint working directorymkdir -p <dir>Create directory (and parents)rm -rf <dir>Remove directory recursively (careful!)cp -r <src> <dest>Copy files/directories recursivelymv <src> <dest>Move or rename file/directorytouch <file>Create empty file or update timestampfind . -name "*.txt"Find files by name patternfind . -type f -size +10MFind files larger than 10MBdu -sh *Show disk usage of each itemdf -hShow disk space usage텍스트 처리
cat <file>Print file contentsless <file>Page through file (q to quit)head -n 20 <file>Show first 20 linestail -n 20 <file>Show last 20 linestail -f <file>Follow file (live log viewing)grep -r "pattern" .Search for pattern recursivelygrep -i "pattern" <file>Case-insensitive searchgrep -n "pattern" <file>Show line numbers in resultssed -i "s/old/new/g" <file>Replace text in file in-placeawk '{print $1}' <file>Print first columnsort <file>Sort lines alphabeticallysort -n -k2 <file>Sort numerically by 2nd columnuniq -cCount and deduplicate adjacent lineswc -l <file>Count lines in filecut -d"," -f1,3 <file>Cut specific columns (CSV)프로세스
ps auxList all running processestopInteractive process viewerhtopEnhanced process viewer (if installed)kill <pid>Terminate process by PIDkill -9 <pid>Force kill processpkill <name>Kill processes by namepgrep <name>Find PIDs by process namenohup <cmd> &Run command immune to hangups, in backgroundjobsList background jobsbg %1Resume job 1 in backgroundfg %1Bring job 1 to foreground권한 & 소유권
chmod 755 <file>Set rwxr-xr-x permissionschmod +x <file>Make file executablechown user:group <file>Change file owner and groupsudo <cmd>Run command as superusersudo -iSwitch to root shellsu - <user>Switch to another userumask 022Set default permission mask네트워킹
curl -I <url>Show response headers onlycurl -L -o file <url>Download file following redirectswget <url>Download fileping <host>Test network connectivitytraceroute <host>Trace network path to hostnslookup <domain>DNS lookupdig <domain>Detailed DNS lookupnetstat -tulnShow listening portsss -tulnShow listening ports (modern)ssh user@hostConnect via SSHscp <file> user@host:/pathCopy file via SSHrsync -avz src/ user@host:dest/Sync files efficiently아카이브 & 압축
tar -czf archive.tar.gz <dir>Create gzip compressed archivetar -xzf archive.tar.gzExtract gzip archivetar -cjf archive.tar.bz2 <dir>Create bzip2 compressed archivezip -r archive.zip <dir>Create zip archiveunzip archive.zipExtract zip archivegzip <file>Compress file with gzipgunzip <file>.gzDecompress gzip file시스템 정보
uname -aSystem and kernel informationcat /etc/os-releaseOS version informationfree -hMemory usageuptimeSystem uptime and loadwhoWho is logged inidCurrent user and group IDsenvShow environment variablesexport VAR=valueSet environment variablewhich <cmd>Find command pathhistoryCommand historyman <cmd>Manual page for a command이 도구 소개
Linux 명령어 레퍼런스는 파일 디렉토리 탐색, 텍스트 처리, 프로세스 관리, 권한 설정, 네트워킹, 아카이브, 시스템 정보 등 7개 카테고리로 구성된 필수 Linux/Unix 명령어 모음입니다.
각 명령어는 실제 사용 예시와 함께 간결한 설명을 제공합니다. 검색창을 이용해 명령어 이름이나 설명으로 빠르게 원하는 명령어를 찾을 수 있습니다.
사용 방법
- 검색창에 명령어 이름이나 키워드를 입력합니다.
- 원하는 카테고리를 스크롤하여 명령어를 찾습니다.
- 명령어와 설명을 확인하고 터미널에서 사용합니다.
- 꺾쇠 괄호(<>)로 표시된 부분은 실제 값으로 교체하여 사용하세요.
활용 사례
DevOps 엔지니어가 배포 스크립트를 작성할 때, 시스템 관리자가 서버 문제를 디버깅할 때, 개발자가 파일 권한이나 프로세스를 확인할 때, Linux를 처음 배우는 학습자가 명령어를 참조할 때 유용합니다.
자주 묻는 질문
- <> 안의 내용은 무엇인가요? 꺾쇠 괄호는 자리 표시자입니다. 예를 들어 <dir>은 실제 디렉토리 경로로, <file>은 파일명으로 바꿔서 사용하세요.
- 명령어가 작동하지 않으면 어떻게 하나요? htop 같은 일부 명령어는 기본 설치되어 있지 않을 수 있습니다. sudo apt install htop 등으로 설치하거나, man 명령어로 시스템에서 지원 여부를 확인하세요.
- sudo를 사용할 때 주의사항은 무엇인가요? sudo는 관리자 권한으로 명령어를 실행합니다. rm -rf 같은 파괴적인 명령어와 함께 사용 시 돌이킬 수 없는 결과가 발생할 수 있으므로 신중하게 사용하세요.