Recently it changed to :
<username>@(none):$
When I need to invoke sudo I get:
<username>@(none):~$ sudo <command>
sudo: unable to resolve host
sudo: unable to resolve host
sudo: unable to resolve host
sudo: unable to resolve host
[sudo] password for <username>:
I can set the hostname with:
sudo hostname <hostname>
but the new hostname is not retained after reboot.
Shouldn't the following define my hostname?
<username>@(none):~$ cat /etc/hosts
127.0.0.1 localhost
127.0.1.1 <hostname>
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
<username>@(none):~$ cat /etc/hostname
<hostname>
How can I restore <hostname> permanently?
TIA
Paul
ame>:$<br><br>Recently it changed to:<br><br><username>@(none):$<b=
r><br>When I need to invoke sudo I get:<br><br><username>@(none):~$ s=
udo <command><br>sudo: unable to resolve host<br>sudo: unable to reso=
lve host<br>sudo: unable to resolve host<br>sudo: unable to resolve host<br=
>[sudo] password for <username>:<br><br>I can set the hostname with:<=
br><br>sudo hostname <hostname><br><br>but the new hostname is not re=
tained after reboot.<br><br>Shouldn't the following define my hostname?<br>=
<br><username>@(none):~$ cat /etc/hosts<br>127.0.0.1 localhost<br>127=
.0.1.1 <hostname><br># The following lines are desirable for IPv6 cap=
able hosts<br>::1 localhost ip6-localhost ip6-loopback<br>fe00::0 ip6-local=
net<br>ff00::0 ip6-mcastprefix<br>ff02::1 ip6-allnodes<br>ff02::2 ip6-allro=
uters<br>ff02::3 ip6-allhosts<br><br><username>@(none):~$ cat /etc/ho=
stname<br><hostname><br><br>How can I restore <hostname> perman=
ently?<br>TIA<br>Paul<br><br><br><br><br></div></body></html>
Re: problem with hostname by Fred Roller on
2009-07-07T03:09:36+00:00
On Tue, 2009-07-07 at 02:51 +0000, pkaplan1@comcast.net wrote:
> How can I restore <hostname> permanently?
Using whatever editor your comfortable with edit /etc/hostname as root:
sudo vi /etc/hostname
"Life is like Linux, simple. If you are fighting it, you are doing
something wrong."
Re: problem with hostname by on
2009-07-07T03:23:30+00:00
<hostn ame>
<username>@(none):~$
and still <hostname> is not retained thru reboot.
Paul
"Life is like Linux, simple. If you are fighting it, you are doing
something wrong."
<username>@(none):~$<br><br>and still <hostname> is not retaine=
d thru reboot.<br>Paul<br><br>s root:<br>sudo vi /etc/hostname<br><br><br><br>