Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Hostname On Linux

View

hostname

Result:

linux-host-name

Change

First:

sudo hostnamectl set-hostname new-linux-host-name

Then, update /etc/hosts entry to reflect the new name.

Finally, use hostname again to verify the change:

hostname

Result:

new-linux-host-name