サブドメインとメイン両方を簡易に表現したいが試した範囲では
searchにスペース区切りで複数書くのがリーズナブルか
# cat /etc/resolv.conf search priv.example.com example.com nameserver 192.168.2.1 # nslookup -debug hoge Server: 192.168.2.1 Address: 192.168.2.1#53 ------------ QUESTIONS: hoge.priv.example.com, type = A, class = IN ANSWERS: AUTHORITY RECORDS: -> example.com origin = ns1.example.com ADDITIONAL RECORDS: ------------ ** server can't find hoge.priv.example.com: NXDOMAIN Server: 192.168.2.1 Address: 192.168.2.1#53 ------------ QUESTIONS: hoge.example.com, type = A, class = IN ANSWERS: -> hoge.example.com internet address = 192.168.2.2 ttl = 54 AUTHORITY RECORDS: ADDITIONAL RECORDS: ------------ Non-authoritative answer: Name: hoge.example.com Address: 192.168.2.2 ------------ QUESTIONS: hoge.example.com, type = AAAA, class = IN ANSWERS: AUTHORITY RECORDS: -> example.com origin = ns1.example.com ADDITIONAL RECORDS: ------------
参考
https://man7.org/linux/man-pages/man5/resolv.conf.5.html
The domain directive is an obsolete name for the search directive that handles one search list entry only.
ほー