diff --git a/src/archive/tar/stat_unix.go b/src/archive/tar/stat_unix.go
index 717a0b3abc7246a50207378bbba81424ce155dcc..0f3428bc24b47d3683ace47bd38bd0548f7d5dd7 100644
--- a/src/archive/tar/stat_unix.go
+++ b/src/archive/tar/stat_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || linux || darwin || dragonfly || freebsd || openbsd || netbsd || solaris
+//go:build unix
 
 package tar
 
diff --git a/src/cmd/go/internal/base/signal_unix.go b/src/cmd/go/internal/base/signal_unix.go
index 657ff38584104201de727e67d74f50ce798df8b1..f198df6abcdbc54ffee75fd2ff7d32cde43517de 100644
--- a/src/cmd/go/internal/base/signal_unix.go
+++ b/src/cmd/go/internal/base/signal_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || js || linux || netbsd || openbsd || solaris
+//go:build unix || js
 
 package base
 
diff --git a/src/cmd/go/internal/lockedfile/internal/filelock/filelock_other.go b/src/cmd/go/internal/lockedfile/internal/filelock/filelock_other.go
index 491bec39af935468b0fb7541e5faeb3c1c4dcfae..c18dbdf8503ad1df507ff7c11e98e47e3520cbc2 100644
--- a/src/cmd/go/internal/lockedfile/internal/filelock/filelock_other.go
+++ b/src/cmd/go/internal/lockedfile/internal/filelock/filelock_other.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !plan9 && !solaris && !windows
+//go:build !unix && !plan9 && !windows
 
 package filelock
 
diff --git a/src/cmd/go/internal/modload/stat_unix.go b/src/cmd/go/internal/modload/stat_unix.go
index 8a3653ba80b019ae0394540b2291cffe21699850..a0d5f4d2476ed122615e3a15e8610b1ed92232e6 100644
--- a/src/cmd/go/internal/modload/stat_unix.go
+++ b/src/cmd/go/internal/modload/stat_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
+//go:build unix
 
 package modload
 
diff --git a/src/cmd/go/stop_other_test.go b/src/cmd/go/stop_other_test.go
index 35c12858c1d5e1d36772a0285313c410b7643058..cb4569b91d4a7791761830e8b2cbc05ae7b89a39 100644
--- a/src/cmd/go/stop_other_test.go
+++ b/src/cmd/go/stop_other_test.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build !(aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris)
+//go:build !(unix || (js && wasm))
 
 package main_test
 
diff --git a/src/cmd/go/stop_unix_test.go b/src/cmd/go/stop_unix_test.go
index 5939f0d40d996777493cc6f64263ed340d71029e..baa1427465d796e918cb8d776092e95d39e6e1be 100644
--- a/src/cmd/go/stop_unix_test.go
+++ b/src/cmd/go/stop_unix_test.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris
+//go:build unix || (js && wasm)
 
 package main_test
 
diff --git a/src/crypto/rand/rand_unix.go b/src/crypto/rand/rand_unix.go
index b800ec8fb798df1d15af7609cf23258baa55597f..58c97649c47eb0f60f047565f0ec22328f2919f9 100644
--- a/src/crypto/rand/rand_unix.go
+++ b/src/crypto/rand/rand_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
+//go:build unix
 
 // Unix cryptographically secure pseudorandom number
 // generator.
diff --git a/src/crypto/tls/handshake_unix_test.go b/src/crypto/tls/handshake_unix_test.go
index b61e7c24efb2049429a3051dbfc7e7c8d9e924d9..86a48f299bf918fe44badcdd8ca3b43728c98163 100644
--- a/src/crypto/tls/handshake_unix_test.go
+++ b/src/crypto/tls/handshake_unix_test.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
+//go:build unix
 
 package tls
 
diff --git a/src/internal/poll/errno_unix.go b/src/internal/poll/errno_unix.go
index c17751973225211748bf406626268f0f08ec8126..8eed93a31cb737c2dfea7b688611af912e12ee76 100644
--- a/src/internal/poll/errno_unix.go
+++ b/src/internal/poll/errno_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
+//go:build unix
 
 package poll
 
diff --git a/src/internal/poll/export_posix_test.go b/src/internal/poll/export_posix_test.go
index 3fcafac0020e8491efe34575440d823c461fb826..3415ab383981797c471ff01492a9a44ee3aaee75 100644
--- a/src/internal/poll/export_posix_test.go
+++ b/src/internal/poll/export_posix_test.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || windows
+//go:build unix || windows
 
 // Export guts for testing on posix.
 // Since testing imports os and os imports internal/poll,
diff --git a/src/internal/poll/fd_poll_runtime.go b/src/internal/poll/fd_poll_runtime.go
index 4a4dddfd2743cbebc3dec55ca4cd0ad1aa4585ef..2e9cd5c9d7ee410c0a86309a97a13ac108b7b114 100644
--- a/src/internal/poll/fd_poll_runtime.go
+++ b/src/internal/poll/fd_poll_runtime.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || windows || solaris
+//go:build unix || windows
 
 package poll
 
diff --git a/src/internal/poll/fd_posix.go b/src/internal/poll/fd_posix.go
index dc1e29c6b7861caa5a920da29a969d6283f0d25c..778fe1e5c1aa750c24d14bd9cc9d98bc9401d408 100644
--- a/src/internal/poll/fd_posix.go
+++ b/src/internal/poll/fd_posix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris || windows
+//go:build unix || (js && wasm) || windows
 
 package poll
 
diff --git a/src/internal/poll/fd_posix_test.go b/src/internal/poll/fd_posix_test.go
index 0b7ef7a577fe9c7a2fc8dbb45ad3226268ee4a8b..b97e46595a5cc125ab95eed6398f554a2aa49ea1 100644
--- a/src/internal/poll/fd_posix_test.go
+++ b/src/internal/poll/fd_posix_test.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || windows
+//go:build unix || windows
 
 package poll_test
 
diff --git a/src/internal/poll/fd_unix.go b/src/internal/poll/fd_unix.go
index 85971a16cd3e6325b8c6f3f49e308c0b012432ac..2786064d9f32dcdf09ca960163035ee41e8f654a 100644
--- a/src/internal/poll/fd_unix.go
+++ b/src/internal/poll/fd_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris
+//go:build unix || (js && wasm)
 
 package poll
 
diff --git a/src/internal/poll/hook_unix.go b/src/internal/poll/hook_unix.go
index c9aa4b4ca23a484d23ae7740929fb0dab6e1c8b4..1a5035675d8c787fd5c888b5de627004e7ef21a8 100644
--- a/src/internal/poll/hook_unix.go
+++ b/src/internal/poll/hook_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris
+//go:build unix || (js && wasm)
 
 package poll
 
diff --git a/src/internal/poll/sockopt.go b/src/internal/poll/sockopt.go
index 2d354700c5d3a6862ac563dfba0a03ae5bdbee55..a7c9d115b4ace67395d9475bb3550d4122cae6aa 100644
--- a/src/internal/poll/sockopt.go
+++ b/src/internal/poll/sockopt.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || windows
+//go:build unix || windows
 
 package poll
 
diff --git a/src/internal/poll/sockopt_unix.go b/src/internal/poll/sockopt_unix.go
index 54be1cc4b6bed0ee244e4893dac259ceb541f4b5..9cba44da9d139884b37bf4c25419e4890d54a6b8 100644
--- a/src/internal/poll/sockopt_unix.go
+++ b/src/internal/poll/sockopt_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
+//go:build unix
 
 package poll
 
diff --git a/src/internal/poll/sockoptip.go b/src/internal/poll/sockoptip.go
index 7fc9aeefb3b1d00a9584910a60cff01037e3db41..41955e1fda0403d5a162736a40adcf1f063fe15a 100644
--- a/src/internal/poll/sockoptip.go
+++ b/src/internal/poll/sockoptip.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || windows
+//go:build unix || windows
 
 package poll
 
diff --git a/src/internal/syscall/unix/net.go b/src/internal/syscall/unix/net.go
index 85632e1c03c3fe82fef15788d312231add80d3d3..5618d40ae0f79385066b90ec4a32b97bd31e8eaf 100644
--- a/src/internal/syscall/unix/net.go
+++ b/src/internal/syscall/unix/net.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
+//go:build unix
 
 package unix
 
diff --git a/src/internal/testenv/testenv_unix.go b/src/internal/testenv/testenv_unix.go
index 3dc5daf45e796566709eecba73a5b0af898db93f..a97e88da2f670b9af299181b7090c636509c4dd9 100644
--- a/src/internal/testenv/testenv_unix.go
+++ b/src/internal/testenv/testenv_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
+//go:build unix
 
 package testenv
 
diff --git a/src/mime/type_unix.go b/src/mime/type_unix.go
index 3abc1fa10e47216bcaea015918e78d451be49b82..52579c56b9acb62b715017e929ea1d84e5d6a863 100644
--- a/src/mime/type_unix.go
+++ b/src/mime/type_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris
+//go:build unix || (js && wasm)
 
 package mime
 
diff --git a/src/mime/type_unix_test.go b/src/mime/type_unix_test.go
index 4d109aa71a228eb1124900ad22242bdf9d06c303..6bb408566cd1abb3e373e4d40ff830b714ead77a 100644
--- a/src/mime/type_unix_test.go
+++ b/src/mime/type_unix_test.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris
+//go:build unix || (js && wasm)
 
 package mime
 
diff --git a/src/net/addrselect.go b/src/net/addrselect.go
index 29e4ed85abc3b4aecd3a72a3d0c36263a9eeb56e..8accdb89e14f458c98d352f7a95110e3afde586c 100644
--- a/src/net/addrselect.go
+++ b/src/net/addrselect.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
+//go:build unix
 
 // Minimal RFC 6724 address selection.
 
diff --git a/src/net/cgo_unix.go b/src/net/cgo_unix.go
index 6fc2c1930e8145c2b825fbcfdeac258bee8d06cf..18e1ba1ce97bd695a08fcfff10889e352c55b4a1 100644
--- a/src/net/cgo_unix.go
+++ b/src/net/cgo_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build cgo && !netgo && (aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris)
+//go:build cgo && !netgo && unix
 
 package net
 
