fedora修改主机名_更改Fedora Linux的主机名

fedora修改主机名

Different Linux distros have different method to set the hostname. On Fedora Linux, it is quite simple.

不同的Linux发行版具有不同的设置主机名的方法。 在Fedora Linux上 ,这非常简单。

在较新的Fedora版本中 (On newer Fedora releases )

At least from Fedora 19 (sorry, no sure the exact earliest version):

至少从Fedora 19起(抱歉,不确定确切的最早版本):

You need to edit the file /etc/hostname which just contains the hostname.

您需要编辑仅包含主机名的文件/etc/hostname hostname。

在较旧的Fedora版本中 (On older Fedora releases )

Sorry, I do not know the exact version till which you need to use the above method. At least from Fedora 12 to Fedora 17, you need to use this method.

抱歉,我不知道需要使用上述方法的确切版本。 至少从Fedora 12到Fedora 17,您需要使用此方法。

On Fedora, you need to use this method.

在Fedora上,您需要使用此方法。

Open the /etc/sysconfig/network file

打开/etc/sysconfig/ network文件

# vim /etc/sysconfig/network

Find the line starting with

查找以以下内容开头的行

HOSTNAME=

Assign the hostname for this computer to this variable. For example, to set the hostname to ericpc.systutorials.com, just set

将此计算机的主机名分配给该变量。 例如,要将主机名设置为ericpc.systutorials.com,只需设置

HOSTNAME=ericpc.systutorials.com

Save the file and it should take effect. If the machine uses the network service, restarting the network may be needed:

保存文件,它应该会生效。 如果机器使用网络服务,则可能需要重新启动网络:

# service network restart

翻译自: https://www.systutorials.com/changing-hostname-of-fedora-linux/

fedora修改主机名

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值