安装 CentOS7 Linux 第1张 屏幕快照 2019-08-19 12.52.47
安装 CentOS7 Linux 第2张 屏幕快照 2019-08-19 12.54.19

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。

安装 CentOS7 Linux 第3张 屏幕快照 2019-08-19 12.55.27
安装 CentOS7 Linux 第4张 屏幕快照 2019-08-19 12.55.56
安装 CentOS7 Linux 第5张 屏幕快照 2019-08-19 12.56.27
安装 CentOS7 Linux 第6张 屏幕快照 2019-08-19 12.58.08
安装 CentOS7 Linux 第7张 屏幕快照 2019-08-19 13.00.28
安装 CentOS7 Linux 第8张 屏幕快照 2019-08-19 13.00.18

查看主机名

//查看一下当前主机名的情况,查看全部三种主机名
hostnamectl   
 
//或者,查看全部三种主机名
hostnamectl status
 
//只查看静态、瞬态或灵活主机名,分别使用--static,--transient或--pretty选项
[root@xh00 ~]# hostnamectl --static
 
xh00
[root@xh00 ~]# hostnamectl --transient
 
xh01
[root@xh00 ~]# hostnamectl --pretty
 
 
//或者,查看到的是瞬态的(Tansient hostname)
hostname
 
//或者查看主机名配置文件,查看到的是静态的(Static hostname)
cat /etc/hostname

查看当前Linux操作系统相关信息(内核版本号、硬件架构、主机名称和操作系统类型等):

uname -a //查看到的是瞬态的(Tansient hostname)
cat /etc/redhat-release //查看操作系统环境

修改主机名

临时有效

hostname 主机名 //只能临时修改的主机名,当重启机器后,主机名称又变回来了。

hostname hx01

永久生效

hostnamectl set-hostname hx01

还有一个办法编辑 /etc/hostname 文件

vim /etc/hostname

重启命令

reboot  init 6   shutdown -r now

关机

poweroff  init 0  shoutdown -h now

安装图形

yum groupinstall "GNOME Desktop" "Graphical Administration Tools"

init 5
扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