
<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://wiki.sabayonlinux.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.sabayonlinux.org/index.php?title=HOWTO:_Changing_the_hostname&amp;feed=atom&amp;action=history</id>
		<title>HOWTO: Changing the hostname - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.sabayonlinux.org/index.php?title=HOWTO:_Changing_the_hostname&amp;feed=atom&amp;action=history"/>
		<link rel="alternate" type="text/html" href="http://wiki.sabayonlinux.org/index.php?title=HOWTO:_Changing_the_hostname&amp;action=history"/>
		<updated>2013-05-18T08:39:41Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.19.4</generator>

	<entry>
		<id>http://wiki.sabayonlinux.org/index.php?title=HOWTO:_Changing_the_hostname&amp;diff=13735&amp;oldid=prev</id>
		<title>Jomiel: added Link to german article</title>
		<link rel="alternate" type="text/html" href="http://wiki.sabayonlinux.org/index.php?title=HOWTO:_Changing_the_hostname&amp;diff=13735&amp;oldid=prev"/>
				<updated>2012-08-20T13:13:19Z</updated>
		
		<summary type="html">&lt;p&gt;added Link to german article&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{I18n| [[HOWTO:_Wechseln_des_Hostnamens|de]] [[HOWTO:_Changing_the_hostname|en]] [[Tr:HOWTO: Changing the hostname|tr]]}}&lt;br /&gt;
&lt;br /&gt;
'''How to change the hostname of a computer running Sabayon Linux'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Note|In the example below I use the hostname &amp;quot;acertm8215&amp;quot; because I have an Acer TravelMate 8215 laptop, but obviously you can use whatever hostname you want.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
During installation of Sabayon Linux you may have accepted the default hostname of &amp;quot;localhost&amp;quot;, or you may have specified your own hostname (e.g. &amp;quot;sabayonx86&amp;quot;, &amp;quot;neptune&amp;quot; or whatever). In either case, at some point you may want to change the current hostname, and this article explains how to do it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Check the current hostname is properly configured&lt;br /&gt;
&lt;br /&gt;
   {{Console| &amp;lt;pre class=&amp;quot;clear&amp;quot;&amp;gt;uname -a&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
   {{Console| &amp;lt;pre class=&amp;quot;clear&amp;quot;&amp;gt;hostname&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
   {{Console| &amp;lt;pre class=&amp;quot;clear&amp;quot;&amp;gt;hostname -f&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
   {{Console| &amp;lt;pre class=&amp;quot;clear&amp;quot;&amp;gt;hostname -a&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
   {{Console| &amp;lt;pre class=&amp;quot;clear&amp;quot;&amp;gt;hostname -d&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Edit /etc/conf.d/hostname&lt;br /&gt;
&lt;br /&gt;
Change:&lt;br /&gt;
&lt;br /&gt;
   {{File|/etc/conf.d/hostname| &amp;lt;pre class=&amp;quot;clear&amp;quot;&amp;gt;HOSTNAME=&amp;quot;localhost&amp;quot;&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
to:&lt;br /&gt;
&lt;br /&gt;
   {{File|/etc/conf.d/hostname| &amp;lt;pre class=&amp;quot;clear&amp;quot;&amp;gt;HOSTNAME=&amp;quot;acertm8215&amp;quot;&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Edit /etc/hosts&lt;br /&gt;
&lt;br /&gt;
Change:&lt;br /&gt;
&lt;br /&gt;
   {{File|/etc/hosts| &amp;lt;pre class=&amp;quot;clear&amp;quot;&amp;gt;127.0.0.1 localhost localhost.localdomain localhost&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
to:&lt;br /&gt;
&lt;br /&gt;
   {{File|/etc/hosts| &amp;lt;pre class=&amp;quot;clear&amp;quot;&amp;gt;127.0.0.1 acertm8215 localhost.localdomain localhost&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Change the hostname stored in the kernel&lt;br /&gt;
&lt;br /&gt;
To see the current hostname:&lt;br /&gt;
&lt;br /&gt;
   {{Console| &amp;lt;pre class=&amp;quot;clear&amp;quot;&amp;gt;sysctl kernel.hostname&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
To change the current hostname:&lt;br /&gt;
&lt;br /&gt;
   {{Console| &amp;lt;pre class=&amp;quot;clear&amp;quot;&amp;gt;sysctl kernel.hostname=acertm8215&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Change netbios name in /etc/samba/smb.conf (as it defaulted to hostname &amp;quot;localhost&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Change:&lt;br /&gt;
&lt;br /&gt;
   {{File|/etc/samba/smb.conf| &amp;lt;pre class=&amp;quot;clear&amp;quot;&amp;gt;netbios name = localhost&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
   &lt;br /&gt;
to:&lt;br /&gt;
&lt;br /&gt;
   {{File|/etc/samba/smb.conf| &amp;lt;pre class=&amp;quot;clear&amp;quot;&amp;gt;netbios name = acertm8215&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
6. Change the hostname in /etc/dhcp/dhclient.conf (otherwise it will still give your old hostname to other nodes on the network to which your PC is connected):&lt;br /&gt;
&lt;br /&gt;
Change:&lt;br /&gt;
&lt;br /&gt;
   {{File|/etc/dhcp/dhclient.conf|&amp;lt;pre class=&amp;quot;clear&amp;quot;&amp;gt;&lt;br /&gt;
send host-name &amp;quot;localhost&amp;quot;;&lt;br /&gt;
supersede host-name &amp;quot;localhost&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
to:&lt;br /&gt;
&lt;br /&gt;
   {{File|/etc/dhcp/dhclient.conf|&amp;lt;pre class=&amp;quot;clear&amp;quot;&amp;gt;&lt;br /&gt;
send host-name &amp;quot;acertm8215&amp;quot;;&lt;br /&gt;
supersede host-name &amp;quot;acertm8215&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Note|The above assumes that dhclient is the DHCP client running on your PC (dhclient is currently the DHCP client that Sabayon Linux uses by default). However, if you decide to use a different DHCP client (e.g. dhcpcd) then you will have to edit a different file.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. Reboot (or restart networking).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
8. Repeat Step 1 to make sure the new hostname is set up correctly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Article created by Fitzcarraldo on 8 January 2009.&lt;/div&gt;</summary>
		<author><name>Jomiel</name></author>	</entry>

	</feed>