The hostname command

show or set the system's host name 3 examples from the lessons of the IVski Linux Playground — try them in the terminal next to them.

Options in the examples

-f, --fqdn, --long
Display the FQDN (Fully Qualified Domain Name).
-I, --all-ip-addresses
Display all network addresses of the host.

Examples

hostname
hostname -I

Show all IP addresses

hostname -f

Fully qualified domain name

Lessons that use hostname