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.

I have just installed Fedora Core 3 and have been trying to assign the machine a name (hostname?) so I wouldn't have to rely on using it's internal IP for all of my network configurations. It also "seemed" to be creating a problem in Samba as the linux computer was always referenced (and possibly treated?) as localhost in all the other computers networks. I'm on a small network, the machines are inside a modem/firewall/router and a hub. The modem handles DHCP and of course the ISP handles DNS. When I tried to change the hostname (what I understand to be the linux ver. of machine name) I used the command hostname, altered /etc/hosts, and etc/sysconfig/network but I kept recieving errors.

The errors varied from "improper hostname", "unable to resolve hostname", to Samba breaking and the machines being unable to communicate. Could anyone tell me a SAFE, CERTAIN way to change my hostname to something aside from localhost? There is no reason that I cannot assign a host name without a domain is there? If I must have a domain to have a hostname can I create and use any name for the domain? Wouldn't the other computers trying to reference shares on a computer called localhost cause an error?

I apologize for my ignorance, but many of the tutorials or how to's that I've read skipped or left stuff out, or just assumed you knew something and my knowledge of Linux networking is very limited. Any help, enlightenment, or links to easily understandable tutorials are appreciated.

The proper way to change the hostname on a redhat based system is to edit /etc/sysonfig/network and set the HOSTNAME variable to a Fully Qualified Domain Name (FQDN). i.e. hostname + domain name. If you do not have a registered domain name, then you could use your ISP's domain name or even make up one (transposed.home) since you are behind a firewall. Just make sure your other computers are set to use the same domain name.

Thanks for the reply! I'm starting to resolve the problem, but I'm probably only half-way there. When I assigned the hostname previously, I assigned it through the terminal, network adapters, /etc/host, and /etc/sysconfig/network as many of the howto's I read sounded like they were inferring to change it through all of them. Perhaps somehow it created an error.

This time I simply changed the hostname AND the domainname through the terminal and nothing else and it worked. It stated that hostname was transposed and domain was ghost. However, upon rebooting it seems to have changed. When I ran the same commands as you I get these results:

Should I assign the hostname and domainname to the internal ip on a second line like you did? Most everything I had read stated to put them in the first one along with localhost and localhost.localdomain so I'm a bit confused. Finally, your hostname has three sections, what is the third one? Thanks for your help!