From: http://www.gwxdn.com/html/system/linux/2010/0120/6128.html
The Linux host name is set during the installation of the Linux operating system and is the only identifier of a host on the network. However, if you want to modify the host name after installing the Linux system, what should I do? This article describes how to use Ubuntu Desktop 9.04.
1. view the host name quickly
In ubuntu, there are two methods to quickly view the Host Name: one is to open a gnome terminal window, you can see th
Linux Host version:Distributor Id:ubuntuDescription:ubuntu 14.10release:14.10First, modify the Linux host name1. Use the hostname command to view the current host name 2. Save after modifying hostname in/etc/hostname file (some versions modify hostname in/etc/sysconfig/network)Second, modify the host name and IP mappi
Change Hostname in CentOS 7
After upgrading the VPS system to CentOS 7, I tried to modify/etc/sysconfig/network to modify the hostname, but it was useless. the method for modifying the Hostname of CentOS 7 is different from that of the previous version. We hope this article will help you modify the Hostname on CentOS 7
In the Ubuntu system, there are several ways to quickly view the hostname:One, open a GNOME terminal window, you can see the host name at the command prompt, the hostname is usually after the "@" symbol;Second, enter the command in the terminal window: hostname or UNAME–N, you can view the host name of the current host.2. Temporarily modify host nameCommand line Run command: "
Today, hostname settings are not very concerned, but once a Linux host encounters a hostname setting problem, it may also cause some incredible network problems and service process problems.Hostname check,Uname-nHostname-A |-S |-d |-FHostname commands can be used to determine the host and hostname settings;
The gethostname () function gets localhost because
Http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp? Topic =/com.ibm.db2.luw.messages. SQL .doc/doc/msql06031n.html
Question
Changing hostname of the DB2 server. What updates in DB2 need to be made?Cause
Changing the DB2 server's hostname.Answer
Perform the following on the DB2 Server:
1) login as the dasadm user on Unix/Linux or local administrator on Windows. Stop the DB2 Administration Server (DAS ):
Db2admin stop
2) login as the inst
Two changes need to be modified: one is/etc/sysconfig/network and the other is/etc/hosts, and only modifying any of them will cause system startup exceptions. First switch to the root user.
/etc/sysconfig/network
Open the file with any of your favorite editors, with a line of Hostname=localhost.localdomain (if default), and modify Localhost.localdomain to your hostname.
/etc/hosts
Linux notes 1-centos7 Desktop GNOME installation, language settings, hostname settingsOne, Desktop Gnome installation1. Find the software that can be installed, GNOME Desktop2. Install Yum Groupinstall "GNOME Desktop" until it's ready to installSecond, language settingsSet to English, easy to make mistakes in the foreign language station searchLocalectl Set-locale Lang=en_us. UTF-8Three, hostname settingsHo
Centos7 permanent hostname modification method, centos7hostname
The modification method of hostname in centos7 has changed. Modification of the/etc/hosts and/etc/sysconfig/network files is no longer effective. The new command used is:BashShell> hostnamectl set-hostname centos7Shell> suShell> hostnameCentos7Use this method for versions earlier than centos 7:BashS
Change fedora hostname permanently
Change fedora hostname permanently
When remote login to another machine, it is likely thatHostnameArealways the same, like localhost, this can be confusing when logging to manymachines at the same time, so the following method can be used to change thehostname (only root can do this ):
Vim/etc/hostname
Aut
Each time we use Linux, we will initialize the system configuration, listed below.1. Opening of the serviceSystemctl Enable Firewalld.service // set the specified service to boot systemctl disable Firewalld.service // systemctl is-enabled firewalld.service // query is set to start automatically2. Temporarily open, close, and restart the service.Systemctl start Filewalld.service // temporarily turn on the Firewall service systemctl stop Filewalld.service
Well, finally, the last of the series, let's explore the final question today. Question 5: How to view the value of hostname, whichever is it? 1 [[emailprotected] ~] 2 # hostname 3 db-server 4 [[email protected] ~] 5 # more/proc/sys/kernel/hostname 6 db-server 7 [[emailprotected] ~] 8 # More/etc/sysconfig/networkNetworking=yesNetworking_ipv6=yesHostna
Reprint : https://www.cnblogs.com/zeusmyth/p/6231350.html change user name and hostname under UbuntuMany times, we are not satisfied with the installation of the user name and host name, but because already in this user has done a lot of configuration, so only on the original basis to change the user name and host name.However, when changing these documents, be careful, because accidentally will cause a restart after the situation can not be logged in
For Linux and FreeBSD, modify the hostname-Linux Enterprise Application-Linux server application information. For more information, see. Changing the host name in Linux and FreeBSD is the same as the following command:
Hostname host.mydomain.com
Specifically, host.mydomain.com is the newly designated hostname, but to automatically use the new
Many applications will involve FQDNsWhat is the difference between a fqnd and a host that the salt gets to be different?The FQDNYou can ' t change the FQDN (as returned by hostname--fqdn) or the DNS domain name (as returned by DnsDomainName) with this Command. The FQDN ofThe system is the name of the resolver (3) returns for the host name.The Technically:the FQDN is the name of the gethostbyname (2) returns for the host, name returned by GetHostName (
Linux host name hostname setting in Linux is troublesome, and even modifying the host name is no exception. After Linux is installed, its default host name is localhost. Three steps are required to modify the Linux host name. Use hostname to modify the current host name. Hostnamenew-host... linux host name hostname setting in Linux is troublesome, even modifying
I found that the methods for changing the host's hostname in Linux are incomplete. The following is a complete method:
Step 00:
Assume that the original hostname is bkjia and you want to change it to bkjia03.
Use root to change the hostname
Su-rootStep 01:
Change bkjia in/etc/hosts to bkjia03
Vi/etc/hosts
:
127.0.0.1 bkjia03 localhost. localdomain localho
Issue 2: After modifying the hostname, how to make it effective immediately without restarting the operating system.Method 1: After you modify the hostname under/etc/sysconfig/network, then use echo servername >/proc/sys/kernel/hostname.[Email protected] ~]# echo Test >/proc/sys/kernel/hostnameNote that the current session still does not change, but subsequent ne
Linux system installed, there will be a default hostname, here in the case of the CentOS system, the default hostname is Localhost.localdomain, for ease of use, we often need to modify the hostname, the following is a way to permanently change the hostname.Steps:1. Log in as root, or switch to the root user after logging in, and then enter the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.