diff --git a/src/net/cgo_unix_test.go b/src/net/cgo_unix_test.go
index b4da25b84c1fb0f62357d8cce842922544e063fd..af9f9dc3f2c8f23e45e0dafaf850ea8d509a77ae 100644
--- a/src/net/cgo_unix_test.go
+++ b/src/net/cgo_unix_test.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build cgo && !netgo && (aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris)
+//go:build cgo && !netgo && unix
 
 package net
 
diff --git a/src/net/conf.go b/src/net/conf.go
index 415caedacc41b2501f364bd2852df770a3e3103b..716a37ff806ccd8e2799160e5a06b7befd719dba 100644
--- a/src/net/conf.go
+++ b/src/net/conf.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
+//go:build unix
 
 package net
 
diff --git a/src/net/dial_unix_test.go b/src/net/dial_unix_test.go
index 4170367c4bd663f2ca96454d4e486ba0f564dd44..d0df0b71eaeea5fb6b624897140c25f20bbc4884 100644
--- a/src/net/dial_unix_test.go
+++ b/src/net/dial_unix_test.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
+//go:build unix
 
 package net
 
diff --git a/src/net/dnsclient_unix.go b/src/net/dnsclient_unix.go
index b989d12c58f3eb74d909d04a9ae3dd6dce8c175d..15dbc258302763f12c0965e4392f69723ef50064 100644
--- a/src/net/dnsclient_unix.go
+++ b/src/net/dnsclient_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
+//go:build unix
 
 // DNS client: see RFC 1035.
 // Has to be linked into package net for Dial.
diff --git a/src/net/dnsclient_unix_test.go b/src/net/dnsclient_unix_test.go
index e5f01dba2adf02f342447de1c2f171e2263bb019..415c53e1e7826c73dbad7f9adfdd9a7552934155 100644
--- a/src/net/dnsclient_unix_test.go
+++ b/src/net/dnsclient_unix_test.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
+//go:build unix
 
 package net
 
diff --git a/src/net/dnsconfig_unix.go b/src/net/dnsconfig_unix.go
index 5ad254cd7c9a5956c642eab80984dd808ea17e43..7552bc51e653a72895d82a1cd634959e65a271cf 100644
--- a/src/net/dnsconfig_unix.go
+++ b/src/net/dnsconfig_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
+//go:build unix
 
 // Read system DNS config from /etc/resolv.conf
 
diff --git a/src/net/dnsconfig_unix_test.go b/src/net/dnsconfig_unix_test.go
index 4d352214976de224f93ea8dcb6989989b417fbf4..513f624b005d0474c17f1d949329ec19da3f28f9 100644
--- a/src/net/dnsconfig_unix_test.go
+++ b/src/net/dnsconfig_unix_test.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
+//go:build unix
 
 package net
 
diff --git a/src/net/error_posix.go b/src/net/error_posix.go
index 10e3caa67b7498b0a7dd0efb99dee003323b4e36..8fc7d0bb7384e48cfed3436249adc2e07974b0d6 100644
--- a/src/net/error_posix.go
+++ b/src/net/error_posix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris || windows
+//go:build unix || (js && wasm) || windows
 
 package net
 
diff --git a/src/net/error_unix.go b/src/net/error_unix.go
index 0e64b40ea1ccb4e71aa5c729ba38daee71a84a7f..1f9b6eb78ce870b960c81fdcb86df4fd59d35668 100644
--- a/src/net/error_unix.go
+++ b/src/net/error_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || js || linux || netbsd || openbsd || solaris
+//go:build unix || js
 
 package net
 
diff --git a/src/net/fd_posix.go b/src/net/fd_posix.go
index 1845c173bb756c7f3b6f28964d868cb6d0666714..ffb9bcf8b9e8ca06b68f01217727ca5b5a6bd226 100644
--- a/src/net/fd_posix.go
+++ b/src/net/fd_posix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || windows
+//go:build unix || windows
 
 package net
 
diff --git a/src/net/fd_unix.go b/src/net/fd_unix.go
index aaa7a1c18559b10808ad6f87bb5493145c5a5444..a400c6075e67a206ef9ce46ee67a76f978ce2f6a 100644
--- a/src/net/fd_unix.go
+++ b/src/net/fd_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
+//go:build unix
 
 package net
 
diff --git a/src/net/file_unix.go b/src/net/file_unix.go
index 68d7eb9ca0198c15ed43b890e6dec6e076610314..0df67db501211e5ba824a63cb0227b1bbb88939e 100644
--- a/src/net/file_unix.go
+++ b/src/net/file_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
+//go:build unix
 
 package net
 
diff --git a/src/net/hook_unix.go b/src/net/hook_unix.go
index 7c36b0d6e3272dfd17f8f07660cc14aba265fc4d..fa82c7e52ba67b611a0ff703b1e7e7f4e5e582d2 100644
--- a/src/net/hook_unix.go
+++ b/src/net/hook_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris
+//go:build unix || (js && wasm)
 
 package net
 
diff --git a/src/net/internal/socktest/switch_unix.go b/src/net/internal/socktest/switch_unix.go
index 77d68f61120fdd904c8f576475c4c4a925770de4..f2e95d68c17f4c4deb2947438604cd860b62085e 100644
--- a/src/net/internal/socktest/switch_unix.go
+++ b/src/net/internal/socktest/switch_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris
+//go:build unix || (js && wasm)
 
 package socktest
 
diff --git a/src/net/internal/socktest/sys_unix.go b/src/net/internal/socktest/sys_unix.go
index 0424164ed3095eb79bf76284d2d08318ed7c7cd7..e1040d3087a944e099cc7f039126960464d86924 100644
--- a/src/net/internal/socktest/sys_unix.go
+++ b/src/net/internal/socktest/sys_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris
+//go:build unix || (js && wasm)
 
 package socktest
 
diff --git a/src/net/iprawsock_posix.go b/src/net/iprawsock_posix.go
index 74f977e1efe079940e5d911686087095542def14..64112b08dd4028c7bc069739409fef8e04cc6042 100644
--- a/src/net/iprawsock_posix.go
+++ b/src/net/iprawsock_posix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris || windows
+//go:build unix || (js && wasm) || windows
 
 package net
 
diff --git a/src/net/ipsock_posix.go b/src/net/ipsock_posix.go
index e433e8a91c75c0b025e657a98bebc33da9658e6e..2c724478481e788328c29fdd23ce1718b23f1cd6 100644
--- a/src/net/ipsock_posix.go
+++ b/src/net/ipsock_posix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris || windows
+//go:build unix || (js && wasm) || windows
 
 package net
 
diff --git a/src/net/lookup_unix.go b/src/net/lookup_unix.go
index 255a19dfdb4dd4bf8da0e6d6392688147e8fcd56..ad4164d86517adbb659ac386474d6b598bde8ea9 100644
--- a/src/net/lookup_unix.go
+++ b/src/net/lookup_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
+//go:build unix
 
 package net
 
diff --git a/src/net/main_unix_test.go b/src/net/main_unix_test.go
index 2ed0615ad86a2ea8b6b33d87c1649410ae74bed9..e7a5b4fe9ad4eface4f990349e5e9abfc80099be 100644
--- a/src/net/main_unix_test.go
+++ b/src/net/main_unix_test.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
+//go:build unix
 
 package net
 
diff --git a/src/net/nss.go b/src/net/nss.go
index ee5568883f2d473736f6835442e7d8e5b78ef68f..5df71dc268fad5bf98e7cc16242563477eb9a24b 100644
--- a/src/net/nss.go
+++ b/src/net/nss.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
+//go:build unix
 
 package net
 
diff --git a/src/net/port_unix.go b/src/net/port_unix.go
index 102722b2ca7045f6ea655c9e8c9db2920bc21bea..b05b588f17dd3c5e321f91dbc08773a20c73961d 100644
--- a/src/net/port_unix.go
+++ b/src/net/port_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris
+//go:build unix || (js && wasm)
 
 // Read system port mappings from /etc/services
 
diff --git a/src/net/rawconn_unix_test.go b/src/net/rawconn_unix_test.go
index e6e1ad771a5a35489b54dbd05470f3a0dbf9546f..f11119ed9ec0da04cd04e1ca48452229efa7803c 100644
--- a/src/net/rawconn_unix_test.go
+++ b/src/net/rawconn_unix_test.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
+//go:build unix
 
 package net
 
diff --git a/src/net/sock_posix.go b/src/net/sock_posix.go
index 98a48229c755517e9eff597cae1dfa944feaf5c4..4431c3a6b3d422c7c38607bfd8eafc2200d36488 100644
--- a/src/net/sock_posix.go
+++ b/src/net/sock_posix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || windows
+//go:build unix || windows
 
 package net
 
diff --git a/src/net/sockaddr_posix.go b/src/net/sockaddr_posix.go
index c8e91936ade1d940969f52b1f0bf7b0188794e43..76c3233b29845c70310e38a908084414b09de6b4 100644
--- a/src/net/sockaddr_posix.go
+++ b/src/net/sockaddr_posix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris || windows
+//go:build unix || (js && wasm) || windows
 
 package net
 
diff --git a/src/net/sockopt_posix.go b/src/net/sockopt_posix.go
index 645080f9885e5374fb0504745c6d6e5870c5cd4f..32e8fcd5055040c288cd87d5763f7ed9bc3b997e 100644
--- a/src/net/sockopt_posix.go
+++ b/src/net/sockopt_posix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || windows
+//go:build unix || windows
 
 package net
 
diff --git a/src/net/sockoptip_posix.go b/src/net/sockoptip_posix.go
index 22031df22c221a344627ac1122e7b79507331dd1..572ea455c09586f02d45d3b23716cf31d59240a9 100644
--- a/src/net/sockoptip_posix.go
+++ b/src/net/sockoptip_posix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || windows
+//go:build unix || windows
 
 package net
 
diff --git a/src/net/tcpsock_posix.go b/src/net/tcpsock_posix.go
index ed6b18b5517eb1c38ac6921e05e4b26f3d11fc1e..bc3d324e6ba2d7adff60c580f00c5ee45501354c 100644
--- a/src/net/tcpsock_posix.go
+++ b/src/net/tcpsock_posix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris || windows
+//go:build unix || (js && wasm) || windows
 
 package net
 
diff --git a/src/net/tcpsockopt_posix.go b/src/net/tcpsockopt_posix.go
index 73754b1a0f7fe2c30dc5687f535f770912354b85..d708f04875897697bb494cc637670979440d37eb 100644
--- a/src/net/tcpsockopt_posix.go
+++ b/src/net/tcpsockopt_posix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || windows
+//go:build unix || windows
 
 package net
 
diff --git a/src/net/udpsock_posix.go b/src/net/udpsock_posix.go
index 654439767378a86bcb73ddd959eec7a57e4948c1..5b021d24ae60208621b211fb24ebc790ed4fb4b3 100644
--- a/src/net/udpsock_posix.go
+++ b/src/net/udpsock_posix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris || windows
+//go:build unix || (js && wasm) || windows
 
 package net
 
diff --git a/src/net/unixsock_posix.go b/src/net/unixsock_posix.go
index 1b69df53bfd3256088bf9f8acfcd39d02dc6dbe1..b244dbdbbd08f22c17768438ece5f5ac96d8c15b 100644
--- a/src/net/unixsock_posix.go
+++ b/src/net/unixsock_posix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris || windows
+//go:build unix || (js && wasm) || windows
 
 package net
 
diff --git a/src/net/unixsock_readmsg_test.go b/src/net/unixsock_readmsg_test.go
index c3bfbf9af2f1f867509a1ad5e8130b16de8480ae..414f626644b6b38c1988409b0c9b4a7f4e226d62 100644
--- a/src/net/unixsock_readmsg_test.go
+++ b/src/net/unixsock_readmsg_test.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
+//go:build unix
 
 package net
 
diff --git a/src/os/env_unix_test.go b/src/os/env_unix_test.go
index 75225d85476f22b920e5faa0593b1cdfc5bd36b5..4609fc3b94d404137c6c354d3da3a72a07c914d7 100644
--- a/src/os/env_unix_test.go
+++ b/src/os/env_unix_test.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
+//go:build unix
 
 package os_test
 
diff --git a/src/os/error_posix.go b/src/os/error_posix.go
index 234f4eb6921fb5493946a8c676f0cb9b33095bf7..5ca2e60e5b4f88acd00df6afc242eb897d4dd951 100644
--- a/src/os/error_posix.go
+++ b/src/os/error_posix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris || windows
+//go:build unix || (js && wasm) || windows
 
 package os
 
diff --git a/src/os/error_unix_test.go b/src/os/error_unix_test.go
index 81bccebedbba6edf814523779f5a4bcf3e05f07f..1c694fe5f1669c85c9d7fec6635b4d9042d15afc 100644
--- a/src/os/error_unix_test.go
+++ b/src/os/error_unix_test.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris
+//go:build unix || (js && wasm)
 
 package os_test
 
diff --git a/src/os/exec/exec_posix_test.go b/src/os/exec/exec_posix_test.go
index fd7fb42d36a4e92a67c94305f23ca2c68787ae8d..ce83a9e4b3a0b68021c46063253b1491b50de711 100644
--- a/src/os/exec/exec_posix_test.go
+++ b/src/os/exec/exec_posix_test.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
+//go:build unix
 
 package exec_test
 
diff --git a/src/os/exec/internal/fdtest/exists_unix.go b/src/os/exec/internal/fdtest/exists_unix.go
index 49f264cebdaad0a96f31349090d243d39c83b6c2..265cb69822043ba578e5a975cb170c21e1a28e18 100644
--- a/src/os/exec/internal/fdtest/exists_unix.go
+++ b/src/os/exec/internal/fdtest/exists_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
+//go:build unix
 
 // Package fdtest provides test helpers for working with file descriptors across exec.
 package fdtest
diff --git a/src/os/exec/lp_unix.go b/src/os/exec/lp_unix.go
index 38b9fc7c27fefb34399d27c95b4f2a70341ccafa..5db6c5e1098afc785e47130282e4e0a07cb6827b 100644
--- a/src/os/exec/lp_unix.go
+++ b/src/os/exec/lp_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
+//go:build unix
 
 package exec
 
diff --git a/src/os/exec/lp_unix_test.go b/src/os/exec/lp_unix_test.go
index 52e401e58016c10532c9b5960f073195b30f1525..ebeb5bb3ecd8e86ce93c6e2dcb77f98474f51187 100644
--- a/src/os/exec/lp_unix_test.go
+++ b/src/os/exec/lp_unix_test.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
+//go:build unix
 
 package exec
 
diff --git a/src/os/exec_posix.go b/src/os/exec_posix.go
index d61998469351711c13e0295db4e537022fadf615..e1e7d53a27af06201e3b6713e2ee8ebaf16d459c 100644
--- a/src/os/exec_posix.go
+++ b/src/os/exec_posix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris || windows
+//go:build unix || (js && wasm) || windows
 
 package os
 
diff --git a/src/os/exec_unix.go b/src/os/exec_unix.go
index 250c5c6402e9573d70a60f24c96b059c749d187c..90a4a61222b6b846bd99b7fab98eecb88015ed30 100644
--- a/src/os/exec_unix.go
+++ b/src/os/exec_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris
+//go:build unix || (js && wasm)
 
 package os
 
diff --git a/src/os/exec_unix_test.go b/src/os/exec_unix_test.go
index fa332bf1ed840a6494b244e2c035b26bb43673e8..332ffe904125c7a92981870be5251b3cd5ce07b4 100644
--- a/src/os/exec_unix_test.go
+++ b/src/os/exec_unix_test.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
+//go:build unix
 
 package os_test
 
diff --git a/src/os/export_unix_test.go b/src/os/export_unix_test.go
index d4eb7a4fb146a9d1a678cef7afdc59d595bfa129..49c8dae0365c8f8a0d8831637cffb0178e2cf8ed 100644
--- a/src/os/export_unix_test.go
+++ b/src/os/export_unix_test.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris
+//go:build unix || (js && wasm)
 
 package os
 
diff --git a/src/os/file_posix.go b/src/os/file_posix.go
index f34571d68d78ec05a5c81cfa05338d6c0871958c..c6d18ffeb60ed3dba47cbcea6d5eb9b247637ac9 100644
--- a/src/os/file_posix.go
+++ b/src/os/file_posix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris || windows
+//go:build unix || (js && wasm) || windows
 
 package os
 
diff --git a/src/os/file_unix.go b/src/os/file_unix.go
index a38db189548551cc00688ef291a2f4cd8f736426..666143b0de35c304111b1591c319ec5814463ee6 100644
--- a/src/os/file_unix.go
+++ b/src/os/file_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris
+//go:build unix || (js && wasm)
 
 package os
 
diff --git a/src/os/os_unix_test.go b/src/os/os_unix_test.go
index 3ec3dee24ba6f3374e8a5b6001c7d453d8240757..c3c703f860b6fdb72c9004747e4a50b9fa5402df 100644
--- a/src/os/os_unix_test.go
+++ b/src/os/os_unix_test.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris
+//go:build unix || (js && wasm)
 
 package os_test
 
diff --git a/src/os/path_unix.go b/src/os/path_unix.go
index d1ffe2c1877bdc3f92b5069460b11b2b9cb73b70..3c6310a4dfdacf71e7541f3afd0f7ec3b03ed6f9 100644
--- a/src/os/path_unix.go
+++ b/src/os/path_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris
+//go:build unix || (js && wasm)
 
 package os
 
diff --git a/src/os/removeall_at.go b/src/os/removeall_at.go
index da804c436f6978060ae975a79deace8af4572940..8b46152a9e71cbdb76598d2f4416f8b93e198c3f 100644
--- a/src/os/removeall_at.go
+++ b/src/os/removeall_at.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
+//go:build unix
 
 package os
 
diff --git a/src/os/removeall_noat.go b/src/os/removeall_noat.go
index a0332e8c3560e956a911f5bce45a736096cd6a5d..2b8a7727f4f3e1b00644b3a0dfced8e7f8d25043 100644
--- a/src/os/removeall_noat.go
+++ b/src/os/removeall_noat.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris
+//go:build !unix
 
 package os
 
diff --git a/src/os/signal/example_unix_test.go b/src/os/signal/example_unix_test.go
index b279ee9491f6ca3aa726fb50b2df9ebcb9670911..b7047ac45cdf2c5f83c11582394d4aa36e652e0d 100644
--- a/src/os/signal/example_unix_test.go
+++ b/src/os/signal/example_unix_test.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
+//go:build unix
 
 package signal_test
 
diff --git a/src/os/signal/signal_test.go b/src/os/signal/signal_test.go
index e6fb24c6a831be007e5dc011161cab2e084c585a..3182e83b4e9f738fe14846ab31404a972d0f0175 100644
--- a/src/os/signal/signal_test.go
+++ b/src/os/signal/signal_test.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
+//go:build unix
 
 package signal
 
diff --git a/src/os/signal/signal_unix.go b/src/os/signal/signal_unix.go
index e2e5c4ae970d48d75068fd05bd2f4a7143d0e585..772175a9223009c50ebaf45687437c21256fcf96 100644
--- a/src/os/signal/signal_unix.go
+++ b/src/os/signal/signal_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris || windows
+//go:build unix || (js && wasm) || windows
 
 package signal
 
diff --git a/src/os/stat_unix.go b/src/os/stat_unix.go
index eb15db5453b785fd77b131bd8852de343bbe204d..437afc02b48d8c514fa263ac95a19f3359fd5a1b 100644
--- a/src/os/stat_unix.go
+++ b/src/os/stat_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris
+//go:build unix || (js && wasm)
 
 package os
 
diff --git a/src/os/sys_unix.go b/src/os/sys_unix.go
index 5ff39780e5e8fa54914add0f05999955d279f6a3..79005c2cbd204128c94d3bbae0c3ac2f8e935426 100644
--- a/src/os/sys_unix.go
+++ b/src/os/sys_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
+//go:build unix
 
 package os
 
diff --git a/src/os/user/cgo_lookup_unix.go b/src/os/user/cgo_lookup_unix.go
index 523269086e68f8ab32ccf8d930be68c55ab60f98..4f8577bbc95d8c52596313dfd87bff18a36f7a64 100644
--- a/src/os/user/cgo_lookup_unix.go
+++ b/src/os/user/cgo_lookup_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build (aix || darwin || dragonfly || freebsd || (!android && linux) || netbsd || openbsd || solaris) && cgo && !osusergo
+//go:build unix && !android && cgo && !osusergo
 
 package user
 
diff --git a/src/os/user/lookup_unix.go b/src/os/user/lookup_unix.go
index 058dab1fb5ad6f817a5c2dcaa3cc12e752c7b0ff..ed06e73fbc3367f7cbd4ab39b61698d0239a1d21 100644
--- a/src/os/user/lookup_unix.go
+++ b/src/os/user/lookup_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build (aix || darwin || dragonfly || freebsd || (js && wasm) || (!android && linux) || netbsd || openbsd || solaris) && (!cgo || osusergo)
+//go:build ((unix && !android) || (js && wasm)) && (!cgo || osusergo)
 
 package user
 
diff --git a/src/os/user/lookup_unix_test.go b/src/os/user/lookup_unix_test.go
index 77917677fc1dc6c96fa8297f36497a4788b02312..399a03fc3c1b2cf1dd6c2b3e152634c4b2ffbab3 100644
--- a/src/os/user/lookup_unix_test.go
+++ b/src/os/user/lookup_unix_test.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build (aix || darwin || dragonfly || freebsd || (!android && linux) || netbsd || openbsd || solaris) && !cgo
+//go:build unix && !android && !cgo
 
 package user
 
diff --git a/src/path/filepath/path_unix.go b/src/path/filepath/path_unix.go
index dcf1d187e7ae927f2cc4ff0b22e724c12f45bb70..93fdfdd8a049d5620e7c06af114f8f33fa90af90 100644
--- a/src/path/filepath/path_unix.go
+++ b/src/path/filepath/path_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris
+//go:build unix || (js && wasm)
 
 package filepath
 
diff --git a/src/runtime/cgo/setenv.go b/src/runtime/cgo/setenv.go
index 0f4780a945810819f27cdd31e538d894172f8cef..2247cb2b59ea9f195039a9e2be1c9846f4767844 100644
--- a/src/runtime/cgo/setenv.go
+++ b/src/runtime/cgo/setenv.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
+//go:build unix
 
 package cgo
 
diff --git a/src/runtime/crash_unix_test.go b/src/runtime/crash_unix_test.go
index a218205af44c0055cbe19e67f0c2b191bd997d08..29d9c476f92c459d1bb963388ebcece8b8ec2699 100644
--- a/src/runtime/crash_unix_test.go
+++ b/src/runtime/crash_unix_test.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
+//go:build unix
 
 package runtime_test
 
diff --git a/src/runtime/env_posix.go b/src/runtime/env_posix.go
index 44086c1d6341b47c8eca577db42b639231b5e1f2..7d01ab4dd7dcf5f4765ef3ff44866b26edc04af0 100644
--- a/src/runtime/env_posix.go
+++ b/src/runtime/env_posix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris || windows || plan9
+//go:build unix || (js && wasm) || windows || plan9
 
 package runtime
 
diff --git a/src/runtime/export_mmap_test.go b/src/runtime/export_mmap_test.go
index f9c3229316a1fa2f83a7589763ce53aa57c1b512..f73fcbde9bdf9572aefdcc836248862874b53473 100644
--- a/src/runtime/export_mmap_test.go
+++ b/src/runtime/export_mmap_test.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
+//go:build unix
 
 // Export guts for testing.
 
diff --git a/src/runtime/export_unix_test.go b/src/runtime/export_unix_test.go
index 4a587cb78013df6110090721b8953a6227d53d6a..a548cf7b7a5ccefad2d9292c19d961bc0414ccac 100644
--- a/src/runtime/export_unix_test.go
+++ b/src/runtime/export_unix_test.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
+//go:build unix
 
 package runtime
 
diff --git a/src/runtime/nbpipe_test.go b/src/runtime/nbpipe_test.go
index b6869e79746a23a5db14ab47fc518dc5a5009d2d..0b0f64d07643752f2a0212672ec8682f6bb16442 100644
--- a/src/runtime/nbpipe_test.go
+++ b/src/runtime/nbpipe_test.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
+//go:build unix
 
 package runtime_test
 
diff --git a/src/runtime/netpoll.go b/src/runtime/netpoll.go
index bb3dd35317ffa09ecab237cfd420561eca58f930..c6acc2328a6efcb57583f0e11c54ac1f10e3d5cd 100644
--- a/src/runtime/netpoll.go
+++ b/src/runtime/netpoll.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris || windows
+//go:build unix || (js && wasm) || windows
 
 package runtime
 
diff --git a/src/runtime/runtime_mmap_test.go b/src/runtime/runtime_mmap_test.go
index 9323c093557da405d35b45b569210d64f749cd1f..456f9139540057f023517f2a2d6c4119a907c250 100644
--- a/src/runtime/runtime_mmap_test.go
+++ b/src/runtime/runtime_mmap_test.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
+//go:build unix
 
 package runtime_test
 
diff --git a/src/runtime/signal_unix.go b/src/runtime/signal_unix.go
index 2dd4cc51a34ec12cb2232714b9cd04a9322678fd..0e11c576839885c0239af2595b111bc655fe090b 100644
--- a/src/runtime/signal_unix.go
+++ b/src/runtime/signal_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
+//go:build unix
 
 package runtime
 
diff --git a/src/syscall/dirent.go b/src/syscall/dirent.go
index 237ea79ad621ce172de924cfb30e54e7d46530d9..b10608a6629c531ae7cd704e17f4a5d8c1ade9e1 100644
--- a/src/syscall/dirent.go
+++ b/src/syscall/dirent.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris
+//go:build unix || (js && wasm)
 
 package syscall
 
diff --git a/src/syscall/dirent_test.go b/src/syscall/dirent_test.go
index a2d1b61342cf54a8abf3663a26f2d94b6c48bbcd..68e766e6b01986bc68ed71af83611d45c2b431f1 100644
--- a/src/syscall/dirent_test.go
+++ b/src/syscall/dirent_test.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
+//go:build unix
 
 package syscall_test
 
diff --git a/src/syscall/env_unix.go b/src/syscall/env_unix.go
index 521967c79f52e47fc83119e763548d1e680faaa4..67e6c5fbe2f6e82aff27becb7486cea35571bf4e 100644
--- a/src/syscall/env_unix.go
+++ b/src/syscall/env_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris || plan9
+//go:build unix || (js && wasm) || plan9
 
 // Unix environment variables.
 
diff --git a/src/syscall/exec_unix.go b/src/syscall/exec_unix.go
index 0e41959ffe54301ff0bec90a39ddb174b02f0079..286be454d88f0263dd1fe29fea6ceced79c703fc 100644
--- a/src/syscall/exec_unix.go
+++ b/src/syscall/exec_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
+//go:build unix
 
 // Fork, exec, wait, etc.
 
diff --git a/src/syscall/exec_unix_test.go b/src/syscall/exec_unix_test.go
index b7ae77552bac68e9b68d22996cebc0e26a858a7b..4253cda5cb6c7d6af0f0340b9817759c46f12226 100644
--- a/src/syscall/exec_unix_test.go
+++ b/src/syscall/exec_unix_test.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
+//go:build unix
 
 package syscall_test
 
diff --git a/src/syscall/sockcmsg_unix.go b/src/syscall/sockcmsg_unix.go
index a3dcf818da7e8ece79d4d37938168679fca50aa1..6ade73e87e0f8a30fdc1970a71caecf1f8c597b3 100644
--- a/src/syscall/sockcmsg_unix.go
+++ b/src/syscall/sockcmsg_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
+//go:build unix
 
 // Socket control messages
 
diff --git a/src/syscall/syscall_unix.go b/src/syscall/syscall_unix.go
index 61ae09de4ed39c902dc569a90f8492f11cb76806..56d21b4ec130991c0f66dc3ae34b1b3f235cd1d1 100644
--- a/src/syscall/syscall_unix.go
+++ b/src/syscall/syscall_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
+//go:build unix
 
 package syscall
 
diff --git a/src/syscall/syscall_unix_test.go b/src/syscall/syscall_unix_test.go
index 317c0c1f34541de626f55371df44254ebd68ac0f..56e771e08603d08c6cb852b1d01d3e20e253afd7 100644
--- a/src/syscall/syscall_unix_test.go
+++ b/src/syscall/syscall_unix_test.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
+//go:build unix
 
 package syscall_test
 
diff --git a/src/syscall/timestruct.go b/src/syscall/timestruct.go
index 7cf4be45b126634d34fbb6b8024a89229f0b5b96..8a03171ee52c0e21043a3e32cd08ede77c331d58 100644
--- a/src/syscall/timestruct.go
+++ b/src/syscall/timestruct.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris
+//go:build unix || (js && wasm)
 
 package syscall
 
diff --git a/src/time/sys_unix.go b/src/time/sys_unix.go
index a949a6af225a407ad7ceacbc4925a6f1f7a29034..0f06aa6ccd7dcd3c91b930b41e26a37461996a35 100644
--- a/src/time/sys_unix.go
+++ b/src/time/sys_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris
+//go:build unix || (js && wasm)
 
 package time
 
diff --git a/src/time/zoneinfo_unix.go b/src/time/zoneinfo_unix.go
index 6414be3879af495a5dcd05bc308b1065949a23c7..67b8beb47b3ba783eac3a51bc55766afe817af4f 100644
--- a/src/time/zoneinfo_unix.go
+++ b/src/time/zoneinfo_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || (darwin && !ios) || dragonfly || freebsd || (linux && !android) || netbsd || openbsd || solaris
+//go:build unix && !ios && !android
 
 // Parse "zoneinfo" time zone file.
 // This is a fairly standard file format used on OS X, Linux, BSD, Sun, and others.
diff --git a/src/time/zoneinfo_unix_test.go b/src/time/zoneinfo_unix_test.go
index de95295cd3f6bdb24ce224a2cb310d0f0e42bddc..92680c4f8f7b8079a894043c42f1be6063fe1dc9 100644
--- a/src/time/zoneinfo_unix_test.go
+++ b/src/time/zoneinfo_unix_test.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || (darwin && !ios) || dragonfly || freebsd || (linux && !android) || netbsd || openbsd || solaris
+//go:build unix && !ios && !android
 
 package time_test