Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2017
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. www.example.com
  2.  
  3. 127.0.0.1 www.example.com www
  4. [...]
  5.  
  6. hostnamectl set-hostname www
  7.  
  8. hostname -> www
  9. hostname -f -> www.example.com
  10.  
  11. Static hostname: www
  12. Icon name: computer-vm
  13. Chassis: vm
  14. Machine ID: [ID]
  15. Boot ID: [ID]
  16. Virtualization: microsoft
  17. Operating System: Ubuntu 16.04.1 LTS
  18. Kernel: Linux 4.4.0-59-generic
  19. Architecture: x86-64
  20.  
  21. hostname -> XXX
  22. hostname -f -> XXX.strato.net
  23.  
  24. Static hostname: www
  25. Transient hostname: XXX
  26. Icon name: computer-vm
  27. Chassis: vm
  28. Machine ID: [ID]
  29. Boot ID: [ID]
  30. Virtualization: microsoft
  31. Operating System: Ubuntu 16.04.1 LTS
  32. Kernel: Linux 4.4.0-59-generic
  33. Architecture: x86-64
  34.  
  35. description "set system hostname"
  36.  
  37. start on startup
  38.  
  39. task
  40. exec hostname -b -F /etc/hostname.mod; full=$(cat /etc/hostname.mod);short=(${full//./ }); hostnamectl set-hostname $short
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement