10

I have installed Ubuntu Server 14.04.1 LTS in VirtualBox. I would like to get the I.P address, and according to https://askubuntu.com/a/430855/192526, you do so with

ip addr show

It says

inet 127.0.0.1/8 scope host

So it would seem like I have an issue with my network adapter. However, I don't really know what settings am I supposed to be using:

enter image description here

What do I do to be able to get my actual I.P address from Ubuntu Server running in VirtualBox for Mac OSX?

I ask this because eventually I will want to setup an NTP server, and I imagine that a remote computer will need the I.P address of my Ubuntu Server.


By request, here is what ifconfig says:

enter image description here


Another curious thing:

When booting, there is a message saying

Waiting for network configuration...

that lasts for quite a long while until it apparently gives up saying

Booting system without full network configuration

Saturn
  • 223
  • 1
  • 3
  • 7

2 Answers2

6

You don't have an IP address because you have not configured one. To do so you need to edit /etc/network/interfaces. If you want one to be obtained automatically, add eth0 to the auto line in the file, and add a new line for it that reads iface eth0 inet dhcp. You can then reboot or run sudo ifup -a to bring up the interface and obtain the IP address. See man interfaces for more information.

psusi
  • 37,551
  • 1
    I have opened the file, and turns out that the modifications were already there. I executed sudo ifup -a, but the resulting I.P seems to still be the localhost. I should mention that, when booting, there is a message saying Waiting for network configuration... that lasts for quite a long while until it apparently gives up saying Booting system without full network configuration – Saturn Dec 02 '14 at 00:56
  • Could it possibly be that those lines are the conflict? I know that a Network manager cannot manage the device if it is set in /etc/network/interfaces. – Robobenklein Dec 02 '14 at 01:01
  • @robobenklein, network manager isn't used in a text mode server install. – psusi Dec 02 '14 at 01:17
  • I've searched about the Booting without full network config thing, and this page http://sandilands.info/sgordon/old-creating-a-virtual-network-of-linux-guests says I should modify some lines of 70-persistent-net.rules. However, my file is completely empty. – Saturn Dec 02 '14 at 01:23
  • @psusi Yes, I know that, but I'm talking about the equivalent management done when the device is never specified in /etc/network/interfaces. – Robobenklein Dec 02 '14 at 01:38
  • @robobenklein, there isn't any equivalent management. Either you have network manager installed, or you configure it in /etc/network/interfaces. – psusi Dec 02 '14 at 01:52
  • @psusi Interesting enough, new question about it: http://askubuntu.com/questions/555608/how-is-a-device-managed-when-not-in-etc-network-interfaces-on-servers – Robobenklein Dec 02 '14 at 02:03
3

I used "About This Computer..." menu item to get computer's name and later ping command to get its IP. I hope this will be helpful for you. enter image description here

QtRoS
  • 130
  • 1
    hmm... dunno but on 18.04 that is gone..... where the heck it is and why in the fucking hell they keep making these annoying change ? Are microsoft engineers involved in this ? Click on the top left (Activities) then type "About this " to search and there it will be. – AlexD May 24 '19 at 15:54