TL
툴랩
💰후원하기
💰후원하기

Linux 명령어 레퍼런스

파일 관리, 텍스트 처리, 프로세스, 네트워킹 등 필수 Linux/Unix 명령어를 빠르게 검색하세요.

파일 & 디렉토리

ls -laList files with details and hidden files
cd <dir>Change directory
pwdPrint working directory
mkdir -p <dir>Create directory (and parents)
rm -rf <dir>Remove directory recursively (careful!)
cp -r <src> <dest>Copy files/directories recursively
mv <src> <dest>Move or rename file/directory
touch <file>Create empty file or update timestamp
find . -name "*.txt"Find files by name pattern
find . -type f -size +10MFind files larger than 10MB
du -sh *Show disk usage of each item
df -hShow disk space usage

텍스트 처리

cat <file>Print file contents
less <file>Page through file (q to quit)
head -n 20 <file>Show first 20 lines
tail -n 20 <file>Show last 20 lines
tail -f <file>Follow file (live log viewing)
grep -r "pattern" .Search for pattern recursively
grep -i "pattern" <file>Case-insensitive search
grep -n "pattern" <file>Show line numbers in results
sed -i "s/old/new/g" <file>Replace text in file in-place
awk '{print $1}' <file>Print first column
sort <file>Sort lines alphabetically
sort -n -k2 <file>Sort numerically by 2nd column
uniq -cCount and deduplicate adjacent lines
wc -l <file>Count lines in file
cut -d"," -f1,3 <file>Cut specific columns (CSV)

프로세스

ps auxList all running processes
topInteractive process viewer
htopEnhanced process viewer (if installed)
kill <pid>Terminate process by PID
kill -9 <pid>Force kill process
pkill <name>Kill processes by name
pgrep <name>Find PIDs by process name
nohup <cmd> &Run command immune to hangups, in background
jobsList background jobs
bg %1Resume job 1 in background
fg %1Bring job 1 to foreground

권한 & 소유권

chmod 755 <file>Set rwxr-xr-x permissions
chmod +x <file>Make file executable
chown user:group <file>Change file owner and group
sudo <cmd>Run command as superuser
sudo -iSwitch to root shell
su - <user>Switch to another user
umask 022Set default permission mask

네트워킹

curl -I <url>Show response headers only
curl -L -o file <url>Download file following redirects
wget <url>Download file
ping <host>Test network connectivity
traceroute <host>Trace network path to host
nslookup <domain>DNS lookup
dig <domain>Detailed DNS lookup
netstat -tulnShow listening ports
ss -tulnShow listening ports (modern)
ssh user@hostConnect via SSH
scp <file> user@host:/pathCopy file via SSH
rsync -avz src/ user@host:dest/Sync files efficiently

아카이브 & 압축

tar -czf archive.tar.gz <dir>Create gzip compressed archive
tar -xzf archive.tar.gzExtract gzip archive
tar -cjf archive.tar.bz2 <dir>Create bzip2 compressed archive
zip -r archive.zip <dir>Create zip archive
unzip archive.zipExtract zip archive
gzip <file>Compress file with gzip
gunzip <file>.gzDecompress gzip file

시스템 정보

uname -aSystem and kernel information
cat /etc/os-releaseOS version information
free -hMemory usage
uptimeSystem uptime and load
whoWho is logged in
idCurrent user and group IDs
envShow environment variables
export VAR=valueSet environment variable
which <cmd>Find command path
historyCommand history
man <cmd>Manual page for a command

이 도구 소개

Linux 명령어 레퍼런스는 파일 디렉토리 탐색, 텍스트 처리, 프로세스 관리, 권한 설정, 네트워킹, 아카이브, 시스템 정보 등 7개 카테고리로 구성된 필수 Linux/Unix 명령어 모음입니다.

각 명령어는 실제 사용 예시와 함께 간결한 설명을 제공합니다. 검색창을 이용해 명령어 이름이나 설명으로 빠르게 원하는 명령어를 찾을 수 있습니다.

사용 방법

  1. 검색창에 명령어 이름이나 키워드를 입력합니다.
  2. 원하는 카테고리를 스크롤하여 명령어를 찾습니다.
  3. 명령어와 설명을 확인하고 터미널에서 사용합니다.
  4. 꺾쇠 괄호(<>)로 표시된 부분은 실제 값으로 교체하여 사용하세요.

활용 사례

DevOps 엔지니어가 배포 스크립트를 작성할 때, 시스템 관리자가 서버 문제를 디버깅할 때, 개발자가 파일 권한이나 프로세스를 확인할 때, Linux를 처음 배우는 학습자가 명령어를 참조할 때 유용합니다.

자주 묻는 질문

  • <> 안의 내용은 무엇인가요? 꺾쇠 괄호는 자리 표시자입니다. 예를 들어 <dir>은 실제 디렉토리 경로로, <file>은 파일명으로 바꿔서 사용하세요.
  • 명령어가 작동하지 않으면 어떻게 하나요? htop 같은 일부 명령어는 기본 설치되어 있지 않을 수 있습니다. sudo apt install htop 등으로 설치하거나, man 명령어로 시스템에서 지원 여부를 확인하세요.
  • sudo를 사용할 때 주의사항은 무엇인가요? sudo는 관리자 권한으로 명령어를 실행합니다. rm -rf 같은 파괴적인 명령어와 함께 사용 시 돌이킬 수 없는 결과가 발생할 수 있으므로 신중하게 사용하세요.