How to Disable IPv6 in Ubuntu Server 18.04/16.4 LTS

This tutorial explains how to disable IPv6 in Ubuntu 18.04/16.04 (compatible with both Ubuntu server and Desktop version). There are a couple of ways we can disable IPv6 on Ubuntu server. One method is to turn off IPv6 using sysctl, the second method is to edit the grub config file. We will look at both methods.