Display Linux Hostname with hostname Command



Configuration for GNU Linux Fedora Computer using Linux Command

 

   The host name of Linux machine can be retrieve / display using the hostname command.  The hostname command can be use to change host name or just display hostname.  The command example below show the use of hostname command to display the host name on Fedora Linux machine. 

Display hostname Command Example:

# hostname 

# hostname -v

 

1.  To display Linux hostname just enter the hostname command, and then hit the Enter key.

display Fedora hostname

[root@fedora ~]# hostname

fedora.linux.com

[root@fedora ~]#

 

2. The hostname command with the -v option display the machine host name on verbose mode.

display Linux hostname

[root@fedora ~]# hostname -v

gethostname()=`fedora.linux.com'

fedora.linux.com

[root@fedora ~]#

 




0 comments: