Sua Blog
linux ubuntu setting
no date — linux
ubuntu setting
user생성
sudo useradd -m [name]
sudo passwd [name]
zsh 설치
sudo apt-get zsh
zsh --version
sudo reboot
echo $SHELL
oh-my-zsh(zsh config 관리) 설치
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
테마
vi ~/.zshrc
# .zshrc에 추가
ZSH_THEME="agnoster"
폰트
sudo apt install fonts-powerline
# vs code > setting > terminal font familly > 'D2Coding'
node 설치
sudo apt-get update
sudo apt-get install -y build-essential
sudo apt-get install curl
sudo apt-get install -y nodejs
node -v
nvm 설치
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
# nvm not found 시 .zshrc에 추가
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
# 수정 후 스크립트 실행
source ~/.zshrc
node 버전 변경
nvm list-remote
nvm install 16.14.1
nvm ls
node -v // 16.14.1
쉘 자동완성
cd ~/.oh-my-zsh/custom/plugins
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
# .zshrc에 플러그인 추가
plugins=(
# other plugins...
zsh-autosuggestions
)
yarn 설치
npm install -g yarn
yarn --version
Postgres 설치
sudo apt-get install postgresql postgresql-contrib
# 설치하면 postgres라는 계정이 생성된다
# postgres 계정으로 변경
sudo -i -u postgres
# 새로운 계정 생성
createuser --interactive [name]
# db 생성
createdb [name]