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

25/05
Fri
weather - icon
Rain
23°C
26/05
Sat
weather - icon
Clouds
24°C
27/05
Sun
weather - icon
Clouds
25°C
28/05
Mon
weather - icon
Rain
27°C
29/05
Tue
weather - icon
Clear
26°C
30/05
Wed
weather - icon
Clear
26°C
31/05
Thu
weather - icon
Clear
29°C

Powered by OpenWeatherMap | by Phee

RSS Laracasts

  • Reusability 24/05/2018
    In the Modern CSS for Backend Developers, one of the lessons focused on constructing both the CSS and JavaScript for an accordion-like component. In this episode, we'll review the Vue-specific code we wrote in that lesson, and review how we can make it more agnostic and reusable.
    Jeffrey Way
  • Pricing Selection Design 22/05/2018
    Most sites like Laracasts include a pricing page that lists all available plans. Using a prototype design, let's, from scratch, convert it to HTML and CSS.
    Jeffrey Way
  • Final Tweaks 17/05/2018
    Now that anyone can pull in our preset, let's make a few final tweaks and call it a series! View the source code for this episode on GitHub.
    Jeffrey Way
  • Distribute a Composer Package 17/05/2018
    Now that our preset is mostly complete, the next step is to distribute it as a reusable Composer package. Don't worry, it's easy. View the source code for this episode on GitHub.
    Jeffrey Way
  • Stubs 17/05/2018
    In this episode, we'll create a handful of stubs. In this context, a stub is simply a placeholder file that is constructed exactly as we wish for it to appear in our project.
    Jeffrey Way

Contact