Linux(Ubuntu)에서 oh-my-zsh 설치 및 세팅하기

Linux(Ubuntu)에서 oh-my-zsh 설치 및 세팅하기

oh-my-zsh 설정 및 추천 플로그인들의 설치 방법입니다.

Zsh & Oh My Zsh Installation

Zsh Installation Guide
Oh My Zsh Installation Guide

# Install Zsh
apt install zsh

# Install Oh My Zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Pure Theme

Pretty, minimal and fast ZSH prompt

Installing Node.js (for npm)

Check latest nvm version

# Install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash

# Install Node.js
nvm install node --lts

Install Pure Theme

Check installation guide for detail.

npm install --global pure-prompt

add below code to the ~/.zshrc.

# .zshrc

ZSH_THEME=""

autoload -U promptinit; promptinit
prompt pure

OMZ Plugins

zsh-syntax-highlighting

Fish shell-like syntax highlighting for Zsh.

Check Installation Guide for detail.

  1. Clone this repository in oh-my-zsh’s plugins directory:

     git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
    
  2. Add the plugin to the list of plugins for Oh My Zsh to load (inside ~/.zshrc):

     plugins=([plugins...] zsh-syntax-highlighting)
    

zsh-autosuggestions

Fish-like fast/unobtrusive autosuggestions for zsh.

Check Installation Guide for detail.

  1. Clone this repository in oh-my-zsh’s plugins directory:

     git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
    
  2. Add the plugin to the list of plugins for Oh My Zsh to load (inside ~/.zshrc):

     plugins=([plugins...] zsh-autosuggestions)
    

Autojump

autojump - a faster way to navigate your filesystem

apt install autojump

# Follow instructions
cat /usr/share/doc/autojump/README.Debian

# add following line to ~/.zshrc
. /usr/share/autojump/autojump.sh

Others

  • Remove directory highlighting for WSL.

      LS_COLORS="ow=01;36;40" && export LS_COLORS #WSL dir colors
    
  • Add git aliases to the zsh.

      # Create .zsh file in the $ZSH/custom folder.
    

© 2021. All rights reserved.