Change Linux Hostname


 
Thread Tools Search this Thread
Operating Systems Linux Change Linux Hostname
# 8  
Old 10-05-2008
u can also set the hostname via sysctl -

Code:
 sysctl -w kernel.hostname=hostname_u_want

Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Solaris

change hostname in SUNOS 5.10

What file I need to edit if I need to change hostname in SUN OS 5.10 Please advice ....... (1 Reply)
Discussion started by: chuikingman1
1 Replies

2. Solaris

Reg hostname change.

I want to change my solaris hostname. Tell me what are the files i have to change. Will it requires reboot to get reflect with the new name I changed in /etc/inet/hosts (3 Replies)
Discussion started by: rogerben
3 Replies

3. UNIX for Dummies Questions & Answers

Change HostName

How to change host name in NCR Unix version 3.0 release 4.0 I got the OS version and OS release from executing uname -v and uname -r (9 Replies)
Discussion started by: nalina
9 Replies

4. Red Hat

Change hostname

Hello, I would like to change the hostname on a Linux server (RHEL4). I try different methods in vain : - by using hostname command - by changing /etc/hosts and /etc/hostname But after restarting server, the old hostname re-appears... :confused: And the file ./proc/sys/kernel/hostname... (3 Replies)
Discussion started by: madmat
3 Replies

5. UNIX for Dummies Questions & Answers

Solaris - unknown hostname - how can I change hostname?

Hello, I am new to Solaris. I am using stand alone Solaris 10.0 for test/study purpose and connecting to internet via an ADSL modem which has DHCP server. My Solaris is working on VMWare within winXP. My WinXP and Solaris connects to internet by the same ADSL modem via its DHCP at the same... (1 Reply)
Discussion started by: XNOR
1 Replies

6. UNIX for Dummies Questions & Answers

change hostname

Hi, I asked this question whenI was running solaris 8 and got some very good answers. I've just uograded to Solaris 10 and there seems to quite a few changes so I need to know again. https://www.unix.com/showthread.php?t=8547 ------------ Hi (now solaris 10) I know how to change the... (2 Replies)
Discussion started by: fishman2001
2 Replies

7. HP-UX

Change IP and Hostname

Hello.. I wanted to know how to change IP and Hostname on HPUX system, and I don't want to make it as NIS master either. Could someone tell me the files I need to modify and make sure it's on network? Thanks! :o (3 Replies)
Discussion started by: catwomen
3 Replies

8. UNIX for Advanced & Expert Users

Change of Hostname

Dear All. I will like to know beside the following command "hostname hostname" what other command that can change the hostname of the Unix. Thanks. (4 Replies)
Discussion started by: gelbvonn
4 Replies

9. UNIX for Dummies Questions & Answers

change hostname

Hi, ( running solaris 8 ) I know how to change the hostname temparily, by login in as root typing hostname = xxxxx but, this obviously goes when the system is rebooted. I'm not sure what files need changing to make this a permant change. Could anyone help me please? (9 Replies)
Discussion started by: fishman2001
9 Replies
Login or Register to Ask a Question
HOSTNAME(5)							   /etc/hostname						       HOSTNAME(5)

NAME
hostname - Local host name configuration file SYNOPSIS
/etc/hostname DESCRIPTION
The /etc/hostname file configures the name of the local system that is set during boot, with the sethostname(2) system call. It should contain a single newline-terminated host name string. The host name may be a free-form string up to 64 characters in length, however it is recommended that it consists only of 7bit ASCII lower-case characters and no spaces or dots, and limits itself to the format allowed for DNS domain name labels, even though this is not a strict requirement. Depending on the operating system other configuration files might be checked for configuration of the host name as well, however only as fallback. HISTORY
The simple configuration file format of /etc/hostname originates from Debian GNU/Linux. SEE ALSO
systemd(1), sethostname(2), hostname(1), hostname(7), machine-id(5), machine-info(5) AUTHOR
Lennart Poettering <lennart@poettering.net> Developer systemd 10/07/2013 HOSTNAME(5)