Linux修改主机名命令1、如果只需要临时更改主机名,可以使用hostname命令。sudo hostname <new-hostname># 例如:sudo hostname myDebian这条命令不会更改etcho