Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
That name is given to you by your ISP and you usually can't change it easily.
If you want to be able to access it by another name just edit /etc/hosts and add the name you want in the same line as 127.0.0.1, separated by a space or a tab from the other entries.
I was wondering that too...but I just assumed that he wants to be able to reference his computer by a more normal-looking name on his LAN or locally or whatever.
That /etc/hosts won't change your actual hostname but it will make an alias to it which may be what you need.
If you really want to change your host name you'll need to get a FQDN and get a DNS service.
/etc/hosts first line is normally for the loopback interface.
127.0.0.1 localhost lo (and so on)
192.168.x.y mypc.mynet.net mypc (you have to make up your own IP)
It goes: IP<spaces>hostname<spaces>alias1<spaces>alias2<spaces> ...
If you change the 127.0.0.1 line, some things won't work ... like printing?
Your isp would have had an entry in there too I guess - it is needed for you to receive packets from them.
After setting your own network name etc as above, the hostname= may work for you so it says "welcome to myhost.mynet.net" (or whatever) in the logon screen.
However - your isp may have got you to install a script which changes your hostname at reboot.
hi
the problem is that I dont know why my local hostname is set to an IP adress which was assigned by the ISP
I dont want an ip address as the name of my localhost, I want my name to be the name of the localhost.
I want to change my local hostname from the IP adress which was assigned i.e cpe_144-136.. to myname.HOME
Distribution: debian, gentoo, os x (darwin), ubuntu
Posts: 940
Rep:
your adsl modem seems to be connected directly to your computer (such as a usb modem)
your isp will generally hand out a dns name though you might be able to not accept this when it is offered... 'm not sure, but i believe you could have a look in your dhcp client man page
"cpe-144-136-111-xxx" will be the name of the modem (as well as it's IP). If the modem is connected directly to the computer (via USB as suggested or otherwise) then this must be the name of the computer too. Otheriwse, how is the computer to see anything in the modem?
(Though I'm wondering if this name can be an alias name instead? But it would appear that setting up a DNS server would do the trick.)
Generally, if you plug the modem in through a ethernet nic, then you can keep your hostname whatever you want and just set DHCP.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.