LINUX LITE 7.2 FINAL RELEASED - SEE RELEASE ANNOUNCEMENTS SECTION FOR DETAILS


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Information] Changing your "hostname"(Computer Name)
#1

Having just changed a hostname on 1 of my PC's thought I would share.
Maybe useful if you have made a mistake with the name, or you just want to change it, or you have "cloned" a VM in Virtualbox.


The hostname is the name of your computer, in a terminal you see,
dave@lappy:~$
"lappy" is the "hostname"


First make copies of the configuration files, in case you want to undo this:
Code:
sudo cp /etc/hosts /etc/hosts.old
sudo cp /etc/hostname /etc/hostname.old


Then you need to edit the "2" files below which have the "hostname" in them.
Edit the files and change the "old" hostname to the "new" hostname


Code:
gksu leafpad /etc/hosts
Then
Code:
gksu leafpad /etc/hostname


Now re-boot, and you now have a "new" hostname


"Important"
If you have set up network "sharing" on this PC you also need to change the "netbios name" to match the "new" hostame


First make copy of configuration file, in case you want to undo this:
Code:
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.old
Then
Code:
gksu leafpad /etc/samba/smb.conf


Edit the file and change the "netbios name =" from "old" hostname to the "new" hostname that you changed above


Now re-boot, your PC will now show on your network with a name that "matches" your "new" hostname
If you have created links to this PC from "other" PC's, you will also need to edit those links to match the "new" hostname.


If you wish to change back to the "original hostname", you will need to do the following:


Code:
sudo cp /etc/hosts.old /etc/hosts
sudo cp /etc/hostname.old /etc/hostname
sudo cp /etc/samba/smb.conf.old /etc/samba/smb.conf


The re-boot.


Remember to change back any links to this PC from "other" PC's,
you will need to edit those links again to match the "original" name.
Upgrades WIP 2.6 to 2.8 - (6 X 2.6 to 2.8 completed on: 20/02/16 All O.K )
Linux Lite 3.0 Humming on a ASRock N3070 Mobo ~ btrfs RAID 10 Install on 4 Disks Smile

Computers Early days:
ZX Spectrum(1982) , HP-150 MS-DOS(1983) , Amstrad CPC464(1984) ,  BBC Micro B+64(1985) , My First PC HP-Vectra(1987)
Reply
#2
Thanks for the nice manual, Dave! Smile
Reply
#3
All part of sharing... Smile
Upgrades WIP 2.6 to 2.8 - (6 X 2.6 to 2.8 completed on: 20/02/16 All O.K )
Linux Lite 3.0 Humming on a ASRock N3070 Mobo ~ btrfs RAID 10 Install on 4 Disks Smile

Computers Early days:
ZX Spectrum(1982) , HP-150 MS-DOS(1983) , Amstrad CPC464(1984) ,  BBC Micro B+64(1985) , My First PC HP-Vectra(1987)
Reply
#4
Or use Lite Tweaks. Cheers Dave, still very useful, especially the samba part Smile
Reply
#5
@Jerry,

My bad, I forgot about Lite Tweaks  :-[ :-[


Is it feasible to add the Samba part into Lite Tweaks..??
Upgrades WIP 2.6 to 2.8 - (6 X 2.6 to 2.8 completed on: 20/02/16 All O.K )
Linux Lite 3.0 Humming on a ASRock N3070 Mobo ~ btrfs RAID 10 Install on 4 Disks Smile

Computers Early days:
ZX Spectrum(1982) , HP-150 MS-DOS(1983) , Amstrad CPC464(1984) ,  BBC Micro B+64(1985) , My First PC HP-Vectra(1987)
Reply
#6
(10-27-2015, 06:00 PM)Wirezfree link Wrote: @Jerry,

My bad, I forgot about Lite Tweaks  :-[ :-[


Is it feasible to add the Samba part into Lite Tweaks..??
I second that Wink especially when integrating with Windows systems - took me a second to figure out "lappy" netbios...

I can add to the 2.8 suggestion thread..
LL4.8 UEFI 64 bit ASUS E402W - AMD E2 (Quad) 1.5Ghz  - 4GB - AMD Mullins Radeon R2
LL5.8 UEFI 64 bit Test UEFI Kangaroo (Mobile Desktop) - Atom X5-Z8500 1.44Ghz - 2GB - Intel HD Graphics
LL4.8 64 bit HP 6005- AMD Phenom II X2 - 8GB - AMD/ATI RS880 (HD4200)
LL3.8 32 bit Dell Inspiron Mini - Atom N270 1.6Ghz - 1GB - Intel Mobile 945GSE Express  -- Shelved
BACK LL5.8 64 bit Dell Optiplex 160 (Thin) - Atom 230 1.6Ghz - 4GB-SiS 771/671 PCIE VGA - Print Server
Running Linux Lite since LL2.2
Reply
#7
(10-28-2015, 02:28 AM)firenice03 link Wrote: [quote author=Wirezfree link=topic=2420.msg18371#msg18371 date=1445968854]
@Jerry,

My bad, I forgot about Lite Tweaks  :-[ :-[


Is it feasible to add the Samba part into Lite Tweaks..??
I second that Wink especially when integrating with Windows systems - took me a second to figure out "lappy" netbios...

I can add to the 2.8 suggestion thread..

[/quote]

I appreciate the suggestion, but it is very clearly laid out in the Help Manual Smile
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)