The process of the configuration of static IP address in Ubuntu is as follows:
$ sudo vim /etc/network/interfaces
![](http://images0.cnblogs.com/blog2015/383115/201505/142304181266824.png)
2. ```
$ sudo vim /etc/resolv.conf
$ sudo vim /etc/resolvconf/resolv.conf.d/base
Add the following lines:
nameserver 159.226.7.254
nameserver 8.8.8.8
4. ```
$ sudo /etc/init.d/networking restart
References: