在 CentOS 系统中,dhclient 通常位于以下路径:
/sbin/dhclient
你可以通过以下命令确认:
which dhclient
或
rpm -ql dhclient | grep dhclient
如果未安装,可以使用以下命令安装:
yum install dhclient
(CentOS 8 及以上可用 dnf install dhclient)
补充说明:
NetworkManager,dhclient 通常由 NetworkManager 内部调用,不一定需要手动使用。dhclient eth0 时报“命令不存在”,多半是没装 dhclient 包。