Linux Notes
Linux Notes
=============================
sudo -s
enter root password
1. using ip command:
ip addr add 100.1.1.1/24 dev ens3
ip link set dev ens3 up
ip a
ifconfig
ip a
ifconfig
for (ubuntu/debian):
auto ens3
iface ens3 inet static
address 100.1.1.1
netmask 255.255.255.0
gateway 100.1.1.254
dns-nameservers 8.8.8.8 8.8.4.4
for (RHEL/CentOS/Fedora):
Device=ens3
BOOTPROTO=static
IPADDR=10.1.1.1
NETMASK=255.255.255.0
GATEWAY=100.1.1.254
DNS1=8.8.8.8
DNS2=8.8.4.4
ONBOOT=yes
ip a
ifconfig