<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="fr">
	<id>https://knowledge.pinon-hebert.fr/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Etc%2Fhosts_debian</id>
	<title>Etc/hosts debian - Historique des versions</title>
	<link rel="self" type="application/atom+xml" href="https://knowledge.pinon-hebert.fr/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Etc%2Fhosts_debian"/>
	<link rel="alternate" type="text/html" href="https://knowledge.pinon-hebert.fr/mediawiki/index.php?title=Etc/hosts_debian&amp;action=history"/>
	<updated>2026-08-25T00:34:27Z</updated>
	<subtitle>Historique des versions pour cette page sur le wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://knowledge.pinon-hebert.fr/mediawiki/index.php?title=Etc/hosts_debian&amp;diff=2199&amp;oldid=prev</id>
		<title>Jpinon le 24 août 2026 à 21:50</title>
		<link rel="alternate" type="text/html" href="https://knowledge.pinon-hebert.fr/mediawiki/index.php?title=Etc/hosts_debian&amp;diff=2199&amp;oldid=prev"/>
		<updated>2026-08-24T21:50:59Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;fr&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Version précédente&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Version du 24 août 2026 à 21:50&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Ligne 1 :&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 1 :&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;== Le problème ==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;A partie de la version 11 (Buster) les distributions Debian (et les Ubuntu et autres qui en découlent) gèrent le &amp;lt;code&amp;gt;/etc/hosts&amp;lt;/code&amp;gt; d&amp;#039;une façon différente d&amp;#039;avant.  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;A partie de la version 11 (Buster) les distributions Debian (et les Ubuntu et autres qui en découlent) gèrent le &amp;lt;code&amp;gt;/etc/hosts&amp;lt;/code&amp;gt; d&amp;#039;une façon différente d&amp;#039;avant.  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l26&quot;&gt;Ligne 26 :&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 27 :&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Il y a donc deux solutions:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Il y a donc deux solutions:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Le fichier hosts.debian.tmpl ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;== Les solutions ==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=&lt;/ins&gt;== Le fichier hosts.debian.tmpl &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=&lt;/ins&gt;==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Je trouve que c&amp;#039;est la solution la plus simple.  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Je trouve que c&amp;#039;est la solution la plus simple.  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l62&quot;&gt;Ligne 62 :&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 65 :&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Il faut donc ajouter ses &amp;quot;hôtes&amp;quot; dans le fichier. Moi je fais ca après le &amp;lt;code&amp;gt;127.0.0.1 localhost&amp;lt;/code&amp;gt; mais finalement on fait ça ou on veut.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Il faut donc ajouter ses &amp;quot;hôtes&amp;quot; dans le fichier. Moi je fais ca après le &amp;lt;code&amp;gt;127.0.0.1 localhost&amp;lt;/code&amp;gt; mais finalement on fait ça ou on veut.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Solution &lt;/del&gt;/etc/cloud/cloud.cfg ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;= Le fichier &lt;/ins&gt;/etc/cloud/cloud.cfg ==&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Dans ce fichier il y a une section (il est long je donne pas tout):&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;cloud_init_modules:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Dans ce fichier il y a une section (il est long je donne pas tout):&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;cloud_init_modules:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   - seed_random&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   - seed_random&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key knowledge:diff:1.41:old-2198:rev-2199:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Jpinon</name></author>
	</entry>
	<entry>
		<id>https://knowledge.pinon-hebert.fr/mediawiki/index.php?title=Etc/hosts_debian&amp;diff=2198&amp;oldid=prev</id>
		<title>Jpinon le 24 août 2026 à 21:49</title>
		<link rel="alternate" type="text/html" href="https://knowledge.pinon-hebert.fr/mediawiki/index.php?title=Etc/hosts_debian&amp;diff=2198&amp;oldid=prev"/>
		<updated>2026-08-24T21:49:49Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;fr&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Version précédente&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Version du 24 août 2026 à 21:49&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l16&quot;&gt;Ligne 16 :&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 16 :&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#     /etc/cloud/cloud.cfg or cloud-config from user-data&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#     /etc/cloud/cloud.cfg or cloud-config from user-data&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;127.0.1.1 &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;labo labo&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;127.0.1.1 &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;hote.domaine.fr hote&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;127.0.0.1 localhost&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;127.0.0.1 localhost&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Jpinon</name></author>
	</entry>
	<entry>
		<id>https://knowledge.pinon-hebert.fr/mediawiki/index.php?title=Etc/hosts_debian&amp;diff=2197&amp;oldid=prev</id>
		<title>Jpinon : Page créée avec « A partie de la version 11 (Buster) les distributions Debian (et les Ubuntu et autres qui en découlent) gèrent le &lt;code&gt;/etc/hosts&lt;/code&gt; d&#039;une façon différente d&#039;avant.   Un truc qui marchait depuis plus de 50 ans :  Ajouter un nouveau hôte distant avec un :&lt;syntaxhighlight lang=&quot;bash&quot;&gt; sudo vi /etc/hosts &lt;/syntaxhighlight&gt;On croit que ca marche mais au prochain reboot... la modification est perdue.  Pourquoi changer un truc truc qui marche depuis 50 ans...... »</title>
		<link rel="alternate" type="text/html" href="https://knowledge.pinon-hebert.fr/mediawiki/index.php?title=Etc/hosts_debian&amp;diff=2197&amp;oldid=prev"/>
		<updated>2026-08-24T21:48:58Z</updated>

		<summary type="html">&lt;p&gt;Page créée avec « A partie de la version 11 (Buster) les distributions Debian (et les Ubuntu et autres qui en découlent) gèrent le &amp;lt;code&amp;gt;/etc/hosts&amp;lt;/code&amp;gt; d&amp;#039;une façon différente d&amp;#039;avant.   Un truc qui marchait depuis plus de 50 ans :  Ajouter un nouveau hôte distant avec un :&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt; sudo vi /etc/hosts &amp;lt;/syntaxhighlight&amp;gt;On croit que ca marche mais au prochain reboot... la modification est perdue.  Pourquoi changer un truc truc qui marche depuis 50 ans...... »&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Nouvelle page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;A partie de la version 11 (Buster) les distributions Debian (et les Ubuntu et autres qui en découlent) gèrent le &amp;lt;code&amp;gt;/etc/hosts&amp;lt;/code&amp;gt; d&amp;#039;une façon différente d&amp;#039;avant. &lt;br /&gt;
&lt;br /&gt;
Un truc qui marchait depuis plus de 50 ans :&lt;br /&gt;
&lt;br /&gt;
Ajouter un nouveau hôte distant avec un :&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo vi /etc/hosts&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;On croit que ca marche mais au prochain reboot... la modification est perdue.&lt;br /&gt;
&lt;br /&gt;
Pourquoi changer un truc truc qui marche depuis 50 ans... je ne sais pas. Ils ont surement de très très bonnes raisons mais ils nous saoulent! &lt;br /&gt;
&lt;br /&gt;
Bon si on regarde le contenu du fichier:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;# Your system has configured &amp;#039;manage_etc_hosts&amp;#039; as True.&lt;br /&gt;
# As a result, if you wish for changes to this file to persist&lt;br /&gt;
# then you will need to either&lt;br /&gt;
# a.) make changes to the master file in /etc/cloud/templates/hosts.debian.tmpl&lt;br /&gt;
# b.) change or remove the value of &amp;#039;manage_etc_hosts&amp;#039; in&lt;br /&gt;
#     /etc/cloud/cloud.cfg or cloud-config from user-data&lt;br /&gt;
#&lt;br /&gt;
127.0.1.1 labo labo&lt;br /&gt;
127.0.0.1 localhost&lt;br /&gt;
&lt;br /&gt;
# The following lines are desirable for IPv6 capable hosts&lt;br /&gt;
::1 localhost ip6-localhost ip6-loopback&lt;br /&gt;
ff02::1 ip6-allnodes&lt;br /&gt;
ff02::2 ip6-allrouters&amp;lt;/syntaxhighlight&amp;gt;C&amp;lt;nowiki&amp;gt;&amp;#039;est clairement expliqué suffit de lire le commentaire... ce que je n&amp;#039;avais pas fait sur mon Raspberry PI avec un micro écran de 5&amp;#039;&amp;#039;&amp;lt;/nowiki&amp;gt;. Ok ma faute mais quand même.&lt;br /&gt;
&lt;br /&gt;
Il y a donc deux solutions:&lt;br /&gt;
&lt;br /&gt;
== Le fichier hosts.debian.tmpl ==&lt;br /&gt;
Je trouve que c&amp;#039;est la solution la plus simple. &lt;br /&gt;
&lt;br /&gt;
Avant on faisait :&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo vi /etc/hosts&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Maintenant on fait :&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo vi /etc/cloud/templates/hosts.debian.tmpl&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Ils se sont fait plaisir sur le PATH!&lt;br /&gt;
&lt;br /&gt;
Le template ressemble à ça:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;## template:jinja&lt;br /&gt;
{#&lt;br /&gt;
This file (/etc/cloud/templates/hosts.debian.tmpl) is only utilized&lt;br /&gt;
if enabled in cloud-config.  Specifically, in order to enable it&lt;br /&gt;
you need to add the following to config:&lt;br /&gt;
   manage_etc_hosts: True&lt;br /&gt;
-#}&lt;br /&gt;
# Your system has configured &amp;#039;manage_etc_hosts&amp;#039; as True.&lt;br /&gt;
# As a result, if you wish for changes to this file to persist&lt;br /&gt;
# then you will need to either&lt;br /&gt;
# a.) make changes to the master file in /etc/cloud/templates/hosts.debian.tmpl&lt;br /&gt;
# b.) change or remove the value of &amp;#039;manage_etc_hosts&amp;#039; in&lt;br /&gt;
#     /etc/cloud/cloud.cfg or cloud-config from user-data&lt;br /&gt;
#&lt;br /&gt;
{# The value &amp;#039;{{hostname}}&amp;#039; will be replaced with the local-hostname -#}&lt;br /&gt;
127.0.1.1 {{fqdn}} {{hostname}}&lt;br /&gt;
127.0.0.1 localhost&lt;br /&gt;
&lt;br /&gt;
# The following lines are desirable for IPv6 capable hosts&lt;br /&gt;
::1 localhost ip6-localhost ip6-loopback&lt;br /&gt;
ff02::1 ip6-allnodes&lt;br /&gt;
ff02::2 ip6-allrouters&amp;lt;/syntaxhighlight&amp;gt;Si j&amp;#039;ai bien tout compris c&amp;#039;est pour que, après le DHCP le nom de domaine peut changer donc &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{fqdn}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; a une origine externe. De même si on change le hostname de la machine pas besoin de changer le &amp;lt;code&amp;gt;/etc/hosts&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Bon pourquoi pas....&lt;br /&gt;
&lt;br /&gt;
Il faut donc ajouter ses &amp;quot;hôtes&amp;quot; dans le fichier. Moi je fais ca après le &amp;lt;code&amp;gt;127.0.0.1 localhost&amp;lt;/code&amp;gt; mais finalement on fait ça ou on veut.&lt;br /&gt;
&lt;br /&gt;
== Solution /etc/cloud/cloud.cfg ==&lt;br /&gt;
Dans ce fichier il y a une section (il est long je donne pas tout):&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;cloud_init_modules:&lt;br /&gt;
  - seed_random&lt;br /&gt;
  - bootcmd&lt;br /&gt;
  - write_files&lt;br /&gt;
  - disk_setup&lt;br /&gt;
  - mounts&lt;br /&gt;
  - set_hostname&lt;br /&gt;
  - update_hostname&lt;br /&gt;
  - update_etc_hosts&lt;br /&gt;
  - ca_certs&lt;br /&gt;
  - rsyslog&lt;br /&gt;
  - users_groups&lt;br /&gt;
  - ssh&lt;br /&gt;
  - set_passwords&amp;lt;/syntaxhighlight&amp;gt;Il suffit ce commenter le   &amp;lt;code&amp;gt;- update_etc_hosts&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Personnellement je préfère la solution avec le template. Tant qu&amp;#039;à changer quelque chose utilisons la nouvelle methode.&lt;/div&gt;</summary>
		<author><name>Jpinon</name></author>
	</entry>
</feed>