The Android operating system supports usage of Android phones as an Internet modem for Personal computer or laptops. This facility of sharing the Internet connection of Android phone with a laptop or PC through a USB cable is called USB tethering. It supports most of major operating systems.
In Linux:
In Linux you just have to enable 'packet data' in phone first, connect phone with PC or laptop through USB data cable and check the option '
USB tethering' in Settings. It is somewhere within USB settings or Wifi and network settings. The place of this option may vary from phone to phone.In my phone (Ssmsung Galaxy S Advance, GT-I9070) , it is found as follows:
Settings-> Wireless and Neetwork->Tethering and Portable Hotspot-> USB tethering. Check the option
'USB Tethering'. When 'USB tethering' is enabled, your Linux OS will automatically install the 'Remote NDIS based Internet sharing' driver. and your computer will automatically connect to internet within a few minutes.
Windows XP: