07-16-2009
Quote:
On Solaris the `hostname` command is a shell script that runs `uname -n` (and uses `uname -S ${1}` to set the hostname). I ran a `truss uname -n` to see if I could spot the location in memory or disk easily but I was not able to figure that out.
The uname command uses the uname system call. The host name is stored in a kernel structure named "utsname".
9 More Discussions You Might Find Interesting
1. IP Networking
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
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
3. Solaris
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
4. UNIX for Advanced & Expert Users
I am seeking help. We have a UNIX sparc box with Solaris 10 on it. We configured this box as 3 zones with 3 static IP address. I installed Oracle 10g on glabal zone successfully. Now Oracle DBConsole can be started successfully, but it can not find IP for global zone and also can not identify... (0 Replies)
Discussion started by: duke0001
0 Replies
5. Solaris
dears
does any one know in steps how can i change ip and hostname on solaris (10 Replies)
Discussion started by: murad.jaber
10 Replies
6. Solaris
I recently installed Solaris 10 on my Sun workstation. I cannot ping using hostname from another computer on the same network.
But I can ping using the IP address. Also I can ping other systems using their hostnames.
Can anyone give some information regarding how to resolve this issue. (4 Replies)
Discussion started by: alpha123
4 Replies
7. Solaris
hi, does anyone had experience changing hostname on Solaris 8 ? any idea how is it done ? (4 Replies)
Discussion started by: Exposure
4 Replies
8. UNIX for Dummies Questions & Answers
We are using Solaris as our database OS. Can you please help me to know how can i get the IP address of a solaris machine in my network from its hostname?
e.g. We have a remote database server with the hostname as xyz. Without connecting to the database OS, can i get the IP address of xyz OS from... (1 Reply)
Discussion started by: Anmol Sharma
1 Replies
9. Solaris
Hi,
I am installing Solaris 11.3 as a local system using no remote connections.
The installer asks for a computer name or would be used as the hostname.
Can I select any name ? Like solaris 11 or localhost ?
I noticed this is added into the /etc.hosts file later.
ie example. localhost
... (2 Replies)
Discussion started by: dylan69
2 Replies
LEARN ABOUT SUSE
oldolduname
UNAME(2) Linux Programmer's Manual UNAME(2)
NAME
uname - get name and information about current kernel
SYNOPSIS
#include <sys/utsname.h>
int uname(struct utsname *buf);
DESCRIPTION
uname() returns system information in the structure pointed to by buf. The utsname struct is defined in <sys/utsname.h>:
struct utsname {
char sysname[]; /* Operating system name (e.g., "Linux") */
char nodename[]; /* Name within "some implementation-defined
network" */
char release[]; /* OS release (e.g., "2.6.28") */
char version[]; /* OS version */
char machine[]; /* Hardware identifier */
#ifdef _GNU_SOURCE
char domainname[]; /* NIS or YP domain name */
#endif
};
The length of the arrays in a struct utsname is unspecified (see NOTES); the fields are terminated by a null byte ('