I have just shown a Turnkey Linux Rails (VirtualBox edition) to my RoR developer friend. He really enjoyed using it, however after a few days he mentioned that he had a problem – every time he moved his laptop to a different network, he needed to restart Linux in orded to detect the proper IP through bridged network card connection. This is a distinct loss of time!
There is a simple command to renew (restart, or rather reflush) the ethernet connection, that will result in the renewing of DHPC IP. Assuming your network connection is eth0 (you can check it with ifconfig command), just type:
ifdown eth0 ifup eth0
And that’s all! The new IP would be printed in the output of the last command.
lipiec 25th, 2011
Tags: linux, tips&tricks