Things to remember when reinstall Ubuntu.
Tags: ubuntu, tips, utilities, tools
Published: 2019-01-19 12:06:07

---
title: Things to remember when reinstall Ubuntu.
published: true
description: List of things that I usually do when installing the Ubuntu operating system.
tags: ubuntu, tips, utilities, tools
---
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
- [Visual studio code](https://code.visualstudio.com/)

#### Internet
- [Chrome](https://www.google.com/chrome/)
- [Rambox](https://rambox.pro/#home) All-in-one chat apps.

#### Terminal
- [zsh](http://www.zsh.org/)
- [p10k](https://github.com/romkatv/powerlevel10k)
- [neovim](https://github.com/neovim/neovim)
- [tmux](https://tmux.github.io/) and [tmuxinator](https://github.com/tmuxinator/tmuxinator)
- [oh-my-zsh](https://github.com/robbyrussell/oh-my-zsh) A delightful community-driven (with 1,200+ contributors) framework for managing your zsh configuration. Below is my favorite plugins:

```sh
plugins=(
  zsh-completions
  zsh-autosuggestions
  zsh-syntax-highlighting
  history-substring-search
  git
  docker
  docker-compose
  dotenv
  nvm
  httpie
  rsync
  yarn
  tmux
  node
  helm
  composer
  minikube
  kubectl
)
```
- [vimrc](https://github.com/amix/vimrc) — This configuration is the ultimate vimrc.
- [vim-plug](https://github.com/junegunn/vim-plug) — Plugins management.
- [vim languages pack](https://github.com/sheerun/vim-polyglot)
- [vim syntax checker](https://github.com/w0rp/ale) 

```sh
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](https://www.docker.com/)
- [docker-compose](https://github.com/docker/compose)
- [minikube](https://github.com/kubernetes/minikube)
- [skaffold](https://github.com/GoogleContainerTools/skaffold/) A command line tool that facilitates continuous development for Kubernetes applications. 
- [kompose](https://github.com/kubernetes/kompose) Converts Docker Compose to Kubernetes.
- [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/#install-kubectl) Command line interface for running commands against Kubernetes clusters.
- [kubectx](https://github.com/ahmetb/kubect) Fast way to switch between clusters and namespaces in kubectl.
- [kubeval](https://github.com/garethr/kubeval) Validate your Kubernetes configuration files, supports multiple Kubernetes versions.
- [dive](https://github.com/wagoodman/dive) A tool for exploring each layer in a docker image

#### Utilities Dev Tools
- [fd](https://github.com/sharkdp/fd/releases) - A simple, fast and user-friendly alternative to 'find'.
- [cheat.sh](https://github.com/chubin/cheat.sh#installation) The only cheat sheet you need.
- [httpie](https://github.com/jakubroztocil/httpie) — Modern command line HTTP client — user-friendly curl alternative with intuitive UI, JSON support, syntax highlighting, wget-like downloads, extensions, etc.
- [postman](https://www.getpostman.com/) Postman Makes API Development Simple.
- [ngrok](https://ngrok.com/download) or [localtunnel](https://github.com/localtunnel/localtunnel) Exposes your localhost to the world for easy testing and sharing.
- [pet](https://github.com/knqyf263/pet) — Simple command-line snippet manager.
- [tmux](https://tmux.github.io/) — Terminal multiplexer.
- [tmux config](https://github.com/gpakosz/.tmux) — The best tmux configuration.
- [mycli](https://github.com/dbcli/mycli) — A Terminal Client for MySQL with AutoCompletion and Syntax Highlighting.
- [json-server](https://github.com/typicode/json-server) — Get a full fake REST API with zero coding in less than 30 seconds.
- [vegeta](https://github.com/tsenart/vegeta) HTTP load testing tool and library.
- [mkcert](https://github.com/FiloSottile/mkcert) A simple zero-config tool to make locally trusted development certificates with any names you'd like.
- [doctoc](https://github.com/thlorenz/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:

```sh
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.