Computing.Net > Forums > Linux > Computer names of Linux

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Computer names of Linux

Reply to Message Icon

Name: jdemonhunter
Date: November 5, 2003 at 01:03:13 Pacific
OS: P2
CPU/Ram: 128
Comment:

Hi, everyone. Just want to check with u professional Linux guys about the computer name. Initially, when Linux redhat 9 is setup. The default computer name is LOCALHOST. Let say, if I want to change to LINUXTEST. What should I do?

From the DNS of networking section, I did change the localhost.localdomain -> Linuxtest.localdomain.

Then I log in to the computer again, it warns "Cannot detect localhost"...

Is there anyway I can troubleshoot this problem....besides, is there any effective way i can do with it...

Cheers~~~



Sponsored Link
Ads by Google

Response Number 1
Name: 3Dave
Date: November 5, 2003 at 04:25:45 Pacific
Reply:

You really need to have localhost as some
programs require it in order to work. You
can change your computer name by using the
hostname command or by editing /etc/
HOSTNAME. You can also edit /etc/hosts and
add as many aliases as you like, eg:

127.0.0.1 localhost
192.168.0.1 linuxtest.localdomain linuxtest foobar

You can now refer to your machine as either
linuxtest.localdomain, linuxtest or foobar


0

Response Number 2
Name: jdemonhunter
Date: November 5, 2003 at 09:45:39 Pacific
Reply:

Ic, so that is the way..
But when I use "vi /etc/hosts"...
i couldn't add anything inside ...

I can add then i type ":wq!"...it seem dun works ...ioi

is there anyway i can edit it as mentioned as previous reply...

Many thanks!


0

Response Number 3
Name: 987
Date: November 5, 2003 at 10:02:14 Pacific
Reply:

vi has insert mode & command mode. Press 'i' to enter insert mode & start editing, press <Esc> to enter command mode & enter commands like 'q'.


0

Response Number 4
Name: 3Dave
Date: November 6, 2003 at 01:28:05 Pacific
Reply:

If you are just starting out, try something
like mcedit if you have it installed, it's
a little like DOS edit and easy to use.

As 99% of linux configuration is done with
text files, I would strongly recommend
getting used to vi or my preference emacs.

You will also have to be root in order to
edit those files.


0

Response Number 5
Name: jdemonhunter
Date: November 6, 2003 at 09:01:14 Pacific
Reply:

Alright...ic,

let say my IP address on the network is 192.168.10.82...

After open /etc/hosts it shows

127.0.0.1 localhost

Then, i add

192.168.10.82 linuxtest

and did wat i need to do which is successful(in editing)

is this mean the computer name of the computer i'm using is changed to LINUXTEST?
However, I can't see my computer name in the workgroup i set from the smb:///.

From the Win user, I also can't see anything appear in the same workgroup... ioi

If I hav other computer's IP with Linux set is 192.168.10.108...

I add

192.108.10.108 LINUXTEST2

in the /etc/hosts

Is it useful in viewing the shared file, however, nothing appear too ioi

Any suggestions by professional Linux ppl ^0^?

Cheers~~~


0

Related Posts

See More



Response Number 6
Name: 3Dave
Date: November 6, 2003 at 09:23:10 Pacific
Reply:

The hosts file is referred to when trying
to resolve names. If it finds one it should
then translate it to the IP....so pinging
linuxtest should work. You would probably
want to add "192.168.10.108 linuxtest2" to
the file as well...in fact add all your
computers to it (including the windoze one)
and make sure that the file is the same on
each PC.

The samba name (ie for smb://linuxtest to
work) needs to be set in the samba config
file (/etc/samba/smb.conf) as well as the
workgroup name, share names etc. You also
have to make sure that the samba service is
running and you will have to restart it to
make the changes work. Either "service smb
restart" or "/etc/init.d/smbd restart"
should work.

In order for users to be able to view files
via samba, they have to be added to the
samba users database with "smbpasswd -a
username"


0

Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Linux Forum Home


Sponsored links

Ads by Google


Results for: Computer names of Linux

Name of Samba appears differently www.computing.net/answers/linux/name-of-samba-appears-differently/15497.html

Rename Suse 10 computer name www.computing.net/answers/linux/rename-suse-10-computer-name/28747.html

Change computer name www.computing.net/answers/linux/change-computer-name/24616.html