Skip to contentGo to the directory tree
FileRisk: Caution

networks C:\Windows\System32\drivers\etc\networks

Unix-inherited text file mapping names to IP network addresses; rarely used and typically holds only comments or samples.

Updated on By AltF4 Formation

What it’s for

networks maps a name to an IP network address, where hosts maps a name to a host. The file comes from Unix and Windows barely uses it: you will almost never touch it.

What it contains

  • Lines of the form name network-address [alias], for example loopback 127.
  • Usually just the comment header, and at best a sample entry.

Risks and best practices

  • Editing this file changes nothing useful for Windows networking, and it needs administrator rights.
  • Entries you did not add are abnormal. Check them as you would those in hosts.

Useful commands

Fenêtre de terminal
# Active entries, without comments
Get-Content "$env:windir\System32\drivers\etc\networks" | Where-Object { $_ -notmatch '^\s*#' -and $_.Trim() }

Report a mistake