Skip to main content

Hostname and IP configuration in linux

 

How to set hostname in linux?


Syntax: # hostnamectl set-hostname <hostname> 
              # echo <hostname>  > /etc/hostname




How to check and  assing IP to server in linux?

To check IP of system

# ip a
# ip addr show

Through Graphical Console

# nmtui 


Through CLI

# nmcli


If command not found then try to install package  NetworkManager and NetworkManager-tui



IP allocation using ifconfig utility

Comments