≡ Menu

hostname command

CentOS Linux 5/6 Change Hostname Command

I am a new CentOS Linux server user. How do I change hostname on CentOS Linux? How can I change server hostname on CentOS Linux version 5 or 6?
[click to continue…]

How do I change the hostname of a Debian Linux system permanently using the command line tools?
[click to continue…]

Linux: Find Out My Machine (Host) Name

How do I find out my server name (machine name) under Linux operating systems using command shell?
[click to continue…]

I’m using FreeBSD 7.2 on HP laptop and getting IP info via WI-FI router. I’ve setup hostname in /etc/rc.conf buy after the boot process, I check host name with "hostname" command, but get empty line. Setting hostname with "hostname" works well, but after reboot host name is still empty. I suspect it has something to do with DHCP settings. How do I set hostname-using DHCP?
[click to continue…]

Linux Change Hostname

How do I change hostname under Linux operating system?
[click to continue…]

OpenBSD Change Hostname

Q. How do I change my hostname under OpenBSD operating system?
[click to continue…]

Q. Under Windows Server 2003 I can use active directory domain tools to get information about current domain and hostname. Can you tell me command to list current domain name and hostname under Red hat enterprise Linux 5?

A. Both Linux / UNIX comes with the following utilities to display hostname / domain name:

a) hostname - show or set the system’s host name

b) domainname - show or set the system’s NIS/YP domain name

c) dnsdomainname - show the system’s DNS domain name

d) nisdomainname - show or set system’s NIS/YP domain name

e) ypdomainname - show or set the system’s NIS/YP domain name

For example, hostname is the program that is used to either set or display the current host, domain or node name of the system. These names are used by many of the networking programs to identify the machine.
$ hostname
Output

sun521nixcraft.com

The domain name is also used by NIS/YP or Internet DNS:
$ dnsdomainname
Output:

nixcraft.com