can i run localhost in virtual machines if i enabled it in windows

+1 vote

if i enable local host  on my main windows OS, then will I be able to use the same in virtual machine on kali Linux speciallly? if yes,  then how to do it & if no then, how to enable it in virtual machine on kali Linux?

May 26, 2020 in Cyber Security & Ethical Hacking by Soujanya
• 130 points

edited May 26, 2020 by Soujanya 1,712 views

1 answer to this question.

0 votes

Hi, @Soujanya,

Windows has its "own" localhost, so you have to "help" it find Ubuntu's one.

In your virtual machine, go to this IP http://10.0.2.2/ and it should work. You can edit the Windows host file to make the localhost point to that IP so you don't have to remember it.

In: C:\Windows\System32\drivers\etc\hosts

Add:

10.0.2.2 localhost
answered May 26, 2020 by Gitika
• 65,770 points
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP