宝塔服务器面板,一键全能部署及管理,送你10850元礼包,点我领取

Hostwinds是成立于2010年的美国主机商,国内站长对它应该都不陌生,使用的非常多的是Hostwinds美国云主机VPS产品。由于Hostwinds 美国云主机VPS采用的是SSD硬盘,而且所有方案都有全球CDN加速功能,因而也备受用户青睐。改主机名是使用Linux操作系统的一项功能,通过设置主机名可以轻松确定两个服务器之间的差异。除了服务器的个人标识外,主机名还用于大多数网络进程,其他应用程序也可能依赖于此。那么HostwindsVPS主机名要怎么更改呢?

Hostwinds教程:如何在Hostwinds Linux主机中更改主机名-风君子博客

(一)查询当前Hostwinds主机名

第一步:通过SSH登录到服务器。

第二步:键入以下命令,然后按键盘上的Enter键。

hostname

(二)如何在CentOS 7和Debian 9和Ubuntu 16.04及更高版本中更改主机名

第一步:以具有sudo权限的用户身份通过​​SSH登录到服务器。

第二步:输入以下命令,将NEWHOSTNAMEHERE(举例)替换为您要为系统设置的主机名。

sudo hostnamectl set-hostname NEWHOSTNAMEHERE

第三步:对于主机上的服务需要您重启下服务器才能看得到更改。另外,您也可以简单地重新引导服务器以执行更改(该NEWHOSTNAMEHERE在所有小写字母,一般就会进入)。

输入以下命令以确认已进行此更改,然后按键盘上的Enter键。

hostname

如果使用其他版本的Linux,则可以通过将/ etc / hostname上的文件修改为要设置的主机名来更改主机名。这将需要重新启动要更改主机名的服务器或服务,包括网络服务。

(本文由美国主机侦探原创,转载请注明!)

Hostwinds教程:如何在Hostwinds Linux主机中更改主机名-风君子博客

微信扫码加好友进群

主机优惠码及时掌握

4

标签:Hostwinds Hostwinds VPS Linux Linux vps

.entry-tags .tag-links a{text-decoration:none;}
.single #primary .entry-footer .entry-like a{text-decoration: none;}
/*短代码*/
.couponPost{display: flex;flex-direction: row;font-size: 15px;padding: 15px 0px;border-bottom: 1px dashed #ccc;overflow:hidden;}
.couponPost .couponPostRight{margin-left: 20px;overflow: hidden;width: 616px;display: flex;flex-direction: column;justify-content: space-between;}
.couponPost .couponPostLeft{position: relative;overflow:hidden;width:166px;height:130px;}
.couponPostImage{height: 100%;display: flex;border: 1px solid #ccc;border-radius: 5px;}
.couponPostRight h2.title{margin-bottom:0;font-size:16px;}
.couponPostDesc{text-align: justify;}
.couponPostLeft .couponPostImage::before{content: \’促销\’;position: absolute;color: #fff;background-color: red;font-size: 14px;width: 88px;transform: rotate(-45deg);top: 9px;left: -23px;text-align: center;}
.couponPostRight h2.title a{color: #333;text-decoration: none;}
a.linkPost{display: inline-block;color: #E14036;padding: 0px 10px;border: 1px dashed #e14036;background-color: #FFD886;line-height: 20px;}
.couponPostLink a{margin-left:0!important;text-decoration:none;}
.imageNone::before{content:none!important;}