Benches macOS

3

how do i find & access the /private/etc/ …

apple Verified

Imported from the Apple Support Forums via the Wayback Machine 🔗

I'm logged in as Root, and i need to find the /private/etc/hosts file, as i have to check the text is correct for a new application that is having problems.

However, I am not a unix user and have no idea how to find or access this file. I have looked on my other computer but that is always accessed through the go to folder option, and it gives me no clue how its finding the file.

any advice would be very useful.

thanks

Adam

Message was edited by: adam taylor1

3 replies

Sign in or join Beachball Help to reply.

  1. 0

    Camelot

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    You can get to it via the Finer's Go To Folder option - just choose the 'Go To Folder' menu option and enter /private/etc

    However, you probably won't (and shouldn't) be able to edit that file if you're logged in as a regular user since it's a protected system file. Only the root user can edit this. That's OK if you're just viewing it, but you can't make any changes.

    If you need to use the GUI to do this, then you'll need to log in as root before trying to edit the file.

    Alternatively you can do it in the command line via the
    sudo command, which will temporarily elevate your privileges. However, that requires the use of the command line, and it sounds like that's new to you. Let me know if you need to make changes and I'll come up with a plan.

  2. 0

    Tom Keep

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    open terminal and try:

    open /private/etc/

    which opens the etc directory or if you want to open the hosts file:

    open /private/etc/hosts

  3. 0

    adam taylor1

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Thanks guys, it seems i was doing the right thing all along. All i needed do was reboot and suddenly it started to recognise my requests!

    regards

    Adam