Skip to content

004-setup-opt0

opt0

  • linux base app utils

ubuntu

base setup

# node
sudo apt install -y nodejs npm
sudo npm cache clean
sudo npm install -g n
sudo n 18.12.1
# sudo n 12.14.1
# sudo n stable
sudo npm update -g npm
# delete old version
sudo apt purge -y nodejs npm

# python
sudo apt install python3-pip

# go
git clone https://github.com/syndbg/goenv.git ~/.goenv
goenv install -l
goenv install 1.20.3
goenv global 1.20.3

# java
sudo apt -qqy install openjdk-11-jdk

ubuntu home bashrc

# fzf
[ -f ~/.fzf.bash ] && source ~/.fzf.bash

# Golang
export PATH=~/.goenv/bin:~/go/bin:~/bin:~/script:$PATH
eval "$(goenv init -)"
export PATH="$GOROOT/bin:$PATH"
export PATH="$PATH:$GOPATH/bin"

# Python

deprecated

#nvm
apt-get update
apt-get install nodejs
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash

# nodejs
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion