Computer Name, can it be changed?
I just installed redhat 9.0 hoping it would fix a networking issue I had with 8.0.
With the 9.0 installation, i didn't notice any screen to enter my computers name, or add users for that matter. The latter doesn't matter, I can do that manually, but what I'd really like to be able to rename my computer. Right now its set to some mess like x1-6-00-f4-2c-62-8f or some nonsense. Any help would be appreciated. Thanks James Meyer aka Aldyn P.S. Its running a Server install, so there is no X-windows or anything graphical. So please only post solutions that will work from the command line. Thanks again |
If you want to change the hostname then do:
hostname ThisIsMyServer Is that what you are looking for? |
No, that didn't seem to do it.
For example. Right now when I book up at the console, it says: Red Hat Linux release 9 (Shrike) Kernel 2.4.20-8 on an i686 x1-6-00-40-f402c06208f login: I was this ^ to be something else. The redhat 8.0 installation let me choose a name, but the 9.0 installation didn't seem to. I am just wondering if I can change it. Because when I log in, I also have: [user@x1-6-00-40-f402c06208f user]# as the prompt, which is a bit long and spammy, and just plain ugly, i think. Thanks again. |
Create a file /etc/hostname and put one word in it, your hostname and a newline (enter key pressed after the word).
You may have to add it to your /etc/hosts file as well. Here is mine for an example: Code:
# Do not remove the following line, or various programs RedHat Linux Manuals Maximum RPM rpmfind Easier software management: apt4rpm - Red Carpet RedHat 8.0 Tips & Tricks # Redhat 7.3 down configuration commands setup leads to several configuration tools # Redhat 7.3 up configuration commands Configure soundcard: redhat-config-soundcard Configure X server: redhat-config-xfree86 Configure network: redhat-config-network # Redhat 9.0 Redhat 9.0 Upgrading the kernel Building a custom kernel |
Tried both, no luck.
I found out though that if I do uname -n It shows up as that, which is the nodename or something. If that helps. James |
Check out the 'nodename' command. I don't know if you want to change that value though. Not sure what it is exactly. If your just worried about the prompt then change your PS1 value:
PS1="What is thy bidding? " |
Have a look at /proc/sys/kernel/hostname
Try 'cat /proc/sys/kernel/hostname'. If it shows x1-6-00-40-f402c06208f then write 'echo "MyNewComputerName" >/proc/sys/kernel/hostname'.
What do you get with 'uname -n' and 'echo $PS1'? Hope that helps |
Dennisa:
No, still no luck, but what it did do it prevent MySQL and HTTPD from initializing on boot up. Crashed_Again: I can't seem to find the nodename command. And its not just the prompt I'm worried about. The computer name comes up in a variety of actions and commands. And that long string is large nuisance compared to a shorter name. I'm going to try a reinstall and see if perhaps I just missed a screen or something. I'll let you all know how it went. |
Bah! Giving up so soon? If you 'man hostname' you will see the nodename command in there. If you were feeling adventurous you could grep for that string:
grep -R x1-6-00-40-f402c06208f /etc/* It may take a little bit but I'm sure you'd find what you are looking for. |
Heh, not giving up, I'm checking too see if i missed a screen. After installing again, I now know I didn't, so its back to the grind.
Got it figured out. I just changed a line in /etc/sysconfig/network Thanks for all your help though. Its much appreciated. |
All times are GMT -5. The time now is 07:07 AM. |