I am studying RHEL 7 and have some questions.
Using hostnamectl
command, I am getting information of RHEL 7 hostname and other.
If i want to change hostname there are some options using hostnamectl
:
[root@linux7 ~]# hostnamectl set-
set-chassis set-deployment set-hostname set-icon-name
To change hostname, static hostname set-hostname
is used. So what about set-icon-name
and --pretty
and which particular file it get changed?
Below example is given:
[root@linux7 ~]# hostnamectl set-hostname Linuxindia
[root@linux7 ~]# hostnamectl set-icon-name mumbailinux
[root@linux7 ~]# systemctl restart systemd-hostnamed.service
[root@linuxindia ~]# hostnamectl set-
set-chassis set-deployment set-hostname set-icon-name
[root@linuxindia ~]# hostnamectl set-hostname "hellolinux" --pretty
[root@linuxindia ~]# hostnamectl status
Static hostname: linuxindia
Pretty hostname: hellolinux
Icon name: mumbailinux
Chassis: vm
Machine ID: f3ffdd0447604e20a0a4278c56f4275b
Boot ID: 70c3c85ec1fa4dceb5a7f52789eed524
Virtualization: kvm
Operating System: Red Hat Enterprise Linux Server 7.3 Beta (Maipo)
CPE OS Name: cpe:/o:redhat:enterprise_linux:7.3:beta:server
Kernel: Linux 3.10.0-493.el7.x86_64
Architecture: x86-64
[root@linuxindia ~]#
Requesting to get some information on Transient hostname also.