クエスト 80NodeIdentifier
+200 XP
Managing System Hostnames (hostname & hostnamectl)
このクエストの対話型ターミナルを起動する→インストール不要 • ブラウザ上で完全動作
概念と概要
Every computer on a network possesses a hostname that identifies it to other machines and shell prompts (e.g., learner@bashquest:~$). In modern systemd environments:
- hostname: Displays the current simple system hostname.
- hostnamectl: Displays complete system identification metadata, including operating system release, kernel build version, hardware chassis, and virtualization hypervisor.
- sudo hostnamectl set-hostname : Persistently updates the hostname across reboots by modifying /etc/hostname and updating the systemd hostnamed daemon.
ミッションの手順
Check your current system hostname and system architecture with
hostnamectl (or hostname), then set a new production hostname using sudo hostnamectl set-hostname prod-web-01.コマンド構文リファレンス
| Command / Syntax | Description |
|---|---|
hostname | Print current system hostname |
hostnamectl | Display comprehensive system and kernel status |
sudo hostnamectl set-hostname prod-web-01 | Persistently set system hostname |
検証目標
- ○Run hostname or hostnamectl to view current host
- ○Run sudo hostnamectl set-hostname prod-web-01