These days cheap internet options are available in the market . Linux support all of the internet connectivity options without any issue . You can choose from wire ,wireless or whatever option suit you .
Some people think that configuring Internet on Linux platform is a bit complicated task, but that's not true. Here is this post I will discuss some basic commands that will help you to setup Internet connection for your Linux box. This post will also help you to understand internet connectivity troubleshooting for Linux Host.
- Ensure that Default Gateway is properly configured on your system . To view the current Default Gateway setting, you can use route -n command as mentioned below.
Here in the above given example output , highlighted IP 192.168.122.1 is the Default Gateway . Whatever Gateway mentioned for network 0.0.0.0 will work as Default gateway. In the above given output of route command 192.168.122.1 mentioned as gateway for network 0.0.0.0
- Once you get detail of your Linux Box Default Gateway , Check the connectivity with Default Gateway using ping command. For example in above given example Default Gateway is 192.168.122.1
You can notice in our given example , Linux box pinging Default Gateway without any error. If suppose you are getting Request Timeout error in that case it is advisable to use traceroute command to find out point of blocking.
- Once you become sure that Default Gateway is accessible and responding then you can proceed to test DNS Client configuration. You can check /etc/resolv.conf for DNS Configuration.
In our example , DNS Server is 192.168.122.100 and 192.168.122.101 . You can view and edit your DNS settings using file /etc/resolv.conf. After DNS setting you can check if DNS Server is responding queries generating from your Linux host . To query DNS Server , we can use dig or nslookup command.
Above given steps will allow you to test connectivity with Default Gateway and DNS . I suggest you to take any cheap internet connection for your Linux box and enjoy safe and fast internet.



