Sponsored Content
Operating Systems AIX How to create short name for hostname Post 302305807 by dukessd on Thursday 9th of April 2009 07:22:44 PM
Old 04-09-2009
or add the short name to your hosts file on any machine you want to contact it from if there are only a few machines you need this function on.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

short banner

how to add a (sb) short banner in printcap i need print a extraline my OS unix 5.0.5 :( Tnx (2 Replies)
Discussion started by: RoMaGo
2 Replies

2. Shell Programming and Scripting

short script help

how do i find out the date of the last time the system was last booted from? (8 Replies)
Discussion started by: jodders
8 Replies

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

4. UNIX for Advanced & Expert Users

How to create short form for directories?

Hi Friends, Can you please tell me how to create short form for directories? like, this is a directory: /usr/tmp/progs/scripts when i give cd $short_name, it should take to the above path. in which env setting do i have to set? Thanks, Rashmy. (8 Replies)
Discussion started by: smr_rashmy
8 Replies

5. Emergency UNIX and Linux Support

HP UX - ILO Console hostname different than Machine Hostname...

Hi All, So we added a new HP-UX 11.31 machine. Copied OS via Ignite-UX (DVD)over from this machine called machine_a. It was supposed to be named machine_c. And it is when you log in...however when I'm in the ILO console before logging in, it says: It should say: What gives? And how do... (4 Replies)
Discussion started by: zixzix01
4 Replies

6. UNIX Desktop Questions & Answers

Create/remove desktop short cuts via command line RHEL 6.3....

I would like to write a script that would remove and/or create shortcuts in Gnome desktop in RHEL 6.3... I googled all over the place could never find what I needed... Any help would be greatly appreciated! Thank you! (0 Replies)
Discussion started by: ruberked
0 Replies

7. Shell Programming and Scripting

Hostname lookup and create text file

I have a list of hostnames in a txt file . I need to do nslookup or other command on linux and get the ip address and if you dont find an ip address then put 0.0.0.0 instead in the output text file along with the hostname. So input host1 host2 host2.dd.ddd.net Output host1,... (2 Replies)
Discussion started by: gubbu
2 Replies

8. UNIX for Advanced & Expert Users

Hostname -f hostname: Unknown host

deleted (0 Replies)
Discussion started by: hce
0 Replies

9. Shell Programming and Scripting

Short command to create two files >{respo,nd}.php (with "tee" command?)

08:29 < xsi> >{respo,nd}.php bash: {respo,nd}.php: ambiguous redirect 08:31 < geirha> xsi: maybe you want tee So I was advised to do so. And I can't create two OR MORE files at once with {a,b,c,d,e,f}.php (which I quickly now need to create and to learn to create in the future to quickly... (2 Replies)
Discussion started by: Xcislav
2 Replies
HOSTNAMECTL(1)							    hostnamectl 						    HOSTNAMECTL(1)

NAME
hostnamectl - Control the system hostname SYNOPSIS
hostnamectl [OPTIONS...] {COMMAND} DESCRIPTION
hostnamectl may be used to query and change the system hostname and related settings. This tool distinguishes three different hostnames: the high-level "pretty" hostname which might include all kinds of special characters (e.g. "Lennart's Laptop"), the static hostname which is used to initialize the kernel hostname at boot (e.g. "lennarts-laptop"), and the transient hostname which might be assigned temporarily due to network configuration and might revert back to the static hostname if network connectivity is lost and is only temporarily written to the kernel hostname (e.g. "dhcp-47-11"). Note that the pretty hostname has little restrictions on the characters used, while the static and transient hostnames are limited to the usually accepted characters of Internet domain names. The static hostname is stored in /etc/hostname, see hostname(5) for more information. The pretty hostname, chassis type, and icon name are stored in /etc/machine-info, see machine-id(5). OPTIONS
The following options are understood: -h, --help Prints a short help text and exits. --version Prints a short version string and exits. --no-ask-password Do not query the user for authentication for privileged operations. -P, --privileged Acquire privileges via PolicyKit before executing the operation. -H, --host Execute the operation remotely. Specify a hostname, or username and hostname separated by "@", to connect to. This will use SSH to talk to a remote system. --static, --transient, --pretty If status is used (or no explicit command is given) and one of those fields is given, hostnamectl will print out just this selected hostname. If used with set-hostname, only the selected hostname(s) will be updated. When more than one of those options is used, all the specified hostnames will be updated. The following commands are understood: status Show current system hostname and related information. set-hostname [NAME] Set the system hostname. By default, this will alter the pretty, the static, and the transient hostname alike; however, if one or more of --static, --transient, --pretty are used, only the selected hostnames are changed. If the pretty hostname is being set, and static or transient are being set as well, the specified hostname will be simplified in regards to the character set used before the latter are updated. This is done by replacing spaces with "-" and removing special characters. This ensures that the pretty and the static hostname are always closely related while still following the validity rules of the specific name. This simplification of the hostname string is not done if only the transient and/or static host names are set, and the pretty host name is left untouched. Pass the empty string "" as the hostname to reset the selected hostnames to their default (usually "localhost"). set-icon-name [NAME] Set the system icon name. The icon name is used by some graphical applications to visualize this host. The icon name should follow the Icon Naming Specification[1]. Pass an empty string to this operation to reset the icon name to the default value, which is determined from chassis type (see below) and possibly other parameters. set-chassis [TYPE] Set the chassis type. The chassis type is used by some graphical applications to visualize the host or alter user interaction. Currently, the following chassis types are defined: "desktop", "laptop", "server", "tablet", "handset", as well as the special chassis types "vm" and "container" for virtualized systems that lack an immediate physical chassis. Pass an empty string to this operation to reset the chassis type to the default value which is determined from the firmware and possibly other parameters. EXIT STATUS
On success, 0 is returned, a non-zero failure code otherwise. SEE ALSO
systemd(1), hostname(1), hostname(5), machine-info(5), systemctl(1), systemd-hostnamed.service(8) NOTES
1. Icon Naming Specification http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html systemd 208 HOSTNAMECTL(1)
All times are GMT -4. The time now is 04:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy