Hostname Command: Display and Set Hostname in Linux
The 'hostname' command is used to display or set the hostname of a computer.
To display the current hostname, simply type 'hostname' in the command line and press Enter.
To set a new hostname, use the 'hostname' command followed by the desired hostname. For example, to set the hostname to 'mycomputer', type 'hostname mycomputer' and press Enter. Note that changing the hostname usually requires administrative privileges.
原文地址: https://www.cveoy.top/t/topic/UDX 著作权归作者所有。请勿转载和采集!