unzip의 사전설치가 필요.
# unzip 사전설치
sudo apt install unzip
# admin 권한필요
curl -s https://ohmyposh.dev/install.sh | bash -s
# 위에 방법이 실패하면 사용자계정아래 설치하는 다음 문구로 설치
curl -s https://ohmyposh.dev/install.sh | bash -s -- -d ~/bin설치하여 아래처럼 안내문구 보이면
theme를 설정하고 bashrc에 관련 항목을 적어줘야 함.
ubuntu@ubunt:~$ curl -s https://ohmyposh.dev/install.sh | bash -s -- -d ~/bin
⚠️ Installation directory /home/ubuntu/bin is not in your $PATH
ℹ️ Installing oh-my-posh for linux-amd64 in /home/ubuntu/bin
⬇️ Downloading oh-my-posh from https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/posh-linux-amd64
🎨 Installing oh-my-posh themes in /home/ubuntu/.cache/oh-my-posh/themes
🚀 Installation complete.
You can follow the instructions at https://ohmyposh.dev/docs/installation/prompt
to setup your shell to use oh-my-posh.
If you want to use a built-in theme, you can find them in the directory:
oh-my-posh init {shell} --config /{theme}.omp.json터미널을 다시 시작하거나 source ~/.bashrc 로 재설정하면 사용가능
# open editor
sudo nano ~/.bashrc
# paste below at the bottom line
if [ -d "$HOME/bin" ] ; then
PATH="$PATH:$HOME/bin"
fi별도 명령어 없이 간단히 font 설치가능. 아래 명령어로
oh-my-posh font install
------------------------
Successfully installed D2Coding 🚀
The following font families are now available for configuration:
• D2CodingLigature Nerd Font Mono
• D2CodingLigature Nerd Font Propo
• D2CodingLigature Nerd Font# FONT 수동설치
sudo apt install wget fontconfig
# install d2coding font
wget -P ~/.local/share/fonts https://github.com/ryanoasis/nerd-fonts/releases/latest/download/D2Coding.zip \
&& cd ~/.local/share/fonts && unzip D2Coding.zip && rm D2Coding.zip
fc-cache -f -v
fc-list | grep -i d2coding
# install Hack font
wget -P ~/.local/share/fonts https://github.com/ryanoasis/nerd-fonts/releases/latest/download/Hack.zip \
&& cd ~/.local/share/fonts && unzip Hack.zip && rm Hack.zip
fc-cache -f -v
fc-list | grep -i hackhttps://www.tobonyblog.com/2021/07/ubuntu-install-fonts-d2coding-hack-font.html
THEME change prompt
## Install Oh my Posh
sudo wget https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/posh-linux-amd64 -O /usr/local/bin/oh-my-posh
sudo chmod +x /usr/local/bin/oh-my-posh
## Download the themes
mkdir ~/.poshthemes
wget https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/themes.zip -O ~/.poshthemes/themes.zip
unzip ~/.poshthemes/themes.zip -d ~/.poshthemes
chmod u+rw ~/.poshthemes/*.json
rm ~/.poshthemes/themes.zip
# add ~/.bashrc
sudo nano ~/.bashrc
# add at the bottom
eval "$(oh-my-posh init bash --config ~/.poshthemes/{theme}.omp.json)"
# run
source ~/.bashrc
--------------------
# select THEME
eval "$(oh-my-posh init bash --config ~/.poshthemes/jandedobbeleer.omp.json)"
eval "$(oh-my-posh init bash --config ~/.poshthemes/powerlevel10k_lean.omp.json)"
eval "$(oh-my-posh init bash --config ~/.poshthemes/cobalt2.omp.json)"
eval "$(oh-my-posh init bash --config ~/.poshthemes/powerline.omp.json)"
0 댓글