Unable to display IP address after using ifconfig on ubuntu18.04

604 Views Asked by At

all, After using ifconfig on ubuntu18.04, can get "eno1, eno2" related information, but the IP and netmask are not displayed, but now I need this IP for remote connection operations. The following solutions are given online:

  1. First usesudo dhclient eno1 to update the IP address
  2. Then run sudo ifconfig eno1
  3. reboot When I execute sudo dhclient eno1, the terminal is stuck for a long time without responding. I would like to ask how can I get my ubuntu IP. Looking forward to your answer~ return when run "ifconfig"
1

There are 1 best solutions below

0
BotKevin On

Pretty sure that the network interface is not up. Try ifup eno1. Also look into /etc/sysconfig/network-scripts if you want the interface to start on boot. If the corresponding file is not there you may have to generate it.