Obsidian/Recognition/Programing/Linux/CentOS/리눅스 zsh 설치.md

78 lines
1.6 KiB
Markdown
Raw Normal View History

2023-08-14 16:19:25 +00:00
```shell
# pkg up -y termux에 설치하는경우 실행
# zsh 설치
yum install zsh
# zsh 버전 확인
zsh --version
# 기본 쉘 확인
echo $SHELL
# zsh 위치 확인
cat /etc/shells
# 기본 쉘 변경 : bash에서 zsh로
sudo chsh -s 'which zsh'
# termux인경우 chsh -s zsh 이후 termux 재시작
# 변경된 기본 쉘 확인
echo $SHELL
# oh my zsh 설치
# git 설치 필수
# yum install git -y
## CentOS
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
## Ubuntu
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
# ZSH_THEME 변경
$ vi ~/.zshrc
## 테마목록 확인 : https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
ZSH_THEME를 "agnoster"로 변경
# 설정 즉시 적용
$ source ~/.zshrc
# ~/.bashrc 상단에 해당 코드 입력
if [ -t 1 ]; then
exec zsh
fi
## 플러그인 설치
### zsh-syntax-highlighting
### 명령어 입력시 red/green으로 표시
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
### zsh-autosuggestions
### 명령어 입력 히스토리 기반 자동완성
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
### 플러그인 설치후 zsh연결
nano ~/.zshrc
plugins=( git zsh-syntax-highlighting zsh-autosuggestions )
source ~/.zshrc
---- 여기는 termux 검증 필요 -----
# 문제 해결
## 깨진 폰트
$ sudo apt-get install fonts-powerline
## 태마깨짐
git clone https://github.com/powerline/fonts.git
```