Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Hi , i want to permanently change my machine's name as linuxQube or something like that.. the hostname command onyl sets it for the current session ..when i reebot i get localhost.localdomain. I run apache, tomcat etc etc.. will chnaging m hostname affect those services ?? how can i do it "safe" ???
I got so frustrated not being able to change the host name permanently, that I finally did a "slocate localhost" and then visited all the files that appeared to play a role in keeping my computer so stupidly named, and changed every instance (about four, as it turned out) to the name I wanted.
Result: name permanently changed. HOWEVER, I am not on a network, just a lone desktop with Internet access. So I would not advise this approach for anybody with a more complex setup. It could indeed be asking for trouble.
EDITED: Oops, sorry, what I did was look for the string "localhost" inside all files, using Midnight Commander's search function. Slocate would not give that information.
If u see /etc/rc.sysinit file, /etc/sysconfig/network file is sourced to set the hostname and then the value of /bin/hostname is read. So if you set the hostname in /etc/sysconfig/network you should be ok.
I think you should also set the ServerName in httpd.conf or think it reverts to localhost.
Originally posted by Aussie The command to set or change the system hostname is 'hostname'.
Do 'man hostname' to read the unix manual page for the hostname command.
That works for changing the hostname during the session you're in, but on the next reboot, the hostname reverts to the old one. At least in the distribution I use! The question here was how to permanently change the hostname.
As I told before, you have to set it in /etc/sysconfig/network. Or a hack - do hostname -v <HOSTNAME> in /etc/rc.d/rc.local file. Instead of manually setting for that boot session this does it automatically.