DebianThis forum is for the discussion of Debian Linux.
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.
Hi everybody. A week ago I upgraded my Debian install from squeeze to wheezy. From time to time I get a funny bug on my terminal. I get random hostname. When I first installed Debian on my PC, I named my computer Anardil, so usually my command line looks like this
My user account -> jjrojaspy@Anardil:~$
root account -> root@Anardil:~#
Thanks Frankbell. I know that this doesn't make any sense at all, but I didn't realize this was happening until i opened my terminal the day before yesterday; today I could observe the same anomaly. As I said, this happens from time to time.
Yes, I'm sure it's not only the command line prompt. In fact, when i turned my computer on today, I checked the terminal once more and this is what i got ---and still get:
jjrojaspy@be4f4c87-dslam-172-17-193-239-269-660-mil-bras-01:~$ hostname
be4f4c87-dslam-172-17-193-239-269-660-mil-bras-01
jjrojaspy@be4f4c87-dslam-172-17-193-239-269-660-mil-bras-01:~$ uname -a
Linux be4f4c87-dslam-172-17-193-239-269-660-mil-bras-01 3.2.0-4-amd64 #1 SMP Debian 3.2.46-1 x86_64 GNU/Linux
jjrojaspy@be4f4c87-dslam-172-17-193-239-269-660-mil-bras-01:~$
and if i turn into root
root@be4f4c87-dslam-172-17-193-239-269-660-mil-bras-01:~# hostname
be4f4c87-dslam-172-17-193-239-269-660-mil-bras-01
root@be4f4c87-dslam-172-17-193-239-269-660-mil-bras-01:~# uname -a
Linux be4f4c87-dslam-172-17-193-239-269-660-mil-bras-01 3.2.0-4-amd64 #1 SMP Debian 3.2.46-1 x86_64 GNU/Linux
root@be4f4c87-dslam-172-17-193-239-269-660-mil-bras-01:~#
it's just the same.
Nevertheless, if i reboot my pc and go into Debian again, the terminal shows the correct prompt and hostname.
Thanks to all who have answered my question, but a i have a few more:
a hostname isn't supposed to use uppercase letters? Is this a *nix naming convention? or just a de facto rule among Linux users and administrators? I have two pc's in my office, one running Ubuntu and the other Xubuntu (12.04 in both cases), and they are call Local1 and Local2. As you can see, each hostname begins with an uppercase letter. On the other hand, before I upgraded my Debian installation I never got other hostname than the one a set up during the installation process.
I will check the hostname and hosts files on my PC and then I will be back to you. Thanks again!!
Is your debian directly connected to the net? (i.e. not through a router).
That looks like the ISP assigned rDNS of your connection.
Maybe your DHCP client is set to accept a hostname as well as ip/dns etc.
as already suggested by descendant_command the host name you see is being provided by the dhcp server and is being set by dhclient. You should be able to disable this behaviour in /etc/dhcp/dhclient.conf
Try removing the "host-name" option from the "request" line.
Hi everybody. I finally could solve the hostname issue. As I was suggested by evo2 and descendat_command, I commented the host-name option in the request line of my dhclient.conf file. This solved the problem. Thanks to all for helping me!!!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.