How To Install Hostname On Debian, Ubuntu, Arch, Kali, CentOS, Fedora And Raspbian?
Install hostname
-
Debian
apt-get install hostname
Click to copy -
Ubuntu
apt-get install hostname
Click to copy -
Arch Linux
pacman -S hostname
Click to copy -
Kali Linux
apt-get install hostname
Click to copy -
CentOS
yum install hostname
Click to copy -
Fedora
dnf install hostname
Click to copy -
Raspbian
apt-get install hostname
Click to copy
Show or set the system's host name.
How to use hostname?
Below are few example commands for hostname that you can use in the terminal.
Show current host name:hostname
Click to copyShow the network address of the host name:hostname -i
Click to copyShow all network addresses of the host:hostname -I
Click to copyShow the FQDN (Fully Qualified Domain Name):hostname --fqdn
Click to copySet current host name:hostname new_hostname
Click to copy
Installing hostname command is simple. just copy one of the above commands for your operating system and paste it into terminal. This command is available for Debian, Ubuntu, Arch, Kali, CentOS, Fedora and Raspbian operating systems. Once you run the command it will install the latest version of hostname 2024 package in your OS.