[TriLUG] An easy one...
Paul D. Boyle
boyle at laue.chem.ncsu.edu
Thu May 2 14:35:30 EDT 2002
CJK writes:
> OK, here's a question that has been tickling at the back of my head for some
> time.
>
> How do you change the hostname of a computer, permanently, from the
> command-line? I know how to do it from the GUI, but how do you do it from
> the console?
Use vi (or your personal favorite text editor). If you are working
on a Redhat system edit the file /etc/sysconfig/network. It should
be obvious which line to change.
At this point stop and start (or restart) some of the init scripts in
/etc/rc.d/init.d (again if you are on a Redhat system). Other systems
put things in slightly different places. If worse comes to worse 'grep'
around in etc to find which files have that information.
>
> See, wasn't that horribly easy?
Yes
> Don't you think less of me now?
No. It is was a good question. One of the strengths of Unix is that
the configuration of the system is done with text files; so no MS type
'Registry' crap to deal with. If you ever need to modify a system,
all you need is a text editor and little knowledge, no special utilties
required. Nice thing to know if your X11 configuration ever gets hosed.
Good Luck,
Paul
--
Paul D. Boyle | boyle at laue.chem.ncsu.edu
Director, X-ray Structural Facility | phone: (919) 515-7362
Department of Chemistry - Box 8204 | FAX: (919) 515-5079
North Carolina State University |
Raleigh, NC, 27695-8204
http://laue.chem.ncsu.edu/web/xray.welcome.html
More information about the TriLUG
mailing list