Debian 11.2にホスト名を変更する

2021年12月26日

環境情報
osバージョンを確認します
# cat /etc/debian_version
11.2

操作方法
1. 現在のホスト名を表示します
# hostname
debian

一時的ホスト名を変更します
root@debian:~# hostname cft
root@debian:~# hostname
cft

2.恒久的にホスト名を変更します
root@debian:~# hostnamectl set-hostname arkgame
設定確認

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
root@debian:~# hostnamectl
Static hostname: arkgame
Icon name: computer-vm
Chassis: vm
Machine ID: 463dc4f0e5274371a580e0a697fde5c5
Boot ID: cb0745b146d6462ea460b7ef4fc31d82
Virtualization: vmware
Operating System: Debian GNU/Linux 11 (bullseye)
Kernel: Linux 5.10.0-10-amd64
Architecture: x86-64
root@debian:~# hostnamectl Static hostname: arkgame Icon name: computer-vm Chassis: vm Machine ID: 463dc4f0e5274371a580e0a697fde5c5 Boot ID: cb0745b146d6462ea460b7ef4fc31d82 Virtualization: vmware Operating System: Debian GNU/Linux 11 (bullseye) Kernel: Linux 5.10.0-10-amd64 Architecture: x86-64
root@debian:~# hostnamectl
   Static hostname: arkgame
         Icon name: computer-vm
           Chassis: vm
        Machine ID: 463dc4f0e5274371a580e0a697fde5c5
           Boot ID: cb0745b146d6462ea460b7ef4fc31d82
    Virtualization: vmware
  Operating System: Debian GNU/Linux 11 (bullseye)
            Kernel: Linux 5.10.0-10-amd64
      Architecture: x86-64

 

Debian 11

Posted by arkgame