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

26/01
Sun
weather - icon
Clouds
6°C
27/01
Mon
weather - icon
Rain
5°C
28/01
Tue
weather - icon
Rain
6°C
29/01
Wed
weather - icon
Rain
7°C
30/01
Thu
weather - icon
Clouds
6°C
31/01
Fri
weather - icon
Clouds
5°C
01/02
Sat
weather - icon
Clouds
6°C

Powered by OpenWeatherMap | by Phee

RSS Laracasts

  • Object Composition and Abstractions 23/01/2020
    Let's move on to object composition. To break it down into the simplest of terms, composition is when one object holds a pointer to another object. This allows us to construct complex functionality by combining various types.
    Jeffrey Way
  • FizzBuzz Kata 22/01/2020
    Next up is the obligatory FizzBuzz kata, which I think you'll find is quite a bit easier than previous exercises. This is especially true, now that we've built up our TDD chops. View the source code for this episode on GitHub.
    Jeffrey Way
  • Send SMS Notifications in 5 Minutes 21/01/2020
    Here's a fun exercise. For this next notification channel, we'll choose one that I've personally never used: SMS messaging. As you'll see, even with no prior experience, it's still laughably simple to conditionally fire off text messages to the users of your application.
    Jeffrey Way
  • Tips for Simplifying Laravel Controllers 20/01/2020
    In this lesson, Freek Van der Herten stops by to demonstrate several tips for simplifying your controllers.
    Jeffrey Way
  • Encapsulation 17/01/2020
    Encapsulation allows a class to provide signals to the outside world that certain internals are private and shouldn't be accessed. So at it's core, encapsulation is about communication.
    Jeffrey Way

Latest Tweets