hostname(1) User Commands hostname(1)NAME
hostname - set or print name of current host system
SYNOPSIS
/usr/bin/hostname [name-of-host]
DESCRIPTION
The hostname command prints the name of the current host, as given before the login prompt. The super-user can set the hostname by giving
an argument.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO uname(1), attributes(5)SunOS 5.10 14 Sep 1992 hostname(1)
Check Out this Related Man Page
clear_locks(1M) System Administration Commands clear_locks(1M)NAME
clear_locks - clear locks held on behalf of an NFS client
SYNOPSIS
/usr/sbin/clear_locks [-s] hostname
DESCRIPTION
The clear_locks command removes all file, record, and share locks created by the hostname and held on the current host, regardless of which
process created or owns the locks.
This command can be run only by the super-user.
This command should only be used to repair the rare case of a client crashing and failing to clear held locks. Clearing locks held by an
active client may cause applications to fail in an unexpected manner.
OPTIONS -s Remove all locks created by the current machine and held by the server hostname.
OPERANDS
The following operands are supported:
hostname name of host server
EXIT STATUS
0 Successful operation.
1 If not root.
2 Usage error.
3 If unable to contact server (RPC).
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO fcntl(2), attributes(5)SunOS 5.11 6 Oct 2004 clear_locks(1M)
How do I configure TCP/IP on an old SCO UNIX 3.2 v4.0
I can't seem to find any type of documentation on it.
Can someone give me step by step info or refer some type of article? (11 Replies)
Hi there,
I am wondering if by logging in to a unix system, if it is possible to get the IP address of the machine I am connecting FROM.
I know how I can do this using the name server, but is this possible without a host lookup?:confused:
Thanks,
-ghoti (15 Replies)
hiii,
in many of the linux machines i have tried this but the result is the same everywhere.
if there are double letters in a hostname then that is displayed as single letter.
e.g. if hostname is set to nepttune then login into the shell will display :
NEPTUNE(admin)@/
$ hostname... (15 Replies)
We have a code to find the DNS entry of a host that has a trailing '-' in its url (format example: mysite-.watch.com):
if(gethostbyname_r(host,host_ent,host_buffer,host_buffer_size,&host_error)==NULL)
{
//failed
}
But when remove the '-' from the host name the code does not return... (12 Replies)
I am running Solaris 2.6 Server on a Sparc 10 and I was wondering how I can manually specify a DNS server to resolve hostnames. Any help will be greatly appreciated.
And also I have created a file in the /etc dir named defaultrouter and added th IP address of my router, but when I ping another... (15 Replies)
When I login AIX console, how to show hostname before any command:
hostname:/#>id
uid=0(root) gid=0(system) groups=2(bin),3(sys),7(security),8(cron),10(audit),11(lp) (15 Replies)
I'm working on a rather large script atm (it already takes 9 arguments). As such, I need to obtain both a server name and domain from the FQDN. From this, I want to both populate the hostname of the server, as well as the domain line in the /etc/resolv.conf file.
Obviously, this isn't working. I... (10 Replies)
Hello,
I've got a puzzler here but it might be quick solution for some of you.
I'm trying to add a second IP address to a network adapter on a Solaris 10 box. I've created a hostname.bge0:1 file and put in the new name, e.g. new.mycom.com. I've added the new IP and the name to hosts. I've... (12 Replies)
I am writing a script and need to get the hostname of the remote server in order to zip that file... the syntax in which the file is named is "hostname.html."
This is the line I am trying to use
ssh $host "/bin/gzip /tmp/`hostname`.html" >> $PATH_TMP/Linux_cfg2html.log
but whenever I run it... (26 Replies)
Hi
iam having file with below lines of text
pun-ras-bng-mhs-01#cont bsnl.in
enk-ras-bng-cse-01#cont bsnl.in
how to extract the host name and store in a variable and to print output using awk command
output will be
HOSTNAME
pun-ras-bng-mhs-01
enk-ras-bng-cse-01
Tnx in advance. (13 Replies)
Hi all,
Please i have to get hostname of an ip address (172.16.68.4). so i have used the command 'host'
host $ipaddr >> iptohostname.txt
Here is my file: iptohostname.txt
4.68.16.172.in-addr.arpa domain name pointer g-4.xxx.yyyy.zz.
3.68.16.172.in-addr.arpa domain name pointer... (11 Replies)
I have vmware on my windows PC ( hostname : acer ).
vmware has RHEL 7 ( hostname : rhel7 ) installed recently.
RHEL IP configuration
IP : 192.168.5.128
Netmask : 255.255.255.0
ssh to rhel7 works from acer using putty
resolve.conf
cat /etc/resolv.conf
nameserver 192.168.5.1
host... (12 Replies)
Dear all experts,
I would like to know where can I find the hostname located as when I receive the syslog, I can only see as below : (showing in localhost instead of the hostname)
Feb 6 15:31:31 localhost syslog:info syslogd: restart
Feb 6 15:31:50 localhost syslog:info syslogd: restart
Feb... (13 Replies)