sometime Ubuntu Server installer is set to use DHCP, and later You want to change it Static IP, so that people can access it and it would not dynamically assigned ip.
Server usually don’t have GUI interface so we need to do it using bash commands.
Let’s open up the /etc/network/interfaces file. I’m going to use my favourite editor vi, but you can choose your own.
sudo vi /etc/network/interfaces