Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use Ubuntu 12.04 (64-bit) as host OS and Windows 7 as guest OS. How can I ping the Windows 7 system from Ubuntu? And is that possible even when Internet is off?

share|improve this question
up vote 5 down vote accepted

Assuming you can use the Windows 7 guest system, check its IP address. One way to do that in Windows is to open a Command Prompt (type cmd.exe in the textbox in the Start menu) and run ipconfig.

You may be told about IP addresses on multiple interfaces.

Now try pinging them from the Ubuntu system by opening a Terminal window on the Ubuntu system (Ctrl+Alt+T) and using the ping command. For example:

ping -c 5

Replace with the IP address obtained from the Windows system with ipconfig. The -c 5 part tells ping to send 5 pings, then stop. (You can change that to whatever you want, or leave off the -c flag altogether and it will continue pinging until you stop it with Ctrl+C.)

You can repeat that with the other IP addresses, if you got more than one IP address from ipconfig in Windows. But don't ping IP address always refers to the local computer. (So if you ping from your Ubuntu host machine, you're pinging your Ubuntu host machine, not the Windows guest machine.)

Please note that by default, all recent (in fact, all non-EoL) versions of Windows have a firewall enabled that blocks pings. You can turn this firewall off or customize it so it does, though. Details about how to do this would probably be considered off-topic for AskUbuntu (but on-topic for a Windows forum or a general computing support site).

This will work without Internet access, but this will not work without a network connecting the host machine to the guest machine. If you have a router that provides IP addresses via DHCP and also Internet access, and you turn that router off, then (unless the host and guest still remember their old IP's), this will not work.

But you can always set up a "host-only" network between the Windows virtual machine and the Ubuntu host machine in VirtualBox. This will permit pinging and other network activity between the host and guest machines even when there is no other network connection. To do this, click Devices > Network Adapters in the menu bar at the top of the VirtualBox virtual machine window, then select Host-only Adapter in the Attached to drop-down menu.

A VirtualBox VM's network settings, showing the "Host-only Adapter" option in the "Attached to" drop-down menu

While in the above screenshot, I am changing the setting for the single network adapter (thus disabling access to whatever other network there might be), the network settings window shown above also lets you enable another network adapter (you can have up to four easily) and make it "Host-only." Just click Adapter 2.

share|improve this answer
thank you very much ! – bragboy Aug 16 '12 at 20:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.