Linux: How To Find the Default Gateway

Home -> UNIX -> Linux -> Network Administration

4286 views

From the computer of: shamanstears (690 recipes)
Created: Jan 03, 2008     Updated: Jan 06, 2008


Add a comment

Add to:
Add to stumbleuponAdd to del.icio.usDigg itAdd to FURL

Whether you're troubleshooting network problems or trying to set up a VPN, knowing what address your computer has configured as the default gateway is always useful. Running a simple command from the terminal can give you this.

1. Open a terminal window.

2. Input the following command and hit Enter:

route -n



3. The address contained in the last line (with the UG flag) is the address for your default gateway.

Subscribe to the Tech-Recipes Newsletter

You can get tips like this delivered in your email every week!

Enter your Email

We will never, ever sell your email address or spam you.





Related recipes:

  RedHat Linux IP Forwarding
  Disable ICMP echo (ping) responses in Linux
  Force the speed and duplex of a Linux ethernet interface
  Determine Linux ethernet interface speed and duplex

 

Sponsored links

 

Login

Nickname

Password

Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.