Change default shell in linux

1 minute read

Check current default shell

ps -p $$
# or
echo $0
# in my case
# /bin/bash

Get all shells available

cat /etc/shells
# in my case
# /bin/sh
# /bin/bash
# /bin/rbash
# /bin/dash
# /usr/bin/tmux

Swtich to different shell

# change to bash shell
bash
# or
chsh -s /bin/bash # chsh: change shell

to find full path of shell

type -a bash
# bash is /bin/bash

change to Oh my zsh

# zsh ์„ค์น˜
sudo apt-get install zsh

# ์„ค์น˜๊ฒฝ๋กœ ํ™•์ธ
which zsh
#=> /usr/bin/zsh

# ๊ธฐ๋ณธ sh ๋ณ€๊ฒฝ
chsh -s $(which zsh)
# or
chsh -s /usr/bin/zsh

change theme

go to ~/.zshrc

# edit by vim
vim ~/.zshrc

change theme to whatever you want ZSH_THEME=โ€agnosterโ€

Change shell

just type bash or zsh on CLI

Showing only user name

https://stackoverflow.com/questions/31848957/zsh-hide-computer-name-in-terminal

VSCODE remote connection font broken

server์—์„œ๋Š” ์ž˜ ๋ณด์ด๋Š”๋ฐ
vscode remote connection์œผ๋กœ ํ• ๋•Œ๋Š” ํฐํŠธ๊ฐ€ ๊นจ์ง„๋‹ค.
windows ํ™˜๊ฒฝ์ด๋ผ์„œ ๊ทธ๋Ÿฐ๊ฑฐ ๊ฐ™๋‹ค.

windows ํ™˜๊ฒฝ์—์„œ powerline font ์„ค์น˜
download ๋ฐ›์€ fonts-master directory๋กœ ๊ฐ€์„œ ์ฐธ๊ณ ํ•œ ๋ธ”๋กœ๊ทธ๋Œ€๋กœ ์„ค์น˜ํ•˜๋ฉด ๋œ๋‹ค.
์„ค์น˜ํ›„ ์›ํ•˜๋Š” powerline font ์ค‘ ํ•˜๋‚˜๋ฅผ

vscode file -> prefererences -> settings
or
ctrl + , ๋ฅผ ์ž…๋ ฅํ•ด์„œ setting์— ๋“ค์–ด๊ฐ€์„œ
terminal font๋ฅผ ๊ฒ€์ƒ‰ํ•ด์„œ
Terminal โ€บ Integrated: Font Family ์—ฌ๊ธฐ์„ธ ์„ค์น˜๋œ ์›ํ•˜๋Š” font๋ช…์„ ๋„ฃ์–ด์ฃผ๋ฉด ์ ์šฉ๋˜๋Š” ๊ฒƒ์„ ๋ณผ ์ˆ˜ ์žˆ๋‹ค.

๊ฐœ์ธ์ ์œผ๋กœ Space Mono for Powerline, Roboto Mono for Powerline, Cousine for Powerline ์ค‘์—์„œ
Cousine์ด ์ œ์ผ ์ ์ ˆํ•ด ๋ณด์ธ๋‹ค.

window ํ™˜๊ฒฝ์—์„œ powerline font ์„ค์น˜ https://slmeng.medium.com/how-to-install-powerline-fonts-in-windows-b2eedecace58

find default shell and change https://www.cyberciti.biz/faq/how-to-change-shell-to-bash/

ubuntu zsh & oh-my-zsh install https://tutorialpost.apptilus.com/code/posts/tools/using-zsh-oh-my-zsh/

Leave a comment