# Find default gateway in terminal



## macshaun (Dec 1, 2008)

Hi All,

Currently running OSX 10.5 and was wondering if anyone knows how to find your gateway address in Terminal?  IFCONFIG only appears to show the IP address.  I know you can find it via System Preferences > Network but would like to know if it is possible to find it via terminal.


----------



## macbri (Dec 1, 2008)

Try:


```
netstat -nr
```
 or 
	
	



```
netstat -nr | grep '^default'
```


----------



## macshaun (Dec 1, 2008)

Thanks for that.


----------

