How to modify HOSTS file
#1
I am trying to modify the "hosts" file so my Pine64 can be identified on my network with something other than "localhost".  However, when I bring up the file properties, there is no Change button to allow me to change the permissions.  Ideas?
#2
(02-01-2017, 07:34 PM)rvalecruz Wrote: I am trying to modify the "hosts" file so my Pine64 can be identified on my network with something other than "localhost".  However, when I bring up the file properties, there is no Change button to allow me to change the permissions.  Ideas?

hi , the answer to your question can be complicated , and depends on your network setup;  whether you have a domain name server, and some other factors.  Basically, try the following in a terminal:

sudo -i

hostname  yournewname

( then use your editor of choice and edit  /etc/hosts )   I prefer vi, you might like nano or pluma:

vi  /etc/hosts

( leave the loopback alone:   127.0.0.1  localhost )

( add or change the line:  127.0.1.1  yournewname )

-----------------------------

The other machines on your network need to be able to resolve yournewname to the machines ip address, and you do that by either 1) adding the machine to your domain name server, or 2) editing each machine's /etc/host file with a line matching the ip address and yournewname.

note: as you use your terminal and logon and logoff of sudo -i  you will get an error "unable to resolve name"  until you add the second loop line in  /etc/hosts   127.0.1.1  yournewname

note: obviously , for this to work your machine must have 1) either a static IP address, or 2) a reserved address issued by dhcpcd.
marcushh777    Cool

please join us for a chat @  irc.pine64.xyz:6667   or ssl  irc.pine64.xyz:6697

( I regret that I am not able to respond to personal messages;  let's meet on irc! )


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to modify IMEI Hoook 6 13,183 11-19-2019, 02:39 PM
Last Post: tophneal
  I can get Internet Connection, However I cannot download APK File (Kitkat and Lollipo deniyulianti 0 2,473 10-15-2016, 07:28 AM
Last Post: deniyulianti
  OTA file mikey0000 11 15,593 08-21-2016, 08:18 AM
Last Post: tllim
  Access file systems nanoprobe 6 9,490 08-19-2016, 12:33 AM
Last Post: nanoprobe
  How to modify *.conf files? gbjensen 7 11,845 07-09-2016, 01:05 AM
Last Post: gbjensen

Forum Jump:


Users browsing this thread: 1 Guest(s)