ホスト名確認
1 2 |
$ hostname ip-192-168-0-230.ap-northeast-1.compute.internal |
ホスト情報詳細
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
$ hostnamectl ip-192-168-0-230.ap-northeast-1.compute.internal [ec2-user@ip-192-168-0-230 ~]$ hostnamectl Static hostname: ip-192-168-0-230.ap-northeast-1.compute.internal Icon name: computer-vm Chassis: vm 🖴 Machine ID: ec21706d0f90777d66e2bdacxxxxxxxx Boot ID: ce7acda3d06049f28c269660xxxxxxxx Virtualization: amazon Operating System: Amazon Linux 2023.5.20240805 CPE OS Name: cpe:2.3:o:amazon:amazon_linux:2023 Kernel: Linux 6.1.102-108.177.amzn2023.aarch64 Architecture: arm64 Hardware Vendor: Amazon EC2 Hardware Model: t4g.micro Firmware Version: 1.0 |
ホスト名変更
1 |
$ sudo hostnamectl set-hostname your_hostname |