Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
ホスト名の命名規則について調査してみた
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
YouYou
May 29, 2021
Programming
0
11k
ホスト名の命名規則について調査してみた
詳細ブログ↓
https://zenn.dev/yuta28/articles/hostname-os-research
YouYou
May 29, 2021
Tweet
Share
More Decks by YouYou
See All by YouYou
AWSマネコンに複数のアカウントで入れるようになりました
yuhta28
2
270
今インフラ技術をイチから学び直すなら
yuhta28
1
270
AWSに詳しくない人でも始められるコスト最適化ガイド
yuhta28
3
650
Datadog外形監視基盤をEC2から ECSへ移行してみた
yuhta28
0
1.7k
アウトプット頑張ったら企業からLT登壇の依頼がきた話
yuhta28
1
1.8k
小さなことから始めるAWSコスト最適入門
yuhta28
1
1.3k
Datadogのコストも監視しよう
yuhta28
1
1k
Rcloneを使った定期的なストレージ同期
yuhta28
0
810
Pulumiを触ってみよう
yuhta28
1
2.7k
Other Decks in Programming
See All in Programming
最初からAWS CDKで技術検証してもいいんじゃない?
akihisaikeda
4
120
ポーリング処理廃止によるイベント駆動アーキテクチャへの移行
seitarof
3
830
DSPy入門 Pythonで実現する自動プロンプト最適化 〜人手によるプロンプト調整からの卒業〜
seaturt1e
1
660
文字コードの話
qnighy
44
17k
new(1.26) ← これすき / kamakura.go #8
utgwkk
0
2.2k
Agentic AI: Evolution oder Revolution
mobilelarson
PRO
0
140
CSC307 Lecture 14
javiergs
PRO
0
470
AI駆動開発の本音 〜Claude Code並列開発で見えたエンジニアの新しい役割〜
hisuzuya
4
500
The Ralph Wiggum Loop: First Principles of Autonomous Development
sembayui
0
3.7k
受け入れテスト駆動開発(ATDD)×AI駆動開発 AI時代のATDDの取り組み方を考える
kztakasaki
2
550
Claude Codeセッション現状確認 2026福岡 / fukuoka-aicoding-00-beacon
monochromegane
4
410
New in Go 1.26 Implementing go fix in product development
sunecosuri
0
420
Featured
See All Featured
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.1k
WCS-LA-2024
lcolladotor
0
480
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
290
How STYLIGHT went responsive
nonsquared
100
6k
Design in an AI World
tapps
0
170
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.2k
KATA
mclloyd
PRO
35
15k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
1.8k
Tell your own story through comics
letsgokoyo
1
840
Prompt Engineering for Job Search
mfonobong
0
180
Transcript
ホスト名の命名規則について 調査してみた
Name:ユータ Occupation:SRE Twitter:@Y0u281 (オーでなくゼロです) ブログ:https://zenn.dev/yuta28 自己紹介 Twitter 2
目次 • きっかけ • 疑問 • 検証 • 調査結果 •
おまけ • まとめ
きっかけ • CentOSからUbuntuへのサーバー移行 • 移行後にホスト名をCentOSのものに変更したら失敗した アンダースコアが消えてる
きっかけ • ホスト名を変更したが、正しく変更されなかった。 • RFCのルールではダメらしい A "name" (Net, Host, Gateway,
or Domain name) is a text string up to 24 characters drawn from the alphabet (A-Z), digits (0-9), minus sign (-), and period (.). ホスト名は24文字以下で英字、数字、ハイフン(-)、ピリオド(.)が使用できます。ピリオドは、 ドメイン名の区切りに限ってのみ使用できます。
疑問 • RFCのルールは厳密に守られているのか • OS毎にルールの遵守が異なるのか CentOSでアンダースコアをホスト名に 使えるのはなぜ?
検証 1. ホスト名にアンスコ(_)、アットマーク(@)、アスタリスク(*)を使えるか 2. ホスト名に日本語は使えるか 3. ホスト名の先頭に英字以外の文字が使えるか 4. ホスト名の最後にハイフン (-)、ピリオド(.)が使えるか
5. ホスト名の文字数に24文字以上設定できるか 6. 空白文字が使えるか • Ubuntu 20.04 • Amazon Linux 2 • Red Hat Enterprise Linux 8.3 • openSUSE 15.2 • Debian GNU/Linux 10
・Ubuntu ・Amazon Linux2 UbuntuとAmazon Linux2の比較 $ sudo hostnamectl set-hostname Yuta_Ubuntu@PC*AWS
#ルール①検証 $ hostname YutaUbuntuPCAWS $ sudo hostnamectl set-hostname Yuta_Amazon@Linux2*AWS #ルール①検証 $ hostname yuta_amazonlinux2aws $ sudo hostnamectl set-hostname Yuta- #ルール④検証 $ hostname Yuta $ sudo hostnamectl set-hostname Yuta- #ルール④検証 $ hostname yuta-
調査結果 検証 Ubuntu Amazon Linux2 RHEL openSUSE Debian ① ☓
△ △ △ ☓ ② ☓ ☓ ☓ ☓ ☓ ③ ◦ ◦ ◦ ◦ ◦ ④ ☓ △ △ △ ☓ ⑤ ◦ ◦ ◦ ◦ ◦ ⑥ ☓ ☓ ☓ ☓ ☓
おまけ はどうなの?
検証 1. ホスト名にアンスコ(_)、アットマーク(@)、アスタリスク(*)を使えるか 2. ホスト名に日本語は使えるか 3. ホスト名の先頭に英字以外の文字が使えるか 4. ホスト名の最後にハイフン (-)、ピリオド(.)が使えるか
5. ホスト名の文字数に24文字以上設定できるか 6. 空白文字が使えるか Windowsだしルール遵守で 全部使えないだろうなー
おまけ Windows Server 2019は日本語ホストネームが使えた!
まとめ • Ubuntu系はルール遵守が厳しい • Fedora系は寛容 • Windowsは独自性
ありがとうございました より詳しい内容は以下のブログで↓ Linuxのホスト名について調査して みた 14