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.