Editing Files Owned by Root in /etc

Discussion in 'macOS' started by Avellinese, Sep 21, 2012.

  1. Avellinese macrumors newbie

    Sep 21, 2012
    I use a terminal window to ssh to a remote server. The connection gets terminated after a short period of inactivity. I searched and found that I can solve this problem by editing a configuration file in /etc. But when I try to do that using emacs, it opens in "read-only" mode--the file is owned by the root account. How can I edit this file? Thanks for any help you can provide.
  2. waynep macrumors 6502

    Dec 31, 2009
    When you edit the file, you can preceded the command with "su". You'll have to have root credentials.

    ie: su edit filename

Share This Page