recover hosts hostname names | mount -o remount,rw /

  1. Boot into recovery mode with steps from here: How do I boot into recovery mode?
    Steps 2 - 5 below are from the above question.
  2. Hold Shift after your BIOS has passed, then choose:
    "Advanced options → something ending with '(recovery mode)'"
  3. Choose the "Drop to root shell prompt" option
  4. Remount the root partition as R/W with this command:
    mount -o remount,rw /
    
  5. If you have separate partitions, execute this command to mount them:
    mount -a
    
  6. Edit the /etc/hosts file with this command :
    nano /etc/hosts  # Replace `nano` with your favourite command line editor
    
  7. Make the changes you want.
  8. Press these keys to save and exit it: Ctrl+X; Y; Enter
    Note: If there's a + between two keys, press those at the same time. If there's a ; between two key sequences, press the first sequence, then release it, then press the second.
  9. Reboot:
    reboot

Comments

Popular posts from this blog

HAproxy logging

tomcat catalina coyote jasper cluster

NFS mount add in fstab _netdev instead of default | firewall-cmd --list-all