본문 바로가기
Q&A2023년 6월 26일1분 읽기

개발자를 위한 리눅스 명령어 치트시트

오
오수빈
조회 1240댓글 1

개발자가 자주 쓰는 리눅스 명령어를 정리해주세요.

댓글 1

김김영삼3년 전

개발자 필수 리눅스 명령어:

# 파일 검색
find . -name "*.js" -not -path "*/node_modules/*"
grep -rn "TODO" --include="*.py" .

# 디스크
df -h && du -sh * | sort -rh | head
ncdu / # 인터랙티브 디스크 분석

# 프로세스
ps aux | grep node
lsof -i :3000
kill -9 $(lsof -t -i :3000)

# 네트워크
curl -I https://example.com
wget -q -O- https://example.com
dig +short example.com
ss -tulnp

# 텍스트 처리
cat file.log | grep ERROR | wc -l
awk '{print $1}' access.log | sort | uniq -c | sort -rn | head
sed -i 's/old/new/g' file.txt

# 시스템
free -h && uptime
history | grep "docker"
watch -n 2 "ss -tulnp" # 2초마다 반복
Ctrl+Enter로 등록