{"id":5395,"date":"2014-09-08T00:46:31","date_gmt":"2014-09-07T16:46:31","guid":{"rendered":"https:\/\/webhostinggeeks.com\/howto\/?p=5395"},"modified":"2023-04-28T09:48:16","modified_gmt":"2023-04-28T09:48:16","slug":"how-to-install-ifconfig-and-netstat-on-rhel-7-0centos-7-0","status":"publish","type":"post","link":"https:\/\/webhostinggeeks.com\/howto\/how-to-install-ifconfig-and-netstat-on-rhel-7-0centos-7-0\/","title":{"rendered":"How to Install ifconfig and netstat on RHEL 7.0\/CentOS 7.0\/Oracle Linux 7"},"content":{"rendered":"<h2>Introduction:<\/h2>\n<p>ifconfig and netstat are two popular network tools that are commonly used in Linux-based operating systems. These tools can be used to display information about network interfaces and network connections respectively. However, ifconfig and netstat are not installed by default on some Linux distributions, including RHEL 7.0, CentOS 7.0, and Oracle Linux 7.<\/p>\n<pre>\r\n# ifconfig\r\n-bash: ifconfig: command not found\r\n<\/pre>\n<p>In this guide, we will show you how to install ifconfig and netstat on RHEL 7.0\/CentOS 7.0\/Oracle Linux 7.<\/p>\n<h2>Step 1: Enable EPEL repository<\/h2>\n<p>The first step is to enable the EPEL (Extra Packages for Enterprise Linux) repository. This repository contains additional software packages that are not included in the base RHEL\/CentOS\/Oracle Linux distribution. To enable the EPEL repository, run the following command:<\/p>\n<pre>\r\nsudo yum install epel-release\r\n<\/pre>\n<h2>Step 2: Install net-tools package<\/h2>\n<p>After enabling the EPEL repository, you can install the net-tools package, which includes both ifconfig and netstat, by running the following command:<\/p>\n<pre>\r\nsudo yum install net-tools\r\n<\/pre>\n<pre>\r\n# yum install net-tools -y\r\nLoaded plugins: fastestmirror\r\nLoading mirror speeds from cached hostfile\r\n * base: centos.biz.net.id\r\n * extras: mirror.smartmedia.net.id\r\n * updates: centos.biz.net.id\r\nResolving Dependencies\r\n--> Running transaction check\r\n---> Package net-tools.x86_64 0:2.0-0.17.20131004git.el7 will be installed\r\n--> Finished Dependency Resolution\r\n\r\nDependencies Resolved\r\n\r\n====================================================================================================\r\n Package              Arch              Version                               Repository       Size\r\n====================================================================================================\r\nInstalling:\r\n net-tools            x86_64            2.0-0.17.20131004git.el7              base            304 k\r\n\r\nTransaction Summary\r\n====================================================================================================\r\nInstall  1 Package\r\n\r\nTotal download size: 304 k\r\nInstalled size: 917 k\r\nDownloading packages:\r\nwarning: \/var\/cache\/yum\/x86_64\/7\/base\/packages\/net-tools-2.0-0.17.20131004git.el7.x86_64.rpm: Header V3 RSA\/SHA256 Signature, key ID f4a80eb5: NOKEY\r\nPublic key for net-tools-2.0-0.17.20131004git.el7.x86_64.rpm is not installed\r\nnet-tools-2.0-0.17.20131004git.el7.x86_64.rpm                                | 304 kB  00:00:10\r\nRetrieving key from file:\/\/\/etc\/pki\/rpm-gpg\/RPM-GPG-KEY-CentOS-7\r\nImporting GPG key 0xF4A80EB5:\r\n Userid     : \"CentOS-7 Key (CentOS 7 Official Signing Key)\"\r\n Fingerprint: 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5\r\n Package    : centos-release-7-0.1406.el7.centos.2.3.x86_64 (@anaconda)\r\n From       : \/etc\/pki\/rpm-gpg\/RPM-GPG-KEY-CentOS-7\r\nRunning transaction check\r\nRunning transaction test\r\nTransaction test succeeded\r\nRunning transaction\r\n  Installing : net-tools-2.0-0.17.20131004git.el7.x86_64                                        1\/1\r\n  Verifying  : net-tools-2.0-0.17.20131004git.el7.x86_64                                        1\/1\r\n\r\nInstalled:\r\n  net-tools.x86_64 0:2.0-0.17.20131004git.el7\r\n\r\nComplete!\r\n<\/pre>\n<h2>Step 3: Verify installation<\/h2>\n<p>To verify that ifconfig and netstat have been installed successfully, you can run the following commands:<\/p>\n<pre>\r\nifconfig\r\nnetstat -a\r\n<\/pre>\n<p>These commands should display information about network interfaces and network connections respectively. For example:<\/p>\n<p>1. ifconfig command:<\/p>\n<pre>\r\n# ifconfig\r\nens160: flags=4163<up ,BROADCAST,RUNNING,MULTICAST>  mtu 1500\r\n        inet 192.168.0.18  netmask 255.255.255.0  broadcast 192.168.0.255\r\n        inet6 fe80::20c:29ff:feba:3efe  prefixlen 64  scopeid 0x20<link \/>\r\n        ether 00:0c:29:ba:3e:fe  txqueuelen 1000  (Ethernet)\r\n        RX packets 10357  bytes 9459534 (9.0 MiB)\r\n        RX errors 0  dropped 0  overruns 0  frame 0\r\n        TX packets 8239  bytes 2341646 (2.2 MiB)\r\n        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0\r\n\r\nlo: flags=73<\/up><up ,LOOPBACK,RUNNING>  mtu 65536\r\n        inet 127.0.0.1  netmask 255.0.0.0\r\n        inet6 ::1  prefixlen 128  scopeid 0x10<host>\r\n        loop  txqueuelen 0  (Local Loopback)\r\n        RX packets 0  bytes 0 (0.0 B)\r\n        RX errors 0  dropped 0  overruns 0  frame 0\r\n        TX packets 0  bytes 0 (0.0 B)\r\n        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0\r\n\r\n<\/host><\/up><\/pre>\n<p>2. netstat command:<\/p>\n<pre>\r\n# netstat -plunt\r\nActive Internet connections (only servers)\r\nProto Recv-Q Send-Q Local Address           Foreign Address         State       PID\/Program name\r\ntcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      1919\/master\r\ntcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1318\/sshd\r\ntcp6       0      0 ::1:25                  :::*                    LISTEN      1919\/master\r\ntcp6       0      0 :::22                   :::*                    LISTEN      1318\/sshd\r\nudp        0      0 0.0.0.0:47445           0.0.0.0:*                           572\/avahi-daemon: r\r\nudp        0      0 0.0.0.0:5353            0.0.0.0:*                           572\/avahi-daemon: r\r\n<\/pre>\n<h2>Commands Mentioned:<\/h2>\n<ul>\n<li><span class=\"fw-bold\">yum<\/span> &#8211; package manager for RHEL\/CentOS\/Oracle Linux<\/li>\n<li><span class=\"fw-bold\">sudo<\/span> &#8211; execute a command with administrative privileges<\/li>\n<li><span class=\"fw-bold\">epel-release<\/span> &#8211; repository package for EPEL<\/li>\n<li><span class=\"fw-bold\">net-tools<\/span> &#8211; package that includes ifconfig and netstat<\/li>\n<\/ul>\n<h2>Conclusion:<\/h2>\n<p>In this guide, we have shown you how to install ifconfig and netstat on RHEL 7.0\/CentOS 7.0\/Oracle Linux 7. By enabling the EPEL repository and installing the net-tools package, you can use ifconfig and netstat to display information about network interfaces and network connections respectively.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction: ifconfig and netstat are two popular network tools that are commonly used in Linux-based operating systems. These tools can be used to display information about network interfaces and network&#8230;<\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"wds_primary_category":0,"footnotes":""},"categories":[2055],"tags":[1259,1546],"class_list":["post-5395","post","type-post","status-publish","format-standard","hentry","category-centos","tag-centos-7-0","tag-linux-utilities"],"_links":{"self":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/5395","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/comments?post=5395"}],"version-history":[{"count":0,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/5395\/revisions"}],"wp:attachment":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media?parent=5395"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/categories?post=5395"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/tags?post=5395"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}