[Information] Changing your "hostname"(Computer Name) - Printable Version +- Linux Lite Forums (https://www.freecinema2022.gq/forums) +-- Forum: Software - Support (https://www.freecinema2022.gq/forums/forumdisplay.php?fid=5) +--- Forum: Tutorials (https://www.freecinema2022.gq/forums/forumdisplay.php?fid=21) +--- Thread: [Information] Changing your "hostname"(Computer Name) (/showthread.php?tid=2338) |
[Information] Changing your "hostname"(Computer Name) - Wirezfree - 10-26-2015 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 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 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 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 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. Re: [Information] Changing your "hostname"(Computer Name) - LL-user - 10-26-2015 Thanks for the nice manual, Dave! Re: [Information] Changing your "hostname"(Computer Name) - Wirezfree - 10-27-2015 All part of sharing... Re: [Information] Changing your "hostname"(Computer Name) - Valtam - 10-27-2015 Or use Lite Tweaks. Cheers Dave, still very useful, especially the samba part Re: [Information] Changing your "hostname"(Computer Name) - Wirezfree - 10-27-2015 @Jerry, My bad, I forgot about Lite Tweaks :-[ :-[ Is it feasible to add the Samba part into Lite Tweaks..?? Re: [Information] Changing your "hostname"(Computer Name) - firenice03 - 10-28-2015 (10-27-2015, 06:00 PM)Wirezfree link Wrote: @Jerry,I second that especially when integrating with Windows systems - took me a second to figure out "lappy" netbios... I can add to the 2.8 suggestion thread.. Re: [Information] Changing your "hostname"(Computer Name) - Valtam - 10-28-2015 (10-28-2015, 02:28 AM)firenice03 link Wrote: [quote author=Wirezfree link=topic=2420.msg18371#msg18371 date=1445968854]I second that 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 |