How to change system’s hostname on HP-UX Unix system

I‘m a new HP-UX system user. How do I set the system hostname using shell prompt on a HP-UX?

You can use SAM (System Administration Manager) to set the system hostname or the following command to change or set the hostname on a HP-UX unix system. You can also edit the file /etc/rc.config.d/netconf. This file contains the hostname, IP address, default route and more.

ADVERTISEMENTS

set_parms command syntax

Type the following command as root user:
# set_parms hostname
You will be prompted to supply the system name, then press [Enter] key. The system must be rebooted for any change to take full effect:
# reboot
To see the hostname, run:
$ hostname
For more info read the man page set_parms(1M):
$ man set_parms

🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source/DevOps topics:
CategoryList of Unix and Linux commands
File Managementcat
FirewallCentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNCentOS 8 Debian 10 Firewall Ubuntu 20.04

ADVERTISEMENTS
2 comments… add one
  • c4m4 Jan 4, 2016 @ 0:21

    why I need to reboot for change my hostname? please can you give more information about that

    • 🐧 Vivek Gite Jan 4, 2016 @ 9:27

      A reboot is required for verification and make sure all changes are applied. The official HP-UX docs also recommend a reboot.

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.