Introduction to Networking in Linux
To check the system hostname
[root@localhost ~]# hostname
localhost.localdomain
Assigning the hostname - temporarly
Syntax:-
[root@localhost ~]# hostname <computer>
EX:- To assign the hostname as server.linuxnunixhelp.com
[root@localhost ~]# hostname server.linuxnunixhelp.com
To check the hostname assigned
[root@localhost ~]# hostname
server.linuxnunixhelp.com
Assigning hostname ---- Permanently
Edit the configuration file /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=server.linuxnunixhelp.com
:wq!
To check the system hostname
[root@localhost ~]# hostname
localhost.localdomain
Assigning the hostname - temporarly
Syntax:-
[root@localhost ~]# hostname <computer>
EX:- To assign the hostname as server.linuxnunixhelp.com
[root@localhost ~]# hostname server.linuxnunixhelp.com
To check the hostname assigned
[root@localhost ~]# hostname
server.linuxnunixhelp.com
Assigning hostname ---- Permanently
Edit the configuration file /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=server.linuxnunixhelp.com
:wq!
0 comments:
Post a Comment