Configuring network-settings in the shell

Posted:
in Genius Bar edited January 2014
How is it done? What commands do I use to print out my current network settings like IP and Name-servers, and what commands do I use to edit them from the terminal?

Comments

  • Reply 1 of 2
    dobbydobby Posts: 797member
    $ ifconfig -a (shows your NICs and ip/mask/broadcast)

    $ netstat -rn (shows routes including default)



    $ nslookup

    > set all (prints out DNS details if entered)

    > exit



    $ ifconfig en0 10.10.10.20 netmask 255.255.255.128 broadcast 10.10.10.127 (this will config your NIC to the ip address 10.10.10.20 with a 25bit mask).



    Dobby.



    [ 09-12-2002: Message edited by: dobby ]</p>
  • Reply 2 of 2
    defiantdefiant Posts: 4,876member
    also look at the man pages: (just type in the text below an hit return)



    [code]man ifconfig

    man netstat

    man nslookup</pre><hr></blockquote>
Sign In or Register to comment.