zsh 및 oh my zsh 설치

Younghwan Cha·2023년 4월 20일
0

server setting

목록 보기
1/2

먼저 zsh 을 설치해 준다.

sudo apt install -y zsh

이후에, 기본 shell 을 zsh 로 변경해준다.

chsh -s `which zsh`

이후에 시스템을 재시작하고 터미널을 실행하면 아래와 같은 문구가 나온다

This is the Z Shell configuration function for new users,
zsh-newuser-install.
You are seeing this message because you have no zsh startup files
(the files .zshenv, .zprofile, .zshrc, .zlogin in the directory
~).  This function can help you with a few settings that should
make your use of the shell easier.

You can:

(q)  Quit and do nothing.  The function will be run again next time.

(0)  Exit, creating the file ~/.zshrc containing just a comment.
     That will prevent this function being run again.

(1)  Continue to the main menu.

(2)  Populate your ~/.zshrc with the configuration recommended
     by the system administrator and exit (you will need to edit
     the file by hand, if so desired).

--- Type one of the keys in parentheses --- 

(2) 번을 선택하고 default shell 정보를 확인해보면 zshell 로 변경된 것을 알 수 있다.

echo $SHEL
> /usr/bin/zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

[oh my zsh] https://ohmyz.sh/


이후에 user@hostname 정보를 지우려면 아래 issue 를 참고해보자

https://github.com/agnoster/agnoster-zsh-theme/issues/39

만약 hostname 을 변경하고 싶다면 /etc/hostname 의 정보를 변경하고 reboot 를 진행한다

profile
개발 기록

0개의 댓글