hostname
This article is a Draft. Help us to complete it.
hostname hostname -s hostname -f (FQDN) hostname -A All long host names (FQDNs) hostname -i hostname -I (--all-ip-addresses)
Help
hostname --help Usage: hostname [-b] {hostname|-F file} set host name (from file) hostname [-a|-A|-d|-f|-i|-I|-s|-y] display formatted name hostname display host name {yp,nis,}domainname {nisdomain|-F file} set NIS domain name (from file) {yp,nis,}domainname display NIS domain name dnsdomainname display dns domain name hostname -V|--version|-h|--help print info and exit Program name: {yp,nis,}domainname=hostname -y dnsdomainname=hostname -d Program options: -a, --alias alias names -A, --all-fqdns all long host names (FQDNs) -b, --boot set default hostname if none available -d, --domain DNS domain name -f, --fqdn, --long long host name (FQDN) -F, --file read host name or NIS domain name from given file -i, --ip-address addresses for the host name -I, --all-ip-addresses all addresses for the host -s, --short short host name -y, --yp, --nis NIS/YP domain name Description: This command can get or set the host name or the NIS domain name. You can also get the DNS domain or the FQDN (fully qualified domain name). Unless you are using bind or NIS for host lookups you can change the FQDN (Fully Qualified Domain Name) and the DNS domain name (which is part of the FQDN) in the /etc/hosts file.
Related terms
hostnamectl set-hostname
dnsdomainname
domainname
virt-sysprep -d testvm --hostname testvm --enable user-account --keep-user-accounts MY_USERNAME_TO_KEEP
- UTS namespace
- hostname (Cisco)
hostname:
option in docker compose file: docker-compose.yml- hostname: you must be root to change the host name
See also
- FQDN, DNS,
hostname, dnsdomainname, domainname, hostnamectl, /etc/hostname, /etc/resolv.conf, /etc/systemd/resolved.conf, hostname -f
dig, host, nslookup, delv, axfr, resolvectl query, dig -t NS, dig -t MX, dig -t TXT, dig -t SOA
- DNS: Linux DNS, IP,
systemd-resolve
,/etc/hosts
,whois
, Domain registrar,dig
,host
,nslookup
,scutil --dns
dnsmasq
,bind
,delv
,.local
,.internal, .onion
, FQDN, TTL,/etc/resolv.conf
,/etc/systemd/resolved.conf
,dscacheutil
(macOS),hostname, hostnamectl
,bind
,resolvectl status
, DNS sinkhole, Domain name server, LLMNR, Resource records:MX, TXT, NS
, CAA, SSHFP, Apex, CNAME, Wildcard DNS records, Subdomain, /etc/nsswitch.conf,1.1.1.1
,8.8.8.8, CoreDNS, dnsPolicy:
, Google Public DNS, DNS caches, Kubernetes ExternalDNS, DNS forwarding, IDNA2008, DNS-1035, Domain name registrars, Split-view DNS, Pi-hole, NextDNS - Linux, Linux Foundation, Linux Kernel, man, BusyBox,
coreutils
, ELF, taskset, shell, Linux distributions, X, Virtual console,whoami
,.cer
,-T
,install
, Link Time Optimization (LTO),--silent
, NixOS,util-linux
,execve
, LinuxKit, AlmaLinux, Rocky Linux
Advertising: