hostname
Show or set the system's host name. More information: <https://manned.org/hostname>.
Install
- All systems
-
curl cmd.cat/hostname.sh
- Debian
-
apt-get install hostname
- Ubuntu
-
apt-get install hostname
- Arch Linux
-
pacman -S hostname
- Kali Linux
-
apt-get install hostname
- CentOS
-
yum install hostname
- Fedora
-
dnf install hostname
- Windows (WSL2)
-
sudo apt-get update
sudo apt-get install hostname
- Raspbian
-
apt-get install hostname
- Dockerfile
- dockerfile.run/hostname
Show or set the system's host name. More information: <https://manned.org/hostname>.
-
Show current host name:
hostname
-
Show the network address of the host name:
hostname -i
-
Show all network addresses of the host:
hostname -I
-
Show the FQDN (Fully Qualified Domain Name):
hostname --fqdn
-
Set current host name:
hostname new_hostname
© tl;dr; authors and contributors