The system hostname is maintained by the kernel.
Suppose you have changed the hostname of your system and you want to confirm that the change has taken place , you can check the hostname through the following commands :-
Quote:
E.x.
[root@server ~]# hostname
test.example.net
[root@server ~]# uname -n
test.example.net
[root@server ~]# cat /proc/sys/kernel/hostname
test.example.net
[root@server ~]# sysctl kernel.hostname
kernel.hostname = test.example.net
|
It may vary based on the different linux distributions.
If there are any more ways please post them as well ...