hostname / hostnamectl

How to set and modify hostnames

hostname commands

  • hostname and hostnamectl will display the static, transient hostnames (hostnamectl also provides other host information).
  • sudo nano /etc/hostname can be used to edit the hostname that will be displayed upon reboot or restart.
    • This can be done more easily from the command with sudo hostnamectl set-hostname NEWNAME
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x