IT/Linux
리눅스(CentOS,RHEL)에서 호스트네임(Hostname) 변경
akionz
2020. 2. 28. 16:50
리눅스(CentOS,RHEL)에서 호스트네임(Hostname) 변경
- 호스트네임 변경 [임시]
[root@centos8 ~]# hostname centos8 [root@centos8 ~]# hostname test [root@centos8 ~]# hostname test [root@centos8 ~]# |
- 호스트네임 변경 [영구적->CentOS, RHEL 6버전 이하]
[root@centos7 ~]# vi /etc/sysconfig/network HOSTNAME=centos7 [root@centos7 ~] |
- 호스트네임 변경 [영구적->CentOS, RHEL 7버전 이상]
[root@centos8 ~]# hostnamectl set-hostname test [root@centos8 ~]# hostname test [root@centos8 ~]# |
호스트네임 영구적 변경 후, 콘솔이나 세션 재접속 하면 변경완료, 서버 재부팅 추천!
정보가 도움이 되었으면 아래 [♡공감] 버튼 한번 눌러주세요^^