![]() You will need to have sudo rights to install packages on your system. In order to install the “net-tools”, simply run the “apt-get install” command with the “net-tools” package. In order to use the ifconfig command, you need to have the “net-tools” package installed on your host. However, in this case, you are presented with the subnet mask which is not very handy if you are looking to allocate an IP to a new host on this subnet. $ hostname -IĪs you can see, in this case, my network adapter owns two different IP addresses : Note that multiple IP addresses will be shown if you own IPv4 and IPv6 addresses on the same interface. In order to find your private IP address, use the “hostname” command with the “-I” option for IP address. The “hostname” command is quite popular on Linux operating systems and it is used in order to get and set the hostname of a server. If this is the case, it will appear here. IPv6 addresses : this section might not appear in your network adapter configuration as not all interfaces are running IPv6 addresses. ![]() Layer 3 information : what you are probably interested in which is your IPv4 address in CIDR notation, the subnet broadcast address as well as the address lifetime (valid_lft and preferred_lft).Layer 2 information : in this case, you are running on the Ethernet protocol with a given MAC address and a broadcast address.Network adapter general information : its state (up or down), its MTU as well as the qlen for the Etherner buffer queue.In this case, the server has two network interfaces : the loopback address (or localhost) and the “enp0s3” interface.įor this network interface, you are presented with multiple information : When running the “ip” command, you will be presented with all the network interfaces available on your host. The easiest way to get your private IP address on Linux is to use the “ip” command with the “a” option for “address”.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |