PCLinuxOS-Forums
News: ...FLASH!!! ...New PCLinuxOS Testing board now open. Register today! Be an active contributor to the PCLinuxOS future! ... Read all about it now, on THIS forum!!!..
 
*
Welcome, Guest. Please login or register. May 27, 2012, 02:11:28 PM


Login with username, password and session length


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

Posts: 11805



« 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
PCLinuxOS Tester
Hero Member
*******
Offline Offline

Posts: 4634


MLUs Forever!


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

HOSTNAME=thenudiebar

Grin  Grin  Grin
Logged

MLUs rule the roost!

Linux XPS 3.2.17-pclos1.pae.bfs  32 bit
Intel(R) Core(TM)2 Quad  CPU   Q9450  @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech ‎DVB-T 2 USB DTT
GermanTux
Hero Member
*****
Offline Offline

Posts: 576



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

Quote
texstar@thenudiebar

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

I like sleep.
KernelKarter
Full Member
***
Offline Offline

Posts: 94



« 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
*****
Online Online

Posts: 836


PCLinuxOS - Heck Yeah !


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

I enjoyed that, thanks Mr. Texstar  Wink
Logged

PCLinuxOS KDE 4.6.5 MiniMe -- Taking Control each day - taking some deep breathes too...
I'm GMT+10 hours !
Vortеx
Hero Member
*****
Offline Offline

Posts: 2010


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
*****
Online Online

Posts: 836


PCLinuxOS - Heck Yeah !


« 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

PCLinuxOS KDE 4.6.5 MiniMe -- Taking Control each day - taking some deep breathes too...
I'm GMT+10 hours !
Vortеx
Hero Member
*****
Offline Offline

Posts: 2010


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: 6005


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: 2010


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: 6005


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: 2010


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: 6005


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: 2010


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
dougmack
Hero Member
*****
Offline Offline

Posts: 512


« Reply #14 on: February 29, 2012, 04:14:35 PM »

I just recently asked this question, and got Texstar's answer as posted here.  I am running the latest 2012 system.  I found that modifying the line that starts 127 was not
necessary: when I went to that file, the modification was there already.  The system must be smart enough to fix itself!   --doug
Logged

Blessed are the peacemakers...for they shall be shot at from both sides.  A. M. Greeley
Pages: [1] 2   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