Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »


ip linkLink
show the interface

ip link show 

ip link show ens33

bring the interface up

ip link set dev ens33 up




ip addrLink

ip addr

ip addr show ens33





Private IP addresshttps://linuxhandbook.com/find-ip-address/

hostname -I

nmcli -p device show


Public IP addresshttps://www.tutorialspoint.com/find-my-public-ip-address-from-linux-command-line


Centos config file
dhcp

sudo more /etc/sysconfig/network-scripts/ifcfg-ens18

dhcp
sudo vi /etc/sysconfig/network-scripts/ifcfg-ens18

BOOTPROTO=dhcp
DEFROUTE=yes
DEVICE=ens18
DHCPV6C=no
MTU=1500
NM_CONTROLLED=yes
ONBOOT=yes
PEERDNS=yes
TYPE=Ethernet
USERCTL=no

static

sudo more /etc/sysconfig/network-scripts/ifcfg-ens18

static IP address
sudo vi /etc/sysconfig/network-scripts/ifcfg-ens18


UbuntuConfig file
DHCP
/etc/network/interfaces
auto eth1
  iface eth1 inet dhcp

sudo systemctl restart networking
Static




  • No labels