0% found this document useful (0 votes)
24 views1 page

Linux Notes

The document provides instructions for configuring an IP address in Linux using three methods: the 'ip' command, network configuration files, and Network Manager. It includes specific commands and file paths for different Linux distributions such as Ubuntu, Debian, RHEL, CentOS, and Fedora. The document also outlines the necessary configurations for static IP addresses, including gateway and DNS settings.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views1 page

Linux Notes

The document provides instructions for configuring an IP address in Linux using three methods: the 'ip' command, network configuration files, and Network Manager. It includes specific commands and file paths for different Linux distributions such as Ubuntu, Debian, RHEL, CentOS, and Fedora. The document also outlines the necessary configurations for static IP addresses, including gateway and DNS settings.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

to config IP address in linux:

=============================
sudo -s
enter root password

1. using ip command:
ip addr add [Link]/24 dev ens3
ip link set dev ens3 up

ip a
ifconfig

[Link] network configuration file:


nano or vi /etc/network/interfaces (ubuntu/debian)
nano or vi /etc/sysconfig/network-scripts/ifcfg-* (RHEL/CentOS/Fedora)
systemctl restart networking (ubuntu/debian)
systemctl restart network (RHEL/CentOS/Fedora)

ip a
ifconfig

for (ubuntu/debian):
auto ens3
iface ens3 inet static
address [Link]
netmask [Link]
gateway [Link]
dns-nameservers [Link] [Link]

for (RHEL/CentOS/Fedora):
Device=ens3
BOOTPROTO=static
IPADDR=[Link]
NETMASK=[Link]
GATEWAY=[Link]
DNS1=[Link]
DNS2=[Link]
ONBOOT=yes

[Link] network manager:


nmcli
wired or wireless
manual
address and netmask

ip a
ifconfig

You might also like