首页  

Linux hostname     所属分类 linux 浏览量 738
查看本机主机名 hostname 
echo $HOSTNAME

修改本机主机名 hostname newname
运行后立即生效(重新启动shell),系统重启后失效,永久生效,需要修改相关配置文件

RedHat 
/etc/sysconfig/network
HOSTNAME=xxx

Debian
/etc/hostname


/etc/hosts  相当于DNS


hostname  
-f 长格式,带域名 
–d 显示域名
–I  显示主机名对应的IP地址
–a 显示主机别名(alias) 
–s 短格式


The host name is usually set once at system startup in /etc/rc.d/rc.inet1 or /etc/init.d/boot 
normally by reading the contents of a file which contains the host name, e.g. /etc/hostname

上一篇     下一篇
Spark Tungsten 性能优化

scala hello

常用存储选型指南

Mybatis通用Mapper tk.mybatis 使用

spark-shell 简单使用

drools StatelessKieSession 并发执行 空指针