Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Help needed editing a .conf file using vi or nano

  • 21-05-2012 02:00PM
    #1
    Registered Users, Registered Users 2 Posts: 95 ✭✭


    I want to enable ipv6 Privacy Addresses [aka Privacy Extensions] on Snow Leopard.

    I've read that the way to do it is:
    sysctl -w net.inet6.ip6.use_tempaddr=1
    
    I tried entering that in Terminal but it spat back "Operation not permitted"

    Looking further [here, here and here] it seems that I have to create a file /etc/sysctl.conf, and then add net.inet6.ip6.use_tempaddr=1 to that file.

    The thing is I have no idea how to do that with vi or nano. [I have no idea how to use vi or nano]

    For example if I follow these instructions on unixfu.ch

    It says entering
    sudo vi /etc/sysctl.conf
    
    will create the /etc/sysctl.conf. But I don't understand how to do the second part, putting
    net.inet6.ip6.use_tempaddr=1
    
    into the sysctl.conf file.

    Any help appreciated. Thanks.


Comments

  • Registered Users, Registered Users 2 Posts: 11,264 ✭✭✭✭jester77


    You would probably find nano easier to use as vi can be a bit complicated for the novice user.
    sudo nano /etc/sysctl.conf
    

    Then you can easily just paste in the code you want, right click paste or ctrl+v.

    Hit Ctrl+o to save
    and Ctrl+x to exit


  • Registered Users, Registered Users 2 Posts: 95 ✭✭firkin


    jester77, thanks for the reply.

    I'm a tiny bit stuck !!
    I followed your instructions. I tried Crtl+v to paste but that didn't work so I tried Cmd+v and that pasted.
    crtl+o seems to have worked too. The window kind of changed and it says File Name to Write /etc/sysctl.conf

    But, when I try crtl+x to save nothing happens. Should I try cmd+x ?


  • Registered Users, Registered Users 2 Posts: 11,264 ✭✭✭✭jester77


    firkin wrote: »
    jester77, thanks for the reply.

    I'm a tiny bit stuck !!
    I followed your instructions. I tried Crtl+v to paste but that didn't work so I tried Cmd+v and that pasted.
    crtl+o seems to have worked too. The window kind of changed and it says File Name to Write /etc/sysctl.conf

    But, when I try crtl+x to save nothing happens. Should I try cmd+x ?

    When you get the prompt File Name to Write /etc/sysctl.conf, just hit enter and you will see a prompt showing "Wrote x line", x being the number of lines in the file. The file is now saved to your system. Ctrl+x is just for exiting out of Nano.

    You can then type
    cat /etc/sysctl.conf
    

    to show the contents of the file and confirm that it was written to.


  • Registered Users, Registered Users 2 Posts: 95 ✭✭firkin


    Perfect. Job done. Thank you. :)

    I was a little unsure of my self there. Really sorry for PM-ing you over this.

    Thanks again.


Advertisement