{"id":12398,"date":"2019-03-26T22:50:17","date_gmt":"2019-03-26T22:50:17","guid":{"rendered":"http:\/\/www.appservgrid.com\/paw92\/?p=12398"},"modified":"2019-03-26T22:50:17","modified_gmt":"2019-03-26T22:50:17","slug":"find-out-all-live-hosts-ip-addresses-connected-on-network-in-linux","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/03\/26\/find-out-all-live-hosts-ip-addresses-connected-on-network-in-linux\/","title":{"rendered":"Find Out All Live Hosts IP Addresses Connected on Network in Linux"},"content":{"rendered":"<p>There are plenty of\u00a0<a href=\"https:\/\/www.tecmint.com\/command-line-tools-to-monitor-linux-performance\/\" target=\"_blank\" rel=\"noopener\">network monitoring tools<\/a>\u00a0you can find in the Linux ecosystem, that can generate for you a summary of the total number of devices on a network including all their IP addresses and more.<\/p>\n<p>However, sometimes what you actually need may be a simple command line tool that can provide you the same information by running a single command.<\/p>\n<p>This tutorial will explain you how to find out all live hosts IP addresses connected to a given network. Here, we will use\u00a0<a href=\"https:\/\/www.tecmint.com\/nmap-network-security-scanner-in-kali-linux\/\" target=\"_blank\" rel=\"noopener\">Nmap tool to find out all IP addresses<\/a>\u00a0of devices connected on a same network.<\/p>\n<p><b>Suggested Read:<\/b>\u00a0<a href=\"https:\/\/www.tecmint.com\/nmap-command-examples\/\" target=\"_blank\" rel=\"noopener\">29 Examples of \u2018Nmap\u2019 Commands for System\/Network Administration<\/a><\/p>\n<p>The\u00a0<a href=\"https:\/\/www.tecmint.com\/nmap-command-examples\/\" target=\"_blank\" rel=\"noopener\">Nmap<\/a>\u00a0(short form for\u00a0<strong>Network Mapper<\/strong>) is an open source, powerful and a very versatile command line tool for exploring networks,\u00a0<a href=\"https:\/\/www.tecmint.com\/audit-network-performance-security-and-troubleshooting-in-linux\/\" target=\"_blank\" rel=\"noopener\">perform security scans, network audit<\/a>\u00a0and\u00a0<a href=\"https:\/\/www.tecmint.com\/find-open-ports-in-linux\/\" target=\"_blank\" rel=\"noopener\">finding open ports on remote machine<\/a>\u00a0and so much more.<\/p>\n<p>In case you do not have\u00a0<strong>Nmap<\/strong>\u00a0installed on your system, run the appropriate command below for your distribution to install it:<\/p>\n<pre>$ sudo yum install nmap         [On <strong>RedHat<\/strong> based systems]\r\n$ sudo dnf install nmap         [On <strong>Fedora 22+<\/strong> versions]\r\n$ sudo apt-get install nmap     [On <strong>Debian\/Ubuntu<\/strong> based systems]\r\n<\/pre>\n<p><strong><br \/>\nOnce you have\u00a0<\/strong>Nmap installed, the syntax for using it is:<\/p>\n<pre>$ nmap  [scan type...]  options  {target specification}\r\n<\/pre>\n<p>Where the argument\u00a0<strong>{target specification}<\/strong>, can be replaced by\u00a0<strong>hostnames<\/strong>,\u00a0<strong>IP addresses<\/strong>,\u00a0<strong>networks<\/strong>\u00a0and so on.<\/p>\n<p>Therefore to list the IP addresses of all hosts connected to a given network, first of all identify the network and its subnet mask using the\u00a0<a href=\"https:\/\/www.tecmint.com\/ifconfig-command-examples\/\" target=\"_blank\" rel=\"noopener\">ifconfig command<\/a>\u00a0or\u00a0<a href=\"https:\/\/www.tecmint.com\/ip-command-examples\/\" target=\"_blank\" rel=\"noopener\">ip command<\/a>\u00a0like so:<\/p>\n<pre>$ ifconfig\r\nOR\r\n$ ip addr show\r\n<\/pre>\n<div id=\"attachment_23531\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/11\/Find-Network-Details-in-Linux.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-23531\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/11\/Find-Network-Details-in-Linux.png\" sizes=\"auto, (max-width: 798px) 100vw, 798px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/11\/Find-Network-Details-in-Linux.png 798w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/11\/Find-Network-Details-in-Linux-768x642.png 768w\" alt=\"Find Network Details in Linux\" width=\"798\" height=\"667\" aria-describedby=\"caption-attachment-23531\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-23531\" class=\"wp-caption-text\">Find Network Details in Linux<\/p>\n<\/div>\n<p>Next, run the\u00a0<strong>Nmap<\/strong>\u00a0command below:<\/p>\n<pre>$ nmap  -sn  10.42.0.0\/24\r\n<\/pre>\n<div id=\"attachment_23532\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/11\/Find-All-Live-Hosts-on-Network.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-23532\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/11\/Find-All-Live-Hosts-on-Network.png\" alt=\"Find All Live Hosts on Network\" width=\"678\" height=\"173\" aria-describedby=\"caption-attachment-23532\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-23532\" class=\"wp-caption-text\">Find All Live Hosts on Network<\/p>\n<\/div>\n<p>In the command above:<\/p>\n<ol>\n<li><code>-sn<\/code>\u00a0\u2013 is the type of scan, which means a ping scan. By default, Nmap performs port scanning, but this scan will disable port scanning.<\/li>\n<li><code>10.42.0.0\/24<\/code>\u00a0\u2013 is the target network, replace it with your actual network.<\/li>\n<\/ol>\n<p>For a comprehensive usage information, make an effort to look into Nmap man page:<\/p>\n<pre>$ man nmap\r\n<\/pre>\n<p>Else, run Nmap without any options and arguments to view a summarized usage information:<\/p>\n<pre>$ nmap\r\n<\/pre>\n<p>In addition, for those interested in learning security scanning techniques in Linux, you can read through this practical guide to\u00a0<a href=\"https:\/\/www.tecmint.com\/nmap-network-security-scanner-in-kali-linux\/\" target=\"_blank\" rel=\"noopener\">Nmap in Kali Linux<\/a>.<\/p>\n<p>Well, that\u2019s it for now, remember to send us your questions or comments through the response form below. You can as well share with us other methods for listing the IP addresses of all devices connected to a given network.<\/p>\n<p><a href=\"https:\/\/www.tecmint.com\/find-live-hosts-ip-addresses-on-linux-network\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are plenty of\u00a0network monitoring tools\u00a0you can find in the Linux ecosystem, that can generate for you a summary of the total number of devices on a network including all their IP addresses and more. However, sometimes what you actually need may be a simple command line tool that can provide you the same information &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/03\/26\/find-out-all-live-hosts-ip-addresses-connected-on-network-in-linux\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Find Out All Live Hosts IP Addresses Connected on Network in Linux&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-12398","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/12398","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/comments?post=12398"}],"version-history":[{"count":1,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/12398\/revisions"}],"predecessor-version":[{"id":12399,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/12398\/revisions\/12399"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/media?parent=12398"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/categories?post=12398"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/tags?post=12398"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}