Sponsored Content
Full Discussion: Change HostName
Top Forums UNIX for Dummies Questions & Answers Change HostName Post 302176693 by nalina on Tuesday 18th of March 2008 11:57:41 PM
Old 03-19-2008
In this box no command call “hostname”
 

10 More Discussions You Might Find Interesting

1. IP Networking

How to change hostname and ip in solaris

Dear all, I am going to change the IP address and hostname in my solaris, but I don't know how to do it. If you have any idea or suggestion, please fell free to let me know. Thanks and Regards (2 Replies)
Discussion started by: PennyLi
2 Replies

2. 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

3. 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

4. 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

5. 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

6. 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

7. Solaris

Change hostname in Solaris 9

Please anyone guide me how to change the hostname in Solaris 9? The IP of the machie is fetched from a DHCP server. (6 Replies)
Discussion started by: shabu
6 Replies

8. Linux

how to change hostname permanentaly

i want to change my hostname permanentaly in my Fedora core 6. could any one tell me how it is possible .... (1 Reply)
Discussion started by: useless79
1 Replies

9. 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

10. 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
gethostname(2)							System Calls Manual						    gethostname(2)

NAME
gethostname() - get name of current host system SYNOPSIS
DESCRIPTION
returns in the array to which hostname points, the standard host name for the current system as set by (see sethostname(2)). size speci- fies the length of the hostname array. hostname is null-terminated unless insufficient space is provided. RETURN VALUE
returns 0 if successful. Otherwise, it returns -1 and sets to indicate the error. ERRORS
can fail if the following is true: hostname points to an illegal address. The reliable detection of this error is implementation dependent. size is less than one. WARNINGS
It is recommended that programs use to dynamically size the buffer used to accept the host name from This is preferred over use of the con- stant. For cases where the constant must be used, there are two values: 64 and 256. The smaller value is compatible with current releases and is used by default. To use the larger value consult the related documentation (see nodehostnamesize(5)). The administrator may, with appropriate configuration options enabled, set a host name larger than 64 bytes. Existing applications which were compiled using the smaller to size a buffer passed to the system function obtain only the first 64 bytes. This truncation may cause the applications to exhibit anomalous behavior or to fail. AUTHOR
was developed by the University of California, Berkeley. SEE ALSO
hostname(1), uname(1), sethostname(2), uname(2), nodehostnamesize(5). gethostname(2)
All times are GMT -4. The time now is 06:11 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy