How To Get Host Name and Domain Name Of Linux?

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/get-host-name-domain-name-of-linux/
PINTEREST
PINTEREST
INSTAGRAM

Host name is the identifier of a system in the network. Host name can be get with different ways in Linux. Host name is generally put in the /etc/hostname file.

Get Host name By Echoing Host name File

We can echo host name file and get the host name very simple manner.

Get Host name By Echoing Host name File

Get Host name By Echoing Host name File

Get Host name With host name Command

We can get host name with host name command. This will only list host name and will not print domain related information.

Get Fully Qualified Host name

We can get fully qualified host name which provides full name with domain information.

Get Fully Qualified Host name

Get Fully Qualified Host name

Hostname File

Host name file /etc/hostname will only provide host name with fully qualified domain name. There will any no other data in this file.

Change Host name

Changing host name is easy as getting it. We will add new host name to the host name file with root privileges.

Change Hostname

Change Hostname

Get Domain Name

Domain name information is about the systems network configuration.

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/get-host-name-domain-name-of-linux/
PINTEREST
PINTEREST
INSTAGRAM

LEARN MORE  Linux pwd Command Tutorial With Examples

You may also like...

Leave a Reply

Your email address will not be published.

Enjoy this blog? Please spread the word :)