How to enable VMWare internet access

Lot of times when you just completed installation of an linux OS in a VM, you will find that you cannot access internet. There are two scenarios:

  1. The host machine doesn’t need a proxy. In this way, please check if the network item on the upper right corner of VM is enabled. If not, enabling it should solve this issue.
  2. The host machine is behind a proxy. In this scenario, you need to install cntlm. Do the usual steps of cntlm configuration and set up http_proxy environment.
    To set up http_proxy to all users, edit file /etc/profile to add line:
    export http_proxy=http://<hostname>:<portnumber>/, then try the following command to verify if it is successful:
    wget http://www.google.com. If the page is successfully downloaded then congratulations; otherwise check your cntlm.conf file to see if the configuration is correct.