[user1@localhost~]$hostname
localhost.localdomain
[root@localhost~]#hostname Linux1.example.com
[root@Linux1~]#ifconfig
[root@localhost~]#vi /etc/hosts
192.168.1.100 Linux1.example.com Linux1
[root@Linux1~]#ifconfig <network_device_name> <IP
address> netmask <netmask_value>
Example:
[root@Linux1~]#ifconfig enp1s7 192.168.1.100 netmask
255.255.255.0
[root@Linux1~]#nmtui
Select Edit Connection
Select devices –Edit
Select Static (Manual method)
Configure IP Address ,Subnet Mask, DNS Server and
Default Gateway IP Address
Select Quit to proceed
#service network restart
#systemctl start network
#systemctl enable network
#systemctl start NetworkManager.service
#systemctl stop NetworkManager.service
#systemctl restart NetworkManager.service
#systemctl status NetworkManager.service
[root@Linux1~]#ifdown enp1s1
[root@Linux1~]#ifup enp1s1
[root@Linux1~]#ifconfig
The ss (socket statistics) command is a powerful tool in Linux used for examining sockets. Socket = (TCP Port + IP Address)
[root@Linux1~]#ss –ta