posted by 지니우스 2017. 5. 22. 15:17

출처: http://blog.naver.com/aonezip/220846868749


Bash Shell도 충분히 멋지지만, Zsh를 이용하면 git를 터미널로 사용할 때 여러모로 편리하다. 또한 몇몇 기능은 나 같은 귀찮니즘이 많은 골수 윈도우 유저에게 많은 도움이 준다. 그럼으로 처음 리눅스를 설치하면, Bash에서 Zsh로 변경해서 사용하자. CentOS, Ubuntu에서 잘 작동한다.

현재 사용 Shell 확인

echo $SHELL

설치된 Shell 목록

cat /etc/shells

Zsh 설치

Ubuntu : sudo apt-get install zsh CentOS : sudo yum -y install zsh

shell 변경

Ubuntu : chsh -s /usr/bin/zsh CentOS : chsh -s /bin/zsh


터미널 접속을 끊고 다시 접속하면, Zsh로 된다. 접속하면 아래와 같은 문구가 나오는데, 0이나 혹은 2번을 선택하여 ./zshrc가 생성되도록 한후, Oh my 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).


Oh my Zsh 설치

via curl sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" via wget sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"


테마 agnoster로 변경

vi ~\.zshrc ZSH_THEME="robbyrussell" 를 ZSH_THEME="agnoster" 로 변경

이후 터미널을 다시 접속하면 적용된다. 그럼 다음과 같이 Zsh가 작동하는 걸 볼 수 있다.


Note! 만약 설치가 안되면, 아래 사이트에서 변경된 점이 있나 확인하자.

zsh : http://www.zsh.org/
on my zsh gitHub : https://github.com/robbyrussell/oh-my-zsh


posted by 지니우스 2017. 5. 17. 14:20

sudo 입력시 아래와 같은 메시지가 나온다면

 

[username] is not in the sudoers file. This incident will be reported.



/etc/sudoers 파일에 아래와 같이 추가하면 된다. (su 권한 필요)


[username]  ALL=(ALL)       NOPASSWD:ALL


posted by 지니우스 2017. 4. 21. 11:15

CentOS 6.5 기준

zip(unzip) 이 디폴트로 설치되어있지 않은 듯 하다.

아래와 같이 설치해주고 unzip 을 사용하도록 하자.


[설치]

su -

yum install zip

yum install unzip


[사용]

unzip spring-xd-1.3.2.RELEASE-dist.zip