Amend Unix hostname


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Amend Unix hostname
# 1  
Old 03-11-2009
Amend Unix hostname

Hi,

Please could someone advise on the following if possible. I have built a unix server, and was given the wrong hostname. I need to amend the hostname to the correct name. And I don't want to rebuild the server again.

I've tried the following to do change :

hostname DTCT-TD3FIXI01A
uname -S DTCT-TD3FIXI01A

rebooted the server and still the server name reverts back to the orginal name ? Would there be something else I would need to run....? to change the hostname permanetly.

regards,

venhart
# 2  
Old 03-11-2009
Its OS dependant...
So what OS?
Did you look in /etc/hosts?
# 3  
Old 03-11-2009
If it's HP-UX, in addition to the 2 command you ran and /etc/hosts, change the HOSTNAME setting in /etc/rc.config.d/netconf.
# 4  
Old 03-11-2009
Tools see if this helps

Hi
If Solaris
Run uname -S new_hostname for the current session

edit /etc/hostname.interface /etc/hostname.bgexxx

you can also look at

/etc/hosts
/etc/nodename

There are others but optinal
files like /etc/net/ticlts or ipnodes

Dan
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Get Hostname in UNIX like environment in Windows (Cgwin, UWin)

Hi, I'm using UWIN (from at&t - a cygwin like environment) in my personal computer to show Unix like environment to someone new to Unix. Though UWin has Ksh command box, wanted to show Putty to that person. My question is. How to connect to Cygwin (or UWin) installed in personal computer... (2 Replies)
Discussion started by: bobbygsk
2 Replies

2. UNIX for Advanced & Expert Users

Hostname -f hostname: Unknown host

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

3. Shell Programming and Scripting

Amend File Without Changing Timestamp

Hi, Is it possible to amend a file without changing the last modified date? If it is, how do you do it? If it's not, is there a way to create an empty file with the same timestamp as another file? I know you can use touch -t yyyymmddhhmm.ss filename but, I would want the file to... (4 Replies)
Discussion started by: Ste_Moore01
4 Replies

4. Shell Programming and Scripting

if condition to check the hostname (unix)

I want to know the if condition in checking the hostname in unix and then running a cron job (all in a single line) Thanks (2 Replies)
Discussion started by: prash358
2 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. Shell Programming and Scripting

How to replace and amend value in the same time

2009/03/30 08:11:34.553 DFP 2009/03/30 08:11:36.861 PLO I want it to be 2009/03/30 09:11:34.553 DFP 2009/03/30 09:11:36.861 PLO and 2009/03/30 23:11:34.553 DFP 2009/03/30 23:11:36.861 PLO to be 2009/03/30 00:11:34.553 DFP 2009/03/30 00:11:36.861 PLO Can we use sed or... (4 Replies)
Discussion started by: lalelle
4 Replies

7. Shell Programming and Scripting

amend ftp to sftp

Hi all, below is my current scriptftp -n << FTPCTRL open $my_ip user $my_user $my_pass ascii prompt off lcd $myDIR cd $ftp_cd $OPS $myfile FTPCTRLI'd like to amend it to sftp mode. Please advise the correct step.I consulted the man pages of sftp and I suppose I should be using the... (1 Reply)
Discussion started by: new2ss
1 Replies

8. UNIX for Advanced & Expert Users

how do change hostname of a unix server

what command do you use to change a unix server name. i've tried hostname, but when the unix server is rebooted, it reverts back to the old server name. regards venhart (3 Replies)
Discussion started by: venhart
3 Replies

9. Solaris

Amend the size of a Partition Error

Hi guys, I'm fidling around Partition space on SMC and on changing partition size, or assiging an unused partition to "usr", or even trying to alter the disk layout I get: Attempted Format of Partition /dev/dsk/c1t0d0s3 failed with unexpected CIM error: CIM_ERR_FAILED:CIM_ERR_FAILED:... (2 Replies)
Discussion started by: drchris
2 Replies

10. 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
Login or Register to Ask a Question