Sponsored Content
Full Discussion: Amend Unix hostname
Top Forums UNIX for Advanced & Expert Users Amend Unix hostname Post 302296599 by venhart on Wednesday 11th of March 2009 11:46:15 AM
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
 

10 More Discussions You Might Find Interesting

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

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

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

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

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

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

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

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

9. UNIX for Advanced & Expert Users

Hostname -f hostname: Unknown host

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

10. 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
HOSTNAME(5)							     hostname							       HOSTNAME(5)

NAME
hostname - Local hostname configuration file SYNOPSIS
/etc/hostname DESCRIPTION
The /etc/hostname file configures the name of the local system that is set during boot using the sethostname(2) system call. It should contain a single newline-terminated hostname string. The hostname may be a free-form string up to 64 characters in length; however, it is recommended that it consists only of 7-bit ASCII lower-case characters and no spaces or dots, and limits itself to the format allowed for DNS domain name labels, even though this is not a strict requirement. Depending on the operating system, other configuration files might be checked for configuration of the hostname as well, however only as fallback. You may use hostnamectl(1) to change the value of this file from the command line. HISTORY
The simple configuration file format of /etc/hostname originates from Debian GNU/Linux. SEE ALSO
systemd(1), sethostname(2), hostname(1), hostname(7), machine-id(5), machine-info(5), hostnamectl(1), systemd-hostnamed.service(8) systemd 208 HOSTNAME(5)
All times are GMT -4. The time now is 06:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy