# "This is name.(none) Linux...." how to change?

## SoreGums

Image

1. In the above ^ image, how do i get to say GenServer.zxgen.lan instead of GenServer.(none)??

I have set dnsdomainname & domainname to be zxgen.lan and have run /etc/init.d/domainname start and it sets the domain name correctly... 

2. Also see how i've loged out? how do you make it so that the console clears and the first line is the "this is GenServer..." msg?

Also I tried to goolge for console information, like how you would configure this stuff but my search was way to broad as I don't exactly know what it is i'm searching for..... Maybe if you could point me to some info on the console that might help?

ThanksLast edited by SoreGums on Fri May 27, 2005 12:46 am; edited 1 time in total

----------

## S. Traaken

You (possibly) need to "rc-update add domainname default", and may need to add domainname details to /etc/hosts.

----------

## SoreGums

 *S. Traaken wrote:*   

> You (possibly) need to "rc-update add domainname default", and may need to add domainname details to /etc/hosts.

 

done that  :Smile: 

Its in the  handbook. I did also update hosts:

127.0.0.1 localhost genserver.zxgen.lan genserver

----------

## S. Traaken

What output fo you get from commands like 'hostname', 'dnsdomainname', 'domainname', 'hostname -a' and 'hostname -f'  (A quick test with my own machine indicates how poorly configured it is as they almost all report conflicting information...)

----------

## jsmaye

Mine wouldn't update or load the domain name properly until both host addresses were in the /etc/host file. By both I mean the lo and the eth0 address/hostname entries. For instance - 

127.0.0.1          cpq6266.homelinux.com           cpq6266

192.168.1.242   cpq6266.homelinux.com           cpq6266

 - for my particular setup. And, of course the usual rc-update and /etc/domainname entries are needed.

----------

## dmitchell

 *SoreGums wrote:*   

> 127.0.0.1 localhost genserver.zxgen.lan genserver

 

Read the hosts manual.

```
This manual page describes the format of the /etc/hosts file. This file

is a simple text file that associates IP addresses with hostnames,  one

line per IP address. For each host a single line should be present with

the following information:

       IP_address canonical_hostname aliases
```

----------

## SoreGums

Ok all works now  :Smile: 

I wasn't even aware of the proper way to use the hosts file :/

looks like fixing the hosts file was all i needed to do.

Thanks for your help.

----------

## S. Traaken

 *SoreGums wrote:*   

> 2. Also see how i've loged out? how do you make it so that the console clears and the first line is the "this is GenServer..." msg?

 

I always meant to answer this...

If you have 

```
clear
```

 in ~/.bash_logout, the screen will be cleared when you logout, leaving the "This is blah" message at the top of the screen.

This has actually been added to /etc/skel sometime recently (bash-3.0-r11), so new users automatically get this functionality (at least, if their homedir is built from /etc/skel).

Also added with -r11 is /etc/bash/bash_logout - this file is executed whenever a bash login shell ends.  Adding 'clear' to that file will give the desired functionality without needing to change every user's .bash_logout.

----------

## SoreGums

Thanks for that mate  :Smile: 

Someone told me to do

clear >> /etc/issue

then just modify /etc/issue so that the clear cmd/switches are first.

seems to work.  Your method looks a bit more systematic tho, so i'll do that.

Cheers

----------

## S. Traaken

Happy to help :)

Each approach attacks the problem from a different side.  The .bash_logout approach is (arguably) better in a wider range of circumstances, but the /etc/issue approach will take effect regardless of shell and config.

----------

## Schnacki

 *jsmaye wrote:*   

> 
> 
> 127.0.0.1          cpq6266.homelinux.com           cpq6266
> 
> 192.168.1.242   cpq6266.homelinux.com           cpq6266
> ...

 

Wouldn't that cause localhost to be unusable?

I just had the same problem and just noticed that in the "localhost"-line I had added the machine-name to the end. eg:

```

172.0.0.1         localhost        sekentw

```

After removing "sekentw" the login-domainname was shown correctly.

Ciao, Jan

----------

## Deathwing00

Moved from Installing Gentoo to Networking & Security.

----------

## SoreGums

 *Schnacki wrote:*   

>  *jsmaye wrote:*   
> 
> 127.0.0.1          cpq6266.homelinux.com           cpq6266
> 
> 192.168.1.242   cpq6266.homelinux.com           cpq6266
> ...

 

Well if you actually read the man for hosts all will be revealed  :Smile: 

I didn't think to look there until someone in here said do it, so i did and it all made alot of sense  :Very Happy: 

----------

