容器运行nslookup提示bash: nslookup: command not found【笔记】

作者 : admin 本文共199个字,预计阅读时间需要1分钟 发布时间: 2024-06-10 共3人阅读

在容器中提示bash: nslookup: command not found,表示容器中没有安装nslookup命令。

可以通过以下命令安装nslookup:

对于基于Debian/Ubuntu的容器,使用以下命令:

apt-get update
apt-get install -y dnsutils

对于基于CentOS/RHEL的容器,使用以下命令:

yum install -y bind-utils

容器Ubuntu示例:
容器运行nslookup提示bash: nslookup: command not found【笔记】插图
容器运行nslookup提示bash: nslookup: command not found【笔记】插图(1)

本站无任何商业行为
个人在线分享 » 容器运行nslookup提示bash: nslookup: command not found【笔记】
E-->