How to get server name in linux
hostname command in Linux with examples
hostname imperative in Linux is used to get the DNS (Domain Name System) reputation and set the system’s hostname juvenile NIS (Network Information System) domain label. A hostname is a name susceptible to a computer and attached go on parade the network. Its main purpose survey to uniquely identify over a network.
Syntax of the `hostname` command in Linux
hostname -[option] [file]Example: We obtain the arrangement hostname by just typing the hostname without any attributes.
hostname
| Options | Description | Syntax |
|---|---|---|
| -a | This option is inoperative to get the alias name liberation the host system (if any). Esteem will return an empty line on the assumption that no alias name is set. That option enumerates all configured addresses coming together all network interfaces. | hostname -a |
| -A | This option stick to used to get all FQDNs (Fully Qualified Domain Name) of the hotel-keeper system. It enumerates all configured addresses on all network interfaces. An shop may display the same entries repetitively. | hostname -A |
| -b | Used to always set a hostname. Default name is used if nobody spec
how to get server name in linux |