PCLinuxOS-Forums
News: Wishing everyone a Happy 2012
 
*
Welcome, Guest. Please login or register. February 13, 2012, 01:47:01 PM


Login with username, password and session length


Pages: [1]   Go Down
  Print  
Author Topic: Change hostname PCLinuxOS  (Read 2044 times)
Texstar
Administrator
Super Villain
*****
Offline Offline

Posts: 11861



« on: June 21, 2011, 06:56:59 PM »

If you want the hostname to stick even after a reboot in PCLinuxOS there are 2 files to change: the /etc/sysconfig/network and the /etc/hosts:

In the /etc/sysconfig/network I added the line:

HOSTNAME=thenudiebar

Next in the /etc/hosts file I changed the "127.0.0.1 localhost.localdomain localhost" to:

127.0.0.1       thenudiebar localhost

Finally reboot and you will see that the hostname is set.

texstar@thenudiebar ~]$
Logged

Follow the development of PCLinuxOS on Twitter
Help fund the PCLinuxOS project!

"I'm not so good on advice, can I interest you in a sarcastic reply?"
Just18
Hero Member
*****
Offline Offline

Posts: 3313


........ MLU ........ (Mature Linux User)


« Reply #1 on: June 21, 2011, 07:32:13 PM »

HOSTNAME=thenudiebar

Grin  Grin  Grin
Logged

MLUs rule the roost!

I may be no spring chicken ....  but I can still do my share of cock-a-doodle-do-ing
GermanTux
Hero Member
*****
Offline Offline

Posts: 522



« Reply #2 on: July 13, 2011, 02:24:22 PM »

Quote
texstar@thenudiebar

What do geographic locations have to do with changing hostnames? 
Logged

XFCE Convert - Thank you Phoenix
KernelKarter
Full Member
***
Offline Offline

Posts: 75



« Reply #3 on: July 14, 2011, 05:46:01 AM »

If you want the hostname to stick even after a reboot in PCLinuxOS there are 2 files to change: the /etc/sysconfig/network and the /etc/hosts:

In the /etc/sysconfig/network I added the line:

HOSTNAME=thenudiebar

Next in the /etc/hosts file I changed the "127.0.0.1 localhost.localdomain localhost" to:

127.0.0.1       thenudiebar localhost

Finally reboot and you will see that the hostname is set.

texstar@thenudiebar ~]$

I've found that I need to add DHCP_HOSTNAME=<myhostname> to /etc/sysconfig/network for my router to "see" the hostname.

- Eddie
Logged

PCLinuxOS KDE 2012.02 (updated daily)
AMD Athlon 64 X2 5000+ CPU
4Gb RAM | nVidia 8500GT GPU
Abraxas
Hero Member
*****
Offline Offline

Posts: 547


PCLinuxOS 2012 - 'MiniMe'+'LXDE'=A+


« Reply #4 on: August 06, 2011, 02:40:55 AM »

I enjoyed that, thanks Mr. Texstar  Wink
Logged

Vortеx
Hero Member
*****
Offline Offline

Posts: 2003


Vorteks without the Secretary


« Reply #5 on: August 06, 2011, 10:26:51 AM »

Me too, thanks!

Some glitches though. It won't take me to "texstar@thenudiebar ~]$" as shown in the Boss example. Cry

Instead I am in Vortex hostname Cry...
Quote
[Vortex@thenudiebar ~]$ su texstar
su: user texstar does not exist
[Vortex@thenudiebar ~]$ su
Password:
[root@thenudiebar Vortex]# su -
[root@thenudiebar ~]#

What should I do for to be in the right place "texstar@thenudiebar ~]$"?
Logged
Abraxas
Hero Member
*****
Offline Offline

Posts: 547


PCLinuxOS 2012 - 'MiniMe'+'LXDE'=A+


« Reply #6 on: August 06, 2011, 12:59:20 PM »

You know what Vorteks ( Vortex ), you're not texstar. I think it's that simple  Grin

Actually, when you edited /etc/sysconfig/network, did you "ADD A LINE", or overwrite "HOSTNAME=Vortex" ?
1.) I added a line.
2.) You could over-write the top Line with: HOSTNAME=Texstar, but wouldn't that be a bit creepy, being 'Texstar'.
3.) Each to there own ...  Cheesy
( I'm not one to be giving advice as I just don't know ), but I'm pretty sure Tex wasn't about having everyones Hostname being "texstar@thenudiebar ~]$"

As Texstar wrote:
Quote
In the /etc/sysconfig/network I added the line:

HOSTNAME=thenudiebar

I thought the idea was to change the hostname, which I wouldn't be complaining with:
[root@thenudiebar ~]#     You've done well Grin
Logged

Vortеx
Hero Member
*****
Offline Offline

Posts: 2003


Vorteks without the Secretary


« Reply #7 on: August 06, 2011, 01:04:25 PM »

3.) Each to there own ...  Cheesy
Yep! You got my joke Grin

By the way I am happy I am not Texstar. So much work and strain... Shocked

 Cheesy
Logged
melodie
Hero Member
*****
Offline Offline

Posts: 5677


XMMP=Jabber, free instant messaging protocol !


WWW
« Reply #8 on: August 06, 2011, 01:09:10 PM »

3.) Each to there own ...  Cheesy

Yep! You got my joke Grin

By the way I am happy I am not Texstar. So much work and strain... Shocked

 Cheesy


Just a remarq, this man once told me high case and numbers should be avoided in hostnames, because it could produce problems on networks (if you have a lan for instance ?)

Logged

melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode
Vortеx
Hero Member
*****
Offline Offline

Posts: 2003


Vorteks without the Secretary


« Reply #9 on: August 06, 2011, 01:24:03 PM »

melodie thanks.
Somehow I fill it and don't use uppercase in the names of files that I consider important. Undecided
Logged
melodie
Hero Member
*****
Offline Offline

Posts: 5677


XMMP=Jabber, free instant messaging protocol !


WWW
« Reply #10 on: August 06, 2011, 01:27:56 PM »

melodie thanks.
Somehow I fill it and don't use uppercase in the names of files that I consider important. Undecided

Vorteks, you can use any letter case in file names. It's only for the hostname that I was advised not to do so.

Logged

melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode
Vortеx
Hero Member
*****
Offline Offline

Posts: 2003


Vorteks without the Secretary


« Reply #11 on: August 06, 2011, 01:33:13 PM »

Yes, though...
I am not Andy but nevertheless I got some kind paranoia too Wink
 Cheesy
Logged
melodie
Hero Member
*****
Offline Offline

Posts: 5677


XMMP=Jabber, free instant messaging protocol !


WWW
« Reply #12 on: August 06, 2011, 01:37:49 PM »

Yes, though...
I am not Andy but nevertheless I got some kind paranoia too Wink
 Cheesy

No problem for me but it was misplaced. You can have high case and low case in name files, you can have it starting with a - or a _ if you wish... some make 2 words as in Windows, usually that works, until you have 2 names alike and want to manipulate them in console, then it becomes a difficult task... 'Smiley
Logged

melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode
Vortеx
Hero Member
*****
Offline Offline

Posts: 2003


Vorteks without the Secretary


« Reply #13 on: August 06, 2011, 01:42:10 PM »

Often I find the space in the filenames problematic so I replace it by _.

But this is of-topic and I am sorry for starting it.
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM