change ip linux code example
Example 1: change ip of ubuntu
sudo ip link set dev eth0 up
sudo dhclient -v eth0
Example 2: new ip linux
Get new ip from DHCP (If not working, check your connection to router)
//Release ip
sudo dhclient -r [Interface name](optional)
//Renew ip
sudo dhclient [Interface name](optional)