Forrest logo
back to context overview

hostnamectl

List of commands for hostnamectl:

  • hostnamectl:tldr:01d03 hostnamectl: Reset hostname to its default value.
    $ sudo hostnamectl set-hostname --pretty ""
    try on your machine
    explain this command
  • hostnamectl:tldr:d05c4 hostnamectl: Get the hostname of the computer.
    $ hostnamectl
    try on your machine
    explain this command
  • hostnamectl:tldr:e1bae hostnamectl: Set the hostname of the computer.
    $ sudo hostnamectl set-hostname "${hostname}"
    try on your machine
    explain this command
  • hostnamectl:tldr:e755d hostnamectl: Set a pretty hostname for the computer.
    $ sudo hostnamectl set-hostname --static "${hostname-example-com}" && sudo hostnamectl set-hostname --pretty "${hostname}"
    try on your machine
    explain this command
back to context overview