Cách sửa file hosts trên Mac & Windows (có thể dùng để test web mà không ảnh hưởng đến production site – chặn truy cập 1 site nào đó trên máy tính…)

1. Trên Mac: 

+ mở terminal 

+ Sử dụng lệnh: sudo nano /private/etc/hosts => nhập password máy

+ nhập ip & domain vào => control + X => confirm: Y 

2. Trên windows: 

Windows => run: C:\Windows\System32\drivers\etc => mở file hosts bằng notepad => sau đó sửa và save lại. 

Chú ý: Nếu không sử dụng dòng nào thì uncomment dòng đó chứ không cần thiết phải xoá

Leave a Reply

Your email address will not be published. Required fields are marked *