host
ネットワーク
書き方
host [-t <type>] <name> [server]名前を尋ねると住所とメールサーバーを二、三行で短く答えます。手早い確認には一番楽ですが、記録をすべて見るには dig が必要です。
よく使うオプション
| オプション | 意味 |
|---|---|
| -t MX | Restrict to one record type. |
| -a | Everything, equivalent to -t ANY -v. |
| -v | Verbose output closer to what dig prints. |
| -C | Fetch the SOA from every authoritative server, to spot one that is out of sync. |
| <ip> | Give it an address and it does the reverse lookup by itself. |
例
host example.comAddresses and mail servers in three short lines.
host -t TXT example.comRead the SPF or verification records.
host 8.8.8.8Reverse lookup without needing -x.
つながらないとき、どこまで行けたのかを絞ります — 名前が引けないのか、経路がないのか、ポートが閉じているのか。
読み方
- 角括弧 [ ] は省いてよい部分です。
- 三点 … は複数並べられるという意味です。
- オプションは大文字小文字を区別します — -r と -R が別物のコマンドもあります。
よくある質問
Q. host は何をしますか。
名前を尋ねると住所とメールサーバーを二、三行で短く答えます。手早い確認には一番楽ですが、記録をすべて見るには dig が必要です。
Q. どう打ちますか。
host [-t <type>] <name> [server] — 角括弧は省いてよい部分です。
Q. よく使うオプションはいくつですか。
ここにまとめたのは5個です。全部は man host にあります。このコマンドはネットワークの仲間です。
関連するコマンド
man ページ: man host