DEV Community

loading...

Things to remember when reinstall Ubuntu.

vukhanhtruong profile image Truong Vu Updated on ・3 min read

This is just about my checklist when I reinstall the software on my machine. Hope you have find this useful.

Backup the essential things.

  1. The most important thing is the folder named ~/.ssh where contains all my credentials to access to different servers. As you well know if you lost it, you have to re-generate keys and add them to Github, Gitlab, Bitbucket, etc.

  2. Make sure all source code was backed up or pushed to the remote repository.

  3. My favorite IDE is Visual Studio Code, and there are a lot of extensions was installed. All I need to do is backup the folder named .vscode in my home directory ~/.vscode. If you were using another IDE, you should find out where the configuration store then saves it.

  4. I work with the terminal every day, so I have to backup the file named .zshrc and the folder named .oh-my-zsh, to avoid re-configuration the terminal and install a dozen of plugins.

After finishing installing Ubuntu

  1. Move all the backed up folder to the same path like before. So, now my Linux environment similar to the old one. Definitely, it saves my time.

  2. Install the favorite apps. Here are my favorite applications, just focused on development.

System

  • Ubuntu 18.10 (current)

IDE

Internet

Terminal

  • zsh
  • oh-my-zsh A delightful community-driven (with 1,200+ contributors) framework for managing your zsh configuration. Below is my favorite plugins:
plugins=(
  zsh-completions
  zsh-autosuggestions
  zsh-syntax-highlighting
  history-substring-search
  git
  docker
  docker-compose
  dotenv
  nvm
  httpie
  rsync
  yarn
  tmux
  node
  zsh-nvm
  helm
  composer
  minikube
  kubectl
)
call plug#begin('~/.vim/plugged')

" Make sure you use single quotes

" On-demand loading
Plug 'scrooloose/nerdtree', { 'on':  'NERDTreeToggle' }

" Language pack for VIM
Plug 'sheerun/vim-polyglot'

" VIM check syntax
Plug 'w0rp/ale' 

" Initialize plugin system
call plug#end()

" Shortcut key to open file explorer
nmap <F6> :NERDTreeToggle<CR>

" ALE linting tool
let g:ale_linters = {
\   'javascript': ['eslint'],
\}

let g:ale_sign_error = '❌'
let g:ale_sign_warning = '⚠️'
highlight ALEErrorSign ctermbg=NONE ctermfg=red
highlight ALEWarningSign ctermbg=NONE ctermfg=yellow

let g:ale_fixers['javascript'] = ['eslint']

" Fix files automatically on save
let g:ale_fix_on_save = 1

DevOps Tools

  • docker
  • docker-compose
  • minikube
  • skaffold A command line tool that facilitates continuous development for Kubernetes applications.
  • kompose Converts Docker Compose to Kubernetes.
  • kubectl Command line interface for running commands against Kubernetes clusters.
  • kubectx Fast way to switch between clusters and namespaces in kubectl.
  • kubeval Validate your Kubernetes configuration files, supports multiple Kubernetes versions.
  • dive A tool for exploring each layer in a docker image

Utilities Dev Tools

  • cheat.sh The only cheat sheet you need.
  • httpie — Modern command line HTTP client — user-friendly curl alternative with intuitive UI, JSON support, syntax highlighting, wget-like downloads, extensions, etc.
  • postman Postman Makes API Development Simple.
  • ngrok or localtunnel Exposes your localhost to the world for easy testing and sharing.
  • pet — Simple command-line snippet manager.
  • tmux — Terminal multiplexer.
  • tmux config — The best tmux configuration.
  • mycli — A Terminal Client for MySQL with AutoCompletion and Syntax Highlighting.
  • json-server — Get a full fake REST API with zero coding in less than 30 seconds.
  • vegeta HTTP load testing tool and library.
  • mkcert A simple zero-config tool to make locally trusted development certificates with any names you'd like.
  • doctoc Generates table of contents for markdown files.

Troubleshooting

If you got the following issue with ssh:

sign_and_send_pubkey signing failed agent refused operation

Run the following command to fix:

eval "$(ssh-agent -s)" && ssh-add ~/.ssh/id_rsa
chmod 700 ~/.ssh
chmod 600 ~/.ssh/id_rsa
chmod 644 ~/.ssh/id_rsa.pub

That's it. If you have anything to share, feel free to leave your comment.

Discussion (1)

pic
Editor guide
Collapse
glennmen profile image
Glenn Carremans

I just came across your post and was wondering why in your .oh-my-zsh plugins you have both nvm and zsh-nvm, having nvm removes the benefit of the zsh-nvm plugin 🤔Or I might be wrong about the working of the plugin.