차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

다음 판
이전 판
tech:zsh [2021/07/30 10:04] – 만듦 V_Ltech:zsh [2025/07/12 18:48] (현재) – [참고] V_L
줄 1: 줄 1:
 {{tag> 리눅스 우분투 명령어 쉘}} {{tag> 리눅스 우분투 명령어 쉘}}
-======  Zsh  ======+======  zsh  ====== 
 + 
 + [[bash]] 보다 좋음.  
 + 
 +=====설치===== 
 +  
 +====Zsh 설치==== 
 +  sudo apt install zsh 
 + 
 +  
 +====Oh My Zsh  설치.==== 
 +[[git|git]], [[curl|curl]] 설치가 되어 있어야함. 
 + 
 +  sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" 
 + 
 + 
 +====사용설정==== 
 + 
 +  chsh -s /bin/zsh 
 +기본쉘을 zsh로 변경 
 + 
 +=====단축명령어===== 
 +    nano ~/.zshrc 
 + 
 + 
 +''nano ~/.zshrc'' 할 때 
 + 
 +하는 김에 
 + 
 +  alias ll = "ls -la" 
 + 
 +맨 마지막에 추가 
 + 
 + 
 +=====단축키===== 
 + 
 +자주 사용하는 명령어 
 +^shorcut^Action^ 
 +|CTRL + A|라인 맨 앞으로 이동| 
 +|CTRL + E (end-of-line)|라인 맨 끝으로 이동| 
 +|CTRL + 좌우방향키|단어 단위로 이동| 
 +|CTRL + U|라인 전체 삭제 (라인시작~커서위치)| 
 +|CTRL + K ( kill-line)|라인 전체 삭제 (커서위치~라인 끝)| 
 +|CTRL + W|커서 앞 단어 삭제| 
 +|CTRL + R|이력 검색 (CTRL + G : 종료)| 
 +|CTRL + _|실행취소| 
 +=====플러긴===== 
 + 
 +  git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting 
 +  git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions 
 + 
 +  nano ~/.zshrc 
 +<file> 
 +# Which plugins would you like to load? 
 +# Standard plugins can be found in $ZSH/plugins/ 
 +# Custom plugins may be added to $ZSH_CUSTOM/plugins/ 
 +# Example format: plugins=(rails git textmate ruby lighthouse) 
 +# Add wisely, as too many plugins slow down shell startup. 
 +plugins=(git 
 +zsh-syntax-highlighting 
 + zsh-autosuggestions 
 +
 +</file> 
 + 
 + 
 +=====참고===== 
 +  * [[https://joyfui.wo.tc/1180|우분투에서 zsh 사용하기]] 
 +  * [[https://velog.io/@yujo/Ubuntu-20.04%EC%9A%B0%EB%B6%84%ED%88%AC-Terminal-%EC%84%B8%ED%8C%85|우분투 Terminal 세팅]] 
 + 
 + 
 + 
 +====home key가 되지 않는다==== 
 + 
 +''~/.zshrc'' 에 다음과 같이 추가합니다. 
 +<file> 
 +case $TERM in (xterm*) 
 +bindkey '^[[H' beginning-of-line 
 +bindkey '^[[F' end-of-line 
 +esac 
 +</file>
  
- [[bash]] 보다 좋음