i had a machine in virtualbox running ubuntu linux, i dont know why the internet was not working. i checked my network and one of the interfaces was connected with NAT.

I could not ping anywhere, the i wanted  to check what ip address i had from my DHCP. i send this command:

ifconfig

thats when i got this error:

the program ifconfig is currently not installed

the solution is simple, just run this command:

sudo apt install net-tools

thats it, that was very simple, after that for some reason my internet worked.