Edit hosts file on OSX

  05/06/2017

I had to modify local hosts file on OSX many times and it’s not just about edit and save because it requires few more things before and after.

To properly edit the hosts file on OSX, first you need to get super user access, then to remove protection from hosts file with chflags, edit hosts file and save, flush DNS cache (optional), and to set back the hosts file as protected (otherwise it will not work).

sudo su –
chflags nouchg /private/etc/hosts
sudo nano /private/etc/hosts
sudo killall -HUP mDNSResponder
chflags uchg /private/etc/hosts


Weather Forecast – Belgrade

23/03
Sat
weather - icon
Clear
17°C
24/03
Sun
weather - icon
Clear
14°C
25/03
Mon
weather - icon
Clear
17°C
26/03
Tue
weather - icon
Rain
10°C
27/03
Wed
weather - icon
Rain
9°C
28/03
Thu
weather - icon
Clear
9°C
29/03
Fri
weather - icon
Clear
10°C

Powered by OpenWeatherMap | by Phee

RSS Laracasts

  • Invited Users May Not Delete Projects 22/03/2019
    It looks like we have a small hiccup. At the moment, any invited user has permission to delete the project entirely. This action should be restricted to the owner of the project exclusively. View the source code for this episode on GitHub.
    Jeffrey Way
  • General Page Styling 21/03/2019
    With the basic structure in place, we can now move on to general page styling and tweaks. View the source code for this episode on GitHub.
    Jeffrey Way
  • Validation Errors For Multiple Forms 20/03/2019
    Once you add multiple forms to a page, you'll quickly find that you can no longer depend on the default validation errors "bag." In this episode, we'll learn how to associate your form request class with a named error bag. View the source code for this episode on GitHub.
    Jeffrey Way
  • 404 Pages 18/03/2019
    What if the user visits a URI that doesn't exist? At the moment, they'll see a blank page. Not good. Let's fix that by creating a NotFound component. View the source code for this episode on GitHub.
    Jeffrey Way
  • One Component Per Page 18/03/2019
    We'll take a one-component-per-page approach to this website. This means, for each link in the sidebar, we need to create a companion Vue component. When finished, we'll review how to apply "active link" styling to the currently selected page. View the source code for this episode on GitHub.
    Jeffrey Way

Contact