$
학습 Linux 안내서
ko
XP:0
퀘스트 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 / SyntaxDescription
hostnamePrint current system hostname
hostnamectlDisplay comprehensive system and kernel status
sudo hostnamectl set-hostname prod-web-01Persistently set system hostname

검증 목표

  • ○
    Run hostname or hostnamectl to view current host
  • ○
    Run sudo hostnamectl set-hostname prod-web-01

퀘스트를 완료할 준비가 되셨나요? 80?