...
모던 리눅스/유닉스 명령어
대부분의 리눅스 강의나 수업에서는 초창기부터 있던 전통적인 CLI 명령어(ls, cd, pwd, cat, cp, mv, rm, mkdir, ...등) 위주로 알려준다.
그러나 이 오래된 명령어들은 작성된지 40년이 넘는 경우가 많아서 현재 컴퓨팅 환경과 맞지 않고 배우고 익히는데 시간이 너무 많이 걸리는 문제가 있다.
이런 문제를 해결하기 위해서 새로운 명령어들이 많이 개발되었지만, 대부분의 경우 배포판에 기본 포함되지 않은 경우가 많고 자료들도 예전 명령어를 위주로 되어 있어서 특별히 신경쓰지 않으면 접근이 어렵다는 단점이 있다.
이 강의에서 소개할 툴들은 기존의 리눅스 CLI 명령어를 대체, 개선하고자 개발 되어진 CLI 들이다.
유저에 의해 새로 개발된 툴이라 당연히 다른 명령어 인터페이스를 제공한다.
대부분 Rust 언어로 개발된 이 CLI 모던 명령어들은 기본 리눅스 명령어보다 성능이 훨씬 더 좋으며, 더불어 모두 공통적으로 colorized output을 제공하여 시각적 만족도가 매우 높아 진다.
즉, 더 이쁘고, 더 빠르고, 가독성이 좋아지는 것이다.
칙칙한 리눅스 터미널에서 벗어나 알록달록한 현대식 터미널을 느껴보는 시간을 가져보자.
exa (최신식 ls)
- 현대판 ls
- 훨씬 빠른 조회와 컬러풀한 출력을 지원
- git과 통합되어 있어 파일의 버전 상태도 같이 표시
Features · exa
Features This section outlines the things that exa can do. ColoursThe list of file types and how to tell files apart.Grid viewDisplaying files in a grid sized to the terminal window.Long viewDisplaying files in a table along with their metadata.Tree viewDi
the.exa.website
exa 사용법
[Modern Linux] 🐧 exa 명령어 사용법 (ls 대신 이거 쓰자)
exa (최신식 ls 명령어) Rust언어로 개발된 구식 ls명령어를 대체할 수 있는 exa를 소개해 본다. exa는 Unix/Linux 에서 파일이나 디렉터리를 조회하는 전통적인 명령어인 ls의 최신판 이라고 보면 된다.
inpa.tistory.com
bat (최신식 cat)
- 현대판 cat
- bat은 다양한 프로그래밍 및 마크업 언어의 문법 강조(syntax highlighting) 기능을 지원
- 왼쪽에 줄번호 표시
- bat은 git과 통합되어 git의 변경사항도 같이 표시해줌
GitHub - sharkdp/bat: A cat(1) clone with wings.
A cat(1) clone with wings. Contribute to sharkdp/bat development by creating an account on GitHub.
github.com
bat 사용법
[Modern Linux] 🐧 bat 명령어 사용법 (cat 대신 이거 쓰자)
bat (최신식 cat) 파일의 내용물을 표시할때 cat 명령어를 자주 쓸 것이다. 하지만 무미건조한 텍스트만 나열만 해 가독성이나 효율성이 좋지 않다. 최신식 명령어인 bat 은 cat 대신 사용할 수 있는
inpa.tistory.com
fd (최신식 find)
- 현대판 find 명령어
- 기존 리눅스 find보다 8~9배 더 빠르다.
- 색상화 출력을 지원
- 검색할 때 .gitignore 에 지정한 디렉토리는 자동으로 무시하는 기능도 붙어있다. (무시하지 않도록 하는 설정도 가능)
- 이것도 bat 을 개발한 사람이 개발
GitHub - sharkdp/fd: A simple, fast and user-friendly alternative to 'find'
A simple, fast and user-friendly alternative to 'find' - GitHub - sharkdp/fd: A simple, fast and user-friendly alternative to 'find'
github.com
fd 사용법
[Modern Linux] 🐧 fd 명령어 사용법 (find 대신 이거 쓰자)
fd (최신식 find) fd 는 file system 에서 특정 엔트리를 찾는 명령어로 기존 find 명령어 보다 더 사용자 친화적이며 속도도 거의 8배로 빠르다. 기본적으로 검색한 파일들에 대한 색상화 출력을 지원
inpa.tistory.com
ripgrep (최신식 grep)
- 현대판 grep
- grep보다 훨씬 빠르다고 하다
- regex 친화적인 검색 (Rust 내장 regex 엔진 사용)
- buffer 대신 mmap(memory mapped file) 사용
GitHub - BurntSushi/ripgrep: ripgrep recursively searches directories for a regex pattern while respecting your gitignore
ripgrep recursively searches directories for a regex pattern while respecting your gitignore - GitHub - BurntSushi/ripgrep: ripgrep recursively searches directories for a regex pattern while respec...
github.com
ripgrep 사용법
grep 을 대체할 수 있는 빠른 문자열 검색기 - ripgrep
www.lesstif.com
delta (최신식 more/less/diff)
- 기존의 more/less 같은 pager기능과 파일간 변경 사항을 표시하는 diff 를 대체하는 커맨드
- 문법 강조(syntax highlighting) 기능이 있으므로 기존 less 나 diff 에 비해서 변경 사항을 알아보기 쉬우며 line number 표시나 side-by-side view 기능등 편리한 기능을 갖추고 있다.
GitHub - dandavison/delta: A syntax-highlighting pager for git, diff, and grep output
A syntax-highlighting pager for git, diff, and grep output - GitHub - dandavison/delta: A syntax-highlighting pager for git, diff, and grep output
github.com
delta 사용법
more/less 같은 pager 와 차이점을 표시하는 diff를 대체하는 delta 커맨드
www.lesstif.com
tldr (최신식 man)
- 명령어의 매뉴얼을 출력해주는 man 명령어의 최신식 명령어
- manual page 의 가독성을 크게 높여준다.
GitHub - tldr-pages/tldr: 📚 Collaborative cheatsheets for console commands
📚 Collaborative cheatsheets for console commands. Contribute to tldr-pages/tldr development by creating an account on GitHub.
github.com
tldr 사용법
Linux man 페이지의 단점을 해결하는 TL;DR 프로젝트
자세한 동작 방식을 알아보려면 여전히 man 명령을 사용하는 게 필요합니다.
www.lesstif.com
zoxide (최신식 cd)
- 자주 사용하는 디렉토리를 기억하므로 몇 번의 키 입력만으로 해당 디렉토리로 "점프"할 수 있는 최신식 디렉토리 이동 명령어
GitHub - ajeetdsouza/zoxide: A smarter cd command. Supports all major shells.
A smarter cd command. Supports all major shells. Contribute to ajeetdsouza/zoxide development by creating an account on GitHub.
github.com
Broot (최신식 tree)
- 디렉토리 목록을 트리로 보여주는 최신식 명령어
- 가독성이 매우 올라간다.
GitHub - Canop/broot: A new way to see and navigate directory trees : https://dystroy.org/broot
A new way to see and navigate directory trees : https://dystroy.org/broot - GitHub - Canop/broot: A new way to see and navigate directory trees : https://dystroy.org/broot
github.com
fzf
- 원래 터미널에는 없는 기능인데, 검색한 문자열로 매칭될 수 있는 모든 파일, 커맨드 히스토리 등을 찾아주는 기능을 새로이 추가
- 부분 매칭, 전체 매칭 등 아주 강력하다
- 특히 커맨드 히스토리 찾는 기능이 정말 편하다
GitHub - junegunn/fzf: A command-line fuzzy finder
:cherry_blossom: A command-line fuzzy finder. Contribute to junegunn/fzf development by creating an account on GitHub.
github.com
gtop
- 기존 터미널에 없는 새로운 터미널용 시스템 모니터링 도구 명령어
- 이거 하나면 다른 명령어가 필요없을 정도다. (터미널 그래픽으로 이정도 구현할수 있다는 것이 대단)
GitHub - aksakalli/gtop: System monitoring dashboard for terminal
System monitoring dashboard for terminal. Contribute to aksakalli/gtop development by creating an account on GitHub.
github.com
bottom
- 이것도 process 나 system 모니터링 도구
- gtop 과 달리 맥이나 윈도우에서도 지원하는 특징을 지니고 있다
GitHub - ClementTsang/bottom: Yet another cross-platform graphical process/system monitor.
Yet another cross-platform graphical process/system monitor. - GitHub - ClementTsang/bottom: Yet another cross-platform graphical process/system monitor.
github.com
dust (최신식 du)
- 디스크 사용량을 한눈에 파악할수있게 개선한 명령어
GitHub - bootandy/dust: A more intuitive version of du in rust
A more intuitive version of du in rust. Contribute to bootandy/dust development by creating an account on GitHub.
github.com
duf (최신식 df)
- 마운트된 디스크 파일의 크기와 용량을 다채롭게 보여주는 최신식 명령어
- 사용자 친화적인 다채로운 출력
- 터미널의 테마 및 너비에 맞게 조정
- 필요에 따라 결과 정렬
- 그룹 및 필터 장치
- JSON을 편리하게 출력
GitHub - muesli/duf: Disk Usage/Free Utility - a better 'df' alternative
Disk Usage/Free Utility - a better 'df' alternative - GitHub - muesli/duf: Disk Usage/Free Utility - a better 'df' alternative
github.com
procs (최신식 ps)
- 프로세스 상태 목록을 보여주는 ps 를 대체할 수 있는 최신 명령어
GitHub - dalance/procs: A modern replacement for ps written in Rust
A modern replacement for ps written in Rust. Contribute to dalance/procs development by creating an account on GitHub.
github.com
gping (최신식 ping)
- 상대 호스트가 살아있는지 ICMP 패킷을 보낼수 있는 명령어로 graph 제공
GitHub - orf/gping: Ping, but with a graph
Ping, but with a graph. Contribute to orf/gping development by creating an account on GitHub.
github.com
mcfly (최신식 history)
- 단축 키는 Ctrl-r 로 히스토리 명령어를 탐색해서 바로 재사용할 수 있는 편리한 명령어
GitHub - cantino/mcfly: Fly through your shell history. Great Scott!
Fly through your shell history. Great Scott! Contribute to cantino/mcfly development by creating an account on GitHub.
github.com
mcfly 사용법
history 명령을 대체하는 mcfly
www.lesstif.com
hexyl (최신식 od)
- 바이너리덤프명령어인 od 를 대체할 수 있는 명령어
GitHub - sharkdp/hexyl: A command-line hex viewer
A command-line hex viewer. Contribute to sharkdp/hexyl development by creating an account on GitHub.
github.com
jq (최신식 sed)
- 커맨드라인 JSON 프로세싱 툴
- JSON path를 통해 입력된 JSON에서 특정 필드를 추출하는 등의 작업 가능
- curl과 pipe하여 REST api 리스폰스를 파싱하기 좋음
- 속도와 표현력이 좋다
GitHub - stedolan/jq: Command-line JSON processor
Command-line JSON processor. Contribute to stedolan/jq development by creating an account on GitHub.
github.com
fx (최신식 sed)
- jq와 비슷한 JSON 프로세싱 툴
- jq는 C언어로 작성되었는데, fx는 node.js라서 좀 더 느리다
- 대신 nodejs 3rd-party 라이브러리를 쓸 수 있어 jq보다 확장성이 좋다 (기본 기능은 jq가 더 좋음)
- interactive mode, streaming 등 지원
GitHub - antonmedv/fx: Terminal JSON viewer
Terminal JSON viewer. Contribute to antonmedv/fx development by creating an account on GitHub.
github.com
httpie (최신식 curl)
- 커맨드에서 HTTP 요청을 수행할 수 있는 명령어
- 쉽고 사람 친화적인 사용성을 지향한다
GitHub - httpie/httpie: As easy as /aitch-tee-tee-pie/ 🥧 Modern, user-friendly command-line HTTP client for the API era. JSON
As easy as /aitch-tee-tee-pie/ 🥧 Modern, user-friendly command-line HTTP client for the API era. JSON support, colors, sessions, downloads, plugins & more. https://twitter.com/httpie - GitHub -...
github.com
xh (최신식 curl)
- xh 는 성능에 집중한 HTTP 요청을 보내는 도구
- httpie가 너무 무거워서 퍼포먼스를 높인 프로그램
GitHub - ducaale/xh: Friendly and fast tool for sending HTTP requests
Friendly and fast tool for sending HTTP requests. Contribute to ducaale/xh development by creating an account on GitHub.
github.com
dog (최신식 dig)
- 사용자 친화적인 명령줄 DNS 클라이언트
- 다채로운 출력을 제공하고 일반 명령줄 인수 구문을 이해하고 DNS-over-TLS 및 DNS-over-HTTPS 프로토콜을 지원하고 JSON을 내보낼 수 있다.
GitHub - ogham/dog: A command-line DNS client.
A command-line DNS client. Contribute to ogham/dog development by creating an account on GitHub.
github.com
nnn (최신 mv/cp/mkdir)
- 터미널 파일 매니저 (터미널에서 쓰는 탐색기라고 보면 된다)
- 보통 mv, cp, mkdir 등등 명령어를 개별로 써야하는데 nnn 속에서 단축키로 여러 작업 가능
GitHub - jarun/nnn: n³ The unorthodox terminal file manager
n³ The unorthodox terminal file manager. Contribute to jarun/nnn development by creating an account on GitHub.
github.com
이 글이 좋으셨다면 구독 & 좋아요
여러분의 구독과 좋아요는
저자에게 큰 힘이 됩니다.