Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


I am having trouble permanently removing 127.0.1.1 from debian hosts file
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

I am having trouble permanently removing 127.0.1.1 from debian hosts file

yongsikleeyongsiklee Member, Patron Provider

I am having trouble permanently removing 127.0.1.1.
While it is said that that entry can be replaced with an IP address and when I did that, it reappears in the hosts file after rebooting. This is the first time this entry shows back up after it being removed. Any solution?

Comments

  • chattr +i /etc/hosts

  • ehabehab Member

    @jiggawattz said:
    chattr +i /etc/hosts

    unless you get permission denied even with root.
    i recall it was lxc or some non kvm config.

    Thanked by 1yongsiklee
  • @yongsiklee said:
    I am having trouble permanently removing 127.0.1.1.
    While it is said that that entry can be replaced with an IP address and when I did that, it reappears in the hosts file after rebooting. This is the first time this entry shows back up after it being removed. Any solution?

    Could you explain what you /actually/ are trying to achieve?
    Probably what you think is a solution (removing the line with 127.0.1.1) is not what you want.

    Thanked by 1yongsiklee
  • yongsikleeyongsiklee Member, Patron Provider

    @reinob said:

    @yongsiklee said:
    I am having trouble permanently removing 127.0.1.1.
    While it is said that that entry can be replaced with an IP address and when I did that, it reappears in the hosts file after rebooting. This is the first time this entry shows back up after it being removed. Any solution?


    Could you explain what you /actually/ are trying to achieve?
    Probably what you think is a solution (removing the line with 127.0.1.1) is not what you want.

    I am replacing 127.0.1.1 with a public IP address but it came back (adding to the replacing entry) after rebooting.

  • yongsikleeyongsiklee Member, Patron Provider
    edited March 2023

    @jiggawattz said:
    chattr +i /etc/hosts

    Thank you. It worked! :D

    *Just for the reminder for myself, chattr -i will remove immutability^^

  • yongsikleeyongsiklee Member, Patron Provider

    @yongsiklee said:

    @jiggawattz said:
    chattr +i /etc/hosts

    Thank you. It worked! :D

    *Just for the reminder for myself, chattr -i will remove immutability^^

    Oops! Got error msgs while installing Proxmox.
    I guess it was not a permanent solution. :'(

  • If this is for installing proxmox on debian, then disable cloud init for hosts override. That will permanently solve the issue.

    Thanked by 2Falzo yongsiklee
Sign In or Register to comment.