Depending on Linux distros there be might few different ways to configured network interfaces. In a perfect world there would be only one way to do it 🙂
So the below may work at the time of writing or it may change in the the future. Based on what we got at the moment the below should be correct and should allow you to configure your network.
If you are using a VMWARE or Virtual Box I am recommending to change the network card settings into bridged instead of NAT due to some limitation.
As always please leave comments or questions or let me know if you know a better way of configuring it so we can benefit together from it!
1. Redhat based distros (CentOS, Fedora)
edit manually file in
#vim /etc/sysconfig/network-scripts/ifcfg-eth0 (or eth1)
2. Ubuntu Based Distros
you can now configure your network card
iface eth0 intet static (or dhcp)
Please see pictures above for more info:)
then you can issue
ifconfig eth0 down && ifconfig eth0 up
As long as you are using virtual enviroment you can quickly restart VM’s to see if your desired configuration is in place.
More reading can be done here on this subject: