{"id":13877,"date":"2022-09-05T22:26:15","date_gmt":"2022-09-05T19:26:15","guid":{"rendered":"https:\/\/kifarunix.com\/?p=13877"},"modified":"2024-03-09T21:35:00","modified_gmt":"2024-03-09T18:35:00","slug":"install-dhclient-command-on-oracle-linux","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/install-dhclient-command-on-oracle-linux\/","title":{"rendered":"Install dhclient command on Oracle Linux"},"content":{"rendered":"\n<p>This simple guide will show you how to install dhclient command on Oracle Linux. Have you installed Oracle Linux system and trying to configure automatic IP addresses via DHCP using <a href=\"https:\/\/linux.die.net\/man\/8\/dhclient\" target=\"_blank\" rel=\"noreferrer noopener\">dhclient<\/a> command? Well, unlike the CentOS\/RHEL\/Rocky Linux systems, the dhclient command is not installed by default.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Install dhclient command on Oracle Linux<\/h2>\n\n\n\n<p>In our environment, we have Oracle Linux 9 installed on a VirtualBox. You can check the guide below on how to install Oracle Linux 9 on VirtualBox.<\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-oracle-linux-9-on-virtualbox\/\" target=\"_blank\" rel=\"noreferrer noopener\">Install Oracle Linux 9 on VirtualBox<\/a><\/p>\n\n\n\n<p>As already mentioned, dhclient command is not installed by default on Oracle Linux system.<\/p>\n\n\n\n<p>So, first of all, what package provides the dhclient command? This can be checked using the command below;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf provides dhclient<\/code><\/pre>\n\n\n\n<p>Sample output;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dhcp-client-12:4.4.2-15.b1.el9.x86_64 : Provides the ISC DHCP client daemon and dhclient-script\nRepo        : @System\nMatched from:\nProvide    : dhclient = 12:4.4.2-15.b1.el9\n\ndhcp-client-12:4.4.2-15.b1.el9.x86_64 : Provides the ISC DHCP client daemon and dhclient-script\nRepo        : ol9_baseos_latest\nMatched from:\nProvide    : dhclient = 12:4.4.2-15.b1.el9<\/code><\/pre>\n\n\n\n<p>From the output above, you can see that dhclient command is provided by the package called <strong><code>dhcp-client<\/code><\/strong>.<\/p>\n\n\n\n<p>You can install dhclient using the DNF\/YUM package manager by <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo yum install dhcp-client<\/code><\/pre>\n\n\n\n<p>Or<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf install dhcp-client<\/code><\/pre>\n\n\n\n<p>Or via the <strong>dhclient<\/strong> virtual package;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf install dhclient<\/code><\/pre>\n\n\n\n<p>It is also possible to install automatically.<\/p>\n\n\n\n<p>When you run;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dhclient<\/code><\/pre>\n\n\n\n<p>If the command is not installed, the system will prompt you to install.<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>\nbash: dhclient: command not found...\nInstall package 'dhcp-client' to provide command 'dhclient'? [N\/y] y\n\n\n * Waiting in queue... \nThe following packages have to be installed:\n dhcp-client-12:4.4.2-15.b1.el9.x86_64\tProvides the ISC DHCP client daemon and dhclient-script\n dhcp-common-12:4.4.2-15.b1.el9.noarch\tCommon files used by ISC dhcp client, server and relay agent\n ipcalc-1.0.0-5.el9.x86_64\tIP network address calculator\nProceed with changes? [N\/y] y\n\n\n * Waiting in queue... \n * Waiting for authentication... \n * Waiting in queue... \n * Downloading packages... \n * Requesting data... \n * Testing changes... \n * Installing packages... \n<\/code><\/pre>\n\n\n\n<p>You can also check the version;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dhclient --version<\/code><\/pre>\n\n\n\n<p>You can then after installing dhclient command on Oracle Linux, use it to configure automatic interface IP address assignment.<\/p>\n\n\n\n<p>For example, to assign all interfaces DHCP IP addresses, just run;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dhclient<\/code><\/pre>\n\n\n\n<p>To configure automatic IP address assignment from DHCP server on a specific interface, e.g enp0s8;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dhclient enp0s8<\/code><\/pre>\n\n\n\n<p>You can also release the DHCP addresses using either <code><strong>-r <\/strong><\/code>or <code><strong>-x<\/strong><\/code> option.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dhclient &#91;-r|-x]<\/code><\/pre>\n\n\n\n<p>Or<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dhclient &#91;-r|-x] INTERFACE<\/code><\/pre>\n\n\n\n<p>And that is all on installing dhclient command on Oracle Linux.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Other Tutorials<\/h3>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-sysdig-system-visibility-tool-on-ubuntu\/\" target=\"_blank\" rel=\"noreferrer noopener\">Install Sysdig System Visibility Tool on Ubuntu 22.04<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/how-to-get-byte-count-in-a-file-in-linux\/\" target=\"_blank\" rel=\"noreferrer noopener\">How to get byte count in a file in Linux<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This simple guide will show you how to install dhclient command on Oracle Linux. Have you installed Oracle Linux system and trying to configure automatic<\/p>\n","protected":false},"author":1,"featured_media":13880,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[49,121],"tags":[260,5744,5742,5746,5745,5743],"class_list":["post-13877","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-command-cheatsheets","category-howtos","tag-dhclient","tag-dhclient-command-install-oracle-linux","tag-install-dhclient-command-linux","tag-oracle-linux","tag-oracle-linux-dhcp","tag-oracle-linux-install-dhclient","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50","resize-featured-image"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/13877"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=13877"}],"version-history":[{"count":4,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/13877\/revisions"}],"predecessor-version":[{"id":20628,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/13877\/revisions\/20628"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media\/13880"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=13877"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=13877"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=13877"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}