Follow us on...
Follow us on Twitter Follow us on Facebook
Register
Results 1 to 3 of 3
  1. #1
    macshaun is offline Registered User
    Join Date
    Mar 2007
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Find default gateway in terminal

    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.

  2. #2
    macbri's Avatar
    macbri is offline Mac (r)evolution
    Join Date
    Jun 2005
    Location
    One of these days, Alice....
    Posts
    311
    Thanks
    3
    Thanked 6 Times in 5 Posts
    Try:

    Code:
    netstat -nr
    or
    Code:
    netstat -nr | grep '^default'

  3. #3
    macshaun is offline Registered User
    Join Date
    Mar 2007
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for that.

 

 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •