Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

editing hosts file via Terminal with zsh

I have a few questions please related to using Terminal to edit my hosts file on Catalina.


Background: I use Terminal for only one task and it is very useful to me as a web developer. I occasionally edit the hosts file, when I want to work with a website that is not live yet by pointing a specific url to the IP address of the new web host.


Now when I go to Terminal it says:


The default interactive shell is now zsh.

To update your account to use zsh, please run `chsh -s /bin/zsh`.


My questions:


  1. Should I run that command to "update my account"?
  2. Can I use the same commands and steps as I have been using (see below) to accomplish what I use it for?


These are the steps I have been taking:


  1. sudo nano /etc/hosts
  2. Add or edit entry
  3. Save changes: ctrl+o  (then hit Enter)
  4. Exit nano: ctrl+x  (then hit Enter)
  5. Flush: dscacheutil -flushcache


Thanks so much for your help.


David

MacBook Pro

Posted on Aug 29, 2020 6:12 PM

Reply
Question marked as Best reply

Posted on Aug 29, 2020 6:49 PM

Yes and yes

Similar questions

2 replies

editing hosts file via Terminal with zsh

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.