Debian 10中设置主机名、域名、ip地址的方法

一、Hostname:hostnamectl set-hostname Rserver

                           用hostname查看主机名


 二、FQDN:nano /etc/hosts

            ipaddress                     要设置的域名                       主机名

例如:172.16.100.201         Server01.chinaskills.cn             Server01

                          用hostname  -f  查看域名

三、IP Address:nano /etc/network/interface

auto ens192                                                    //自启动
iface ens192 inet static                                   //静态ip
address 172.16.100.201de                             //IP地址
netmask 255.255.255.128                              //子网掩码
gateway 172.16.100.254                                 //网关

                         用ip add查看IP地址等信息 
 

本文具有视频操作,如有需要,请私信我!

猜你喜欢

转载自blog.csdn.net/m0_63101391/article/details/121376419