约 1,980,000 个结果
在新选项卡中打开链接
  1. 123

    The hostname command in Linux is used to view or set the system's hostname or NIS (Network Information System) domain name. A hostname is a unique name assigned to a computer on a network to identify it. This command is essential for network management and troubleshooting.

    Basic Usage

    To display the current hostname, simply type:

    hostname

    Options and Examples

    Display Alias Name

    To get the alias name of the host system (if any):

    hostname -a

    Display All FQDNs

    To get all Fully Qualified Domain Names (FQDNs) of the host system:

    hostname -A

    Set Hostname

    To set a new hostname temporarily:

    sudo hostname new-hostname

    To set a hostname from a file (requires superuser):

    sudo hostname -F filename

    Display Domain Name

    To get the domain name of the host:

    hostname -d

    Display FQDN

    To get the Fully Qualified Domain Name (FQDN):

    hostname -f

    Display IP Addresses

    To get the IP address of the host:

    hostname -i

    To get all IP addresses:

    hostname -I

    Display Short Hostname

    To get the short hostname (the part before the first dot):

    这是否有帮助?

    查看以下来源的结果:

  2. Linux hostname命令教程:如何显示或设置主机名(附实例详解和 …

  3. How to Use the hostname Command in Linux - phoenixNAP

  4. hostname(1) — Linux manual page - man7.org

  5. Linux查看主机名和IP,详解使用hostname命令 - Labno3

    2021年8月4日 · 在本指南中,详细记录了如何在Linux/Unix系统上使用hostname命令,检索和设置当前系统的主机、域名或节点名称。 主机名是很重要的,因为大多数网络程序都会使用它们来识别你的机器。

  6. Linux Command hostname

  7. 其他用户还问了以下问题
  8. hostname 命令,Linux hostname 命令详解:显示和设置系统的主 …

  9. The “hostname” Command in Linux [12 Practical …

    2024年4月28日 · In Linux, the hostname command is a helpful tool to change the hostname and perform modifications related to the hostname. It also helps to see the DNS (Domain Name System) and NIS (Network Information Service) …

  10. Master the Hostname Command in Linux: A Complete Guide for …

  11. Demystified: A Complete Guide to the Linux "hostname" …

  12. 某些结果已被删除