-
zsh 알아보기 + Terminal, console, shell, kernal 정리하기Web Dev/8. 메모 2021. 9. 18. 00:52728x90
Terminal, console, shell, kernal 정리하기
우선 zsh을 알아보기 전에 Terminal, console, shell, kernal의 차이를 한번 잠깐 리프레시하고 가는 글을 읽었다.
요약하자면, linux든, mac os든 terminal이 있다. 그걸 키고 우리가 명령어를 뚝딱뚝딱 치는건데, terminal 자체가 우리가 치는 명령을 process 하는 것은 아니고 얘는 그냥 commands를 받고 결과물을 스크린에 보여주는 역할을 하고 있다(윈도우에서는 console이라고 부름). 그리고 실제로 처리는 shell에 맡긴다.
shell은 commands를 해석하고, syntax확인이나 제대로 써진건지 그런걸 확인한다. 다 괜찮으면 kernel이 이해할 수 있는 형태로 변경해서 kernel에 보낸다. 오류가 있었다면 error message을 반환한다.
kernel은 shell 다음에 있는 애고, shell이 넘겨준 명령을 처리를 해야한다. os 라이브러리와 디바이스 드라이버등을 이용한다.
kernel은 위키피디아에서 좀더 살펴보면 아래와 같다.
위키피디아 이미지: https://en.wikipedia.org/wiki/Kernel_(operating_system)#/media/File:Kernel_Layout.svg kernel은 os의 코어이다. 모든걸 통제한다. 실제로 cpu, memory, 디바이스에 뭘 처리할지 일을 하는 애다. (더 알아보기)
* 추가 글: https://www.geeksforgeeks.org/what-is-terminal-console-shell-and-kernel/
What is Terminal, Console, Shell and Kernel? - GeeksforGeeks
A Computer Science portal for geeks. It contains well written, well thought and well explained computer science and programming articles, quizzes and practice/competitive programming/company interview Questions.
www.geeksforgeeks.org
zsh이란?
그럼 이제 이건 뭔가.
https://www.howtogeek.com/362409/what-is-zsh-and-why-should-you-use-it-instead-of-bash/
What is ZSH, and Why Should You Use It Instead of Bash?
ZSH, also called the Z shell, is an extended version of the Bourne Shell (sh), with plenty of new features, and support for plugins and themes. Since it’s based on the same shell as Bash, ZSH has many of the same features, and switching over is a breeze.
www.howtogeek.com
Terminal 에서 echo $SHELL 하면 지금 무슨 shell 쓰는지 나온다.
나는 zsh 쓰는 중 zsh은 bash shell 보다 제공하는 기능이 많다. automatic cd 같은 것들. 그리고 plugin이나 theme 을 제공한다는 차이가 있다.
Plugin이나 Theme은 oh-my-zsh을 통해서 설정할 수 있다. oh-my-zsh은 zsh의 플러그인 프레임워크이다. 여기에 많은 theme들이 있다.
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
이렇게 terminal에 입력해서 설치하고 나서 설치가 되면 default theme은 Robby의 Theme이다.
일케 생겼다. 좀더 좋은게 있나 봤더니, https://github.com/ohmyzsh/ohmyzsh/wiki/Themes 여기서 theme을 찾을 수 있다.
나는 적당해보이는애로 일단 한번 골라서 써보려고 한다. 적용하고 Terminal 재시작하면 적용된다.
'Web Dev > 8. 메모' 카테고리의 다른 글
rustup, cargo, wasm-pack 차이 (0) 2021.09.21 버블링과 캡처링 (0) 2021.06.17 간단 메모 - 렌더 트리, 크리티컬 렌더링 패쓰 (0) 2021.06.14 간단메모 - 리페인트와 리플로우 (0) 2021.06.14 GraphQL아주 조금만 살펴보기 - React (0) 2021.06.05