🕵️ SicherheitslückenHak5: Hackers Just Poisoned the Rust Supply Chain | Threat Wire(01.09.2026 um 14:00 Uhr)
🕵️ SicherheitslückenHak5: Hackers Found a Way Into Humanoid Robots | Threat Wire(04.09.2026 um 15:04 Uhr)
🔧 AI Nachrichten Bits und so #1021 (Passwort für Laufwerk)(31.08.2026 um 22:15 Uhr)
🔧 AI Nachrichten Bits und so #1022 (Wie Weißbier)(06.09.2026 um 20:39 Uhr)
🍏 iOS / Mac OSHue-App 6.0 ist da: das sind die Neuerungen(07.09.2026 um 17:21 Uhr)
🕵️ SicherheitslückenHak5: Hackers Just Poisoned the Rust Supply Chain | Threat Wire(01.09.2026 um 14:00 Uhr)
🕵️ SicherheitslückenHak5: Hackers Found a Way Into Humanoid Robots | Threat Wire(04.09.2026 um 15:04 Uhr)
🔧 AI Nachrichten Bits und so #1021 (Passwort für Laufwerk)(31.08.2026 um 22:15 Uhr)
🔧 AI Nachrichten Bits und so #1022 (Wie Weißbier)(06.09.2026 um 20:39 Uhr)
🍏 iOS / Mac OSHue-App 6.0 ist da: das sind die Neuerungen(07.09.2026 um 17:21 Uhr)

🔧 Programmierung 🕛 kürzlich 2 Min Lesezeit
0

Where is the hosts file on Mac, Windows, and Linux?

↗ Quelle (dev.to)
🗣️ Stimme:
📑 Inhaltsübersicht

You need to open the hosts file. You already know why. You just cannot remember the path.



Here it is for each OS, plus how to open it without fighting permissions.






Paths
























OS Path
macOS /etc/hosts
Linux /etc/hosts
Windows C:\Windows\System32\drivers\etc\hosts


On Unix systems /etc/hosts is often a symlink into the real file. Edit the path above. Do not hunt for a second copy in your home folder.






Open it on macOS



Terminal:




CODE
sudo nano /etc/hosts






Or open it in your editor with elevated rights:




CODE
sudo code /etc/hosts
# or
sudo vim /etc/hosts






Save, then flush DNS:




CODE
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder






Finder will not let you edit /etc casually. Use the terminal or an editor launched with sudo.






Open it on Windows




  1. Open Notepad as Administrator

  2. File → Open

  3. Go to C:\Windows\System32\drivers\etc\

  4. Change the file type filter to All Files

  5. Open hosts



Without admin rights Windows will open the file but refuse to save.



Then flush DNS:




CODE
ipconfig /flushdns









Open it on Linux






CODE
sudo nano /etc/hosts
# or
sudo vim /etc/hosts






Flush depends on the stack. Common options:




CODE
sudo resolvectl flush-caches
# or
sudo systemd-resolve --flush-caches









What a normal line looks like






CODE
127.0.0.1   localhost
127.0.0.1 myapp.test
# 203.0.113.10 staging.example.com






Rules that save time:




  • IP first, hostname second

  • Spaces or tabs both work


  • # comments out the rest of the line

  • One hostname per line is easier to read than a long list






Quick check after editing






CODE
# macOS / Linux
ping -c 1 myapp.test
# or
getent hosts myapp.test






Windows:




CODE
ping myapp.test






If the IP in the reply is wrong, the hosts line did not apply yet. Flush DNS and try again before changing the app.






Common mistakes




  • Editing a copy in Downloads instead of the system file

  • Saving without admin rights (Windows especially)

  • Leaving a # in front of the line you meant to enable

  • Forgetting the DNS flush

  • Using a real public TLD like .com for local names when .test would avoid surprises



Bookmark the path for your OS. You will need it again.






If you switch hosts a lot, a small desktop manager helps keep profiles and DNS flush in one place: Locahl.

Vollständiger Original-Bericht
Ausführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to.
↗ Original-Artikel auf dev.to lesen
Wie bewertest du diesen Beitrag?
1 Klick Feedback
Teilen mit Netzwerk & Team:

Community-Analysen & Experten-Meinungen 0

Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
Community Pulse: Relevanz-Einschätzung
1 Klick Experten-Votum
🔴 Akute Relevanz 0%
🟡 In Evaluierung 0%
🟢 Keine Auswirkung 0%
Spannende Innovation 0%
Verwandte Story-Cluster & Quellen (Vektor-KI)
Port 8095 Engine
1 Quelle
Hackers Just Poisoned the Rust Supply Chain | Threat Wire
1 Quelle
Hackers Found a Way Into Humanoid Robots | Threat Wire
1 Quelle
Bits und so #1021 (Passwort für Laufwerk)
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Where is the hosts file on Mac, Windows, and Linux?

Thematisch verwandte Begriffe: Where, hosts, file, Windows · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...