How to Update Host File at MacOS

2022/11/031 min read
bookmark this
Responsive image

Table of Contents

  1. Introduction
  2. Terminal

Introduction

This is simple memo of how to change host file at MacOS.

Terminal

Type below command line at a terminal via MacOS.

nano /etc/hosts

Once opened the host file, add new line similar to below. This is tell your current MacOS, whenever you type the http://my.local.hostname will go to your http://127.0.0.1 or http:localhost.

127.0.0.1 my.local.hostname