A hostname is the label given to a device connected to a computer network.
8
votes
3answers
464 views
How to change a hostname
During Debian installation, I set my hostname to the wrong value, and now I would like to correct that.
7
votes
2answers
12k views
How to change the hostname of a linux machine using terminal?
I logged in for the first time, opened terminal, and typed in ‘hostname’. It returned ‘localhost.localdomain.com’. Then I logged as the root user in terminal using the command, ‘su –‘, provided the ...
6
votes
1answer
222 views
Why the difference between network addresses reported by hostname and ping?
I have tried hostname and ping in a cluster machine, with different outputs. I am wondering what is the difference between the two? For example, on the same machine, hostname outputs node4.XXX and
...
6
votes
1answer
3k views
Wildcard in /etc/hosts file
It seems that wildcards are not supported in the /etc/hosts file.
What is the best solution for me to resolve all *.local domains to localhost?
6
votes
2answers
411 views
What are the ramifications of setting the hostname?
I have several Amazon EC2 servers and I'm using Chef to manage the configuration. I'd like to set the hostname so that the default bash prompt is more helpful.
Right now after launching a new server ...
5
votes
5answers
376 views
resolve all ip addresses in command output using standard command line tools
I have several log files that contain a bunch of ip addresses. I would love to be able to pipe the data through a program that would match and resolve ip addresses.
I.E.
cat /var/log/somelogfile | ...
5
votes
3answers
3k views
I changed my hostname, why is my bash PS1 prompt unchanged
I changed my hostname by editing /etc/hostname and can see the new hostname using the hostname and hostname -F commands.
But the shell prompt is still showing the old hostname.
This is Ubuntu 11.0.4 ...
5
votes
3answers
4k views
How does traceroute resolve names?
While writing a script, I wanted to reference a machine by the computer name that I gave it (e.g. "selenium-rc"). I could not ping it using "selenium-rc", so I tried the following commands to see if ...
5
votes
1answer
191 views
`hostname` - host name or FQDN?
What is the right thing to set a computer's hostname to? (/bin/hostname, /etc/hostname, sethostname(2), etc.)
I usually just use the "name" part, and it works perfectly (for me at least), but I've ...
5
votes
3answers
429 views
“Unable to resolve hostname” - how to cleanly change hostname without rebooting
At work, I work on a small website using Ubuntu servers hosted on Amazon EC2 instances. We have two webservers, and at any given time one of them is 'live' and one is 'testing', but when we've got our ...
4
votes
2answers
594 views
Why is my hostname different in Emacs?
So I changed the name of my computer recently, by editing /etc/hostname. The bash prompt is user@name, so I know it has worked.
But in emacs, in the window bar it says emacs@name.tiscali.co.uk. ...
4
votes
1answer
93 views
Getting a website's ip with 'host'?
Why is it that when I run the command host examplewebsite.com it gives me website's ip, but for some websites, when I type that IP address into the address bar and hit enter, it shows me a 404 page?
...
4
votes
1answer
95 views
show hostname in top
I'm using top with tmux to monitor the most-CPU-consuming processes on different computers. How can I get the hostname to be displayed in each pane? Can I tell top to display the hostname somehow?
4
votes
1answer
244 views
Is there any way to access a hostname containing an underscore?
I have this weird problem. I need to access a website that contains an underscore from Linux. The hostname is invalid and Linux does treat it as such.
The problem is that access from Windows seems to ...
3
votes
2answers
441 views
Creating alias to domain name with /etc/hosts
I have a domain setup to point to my LAN's external IP using dynamic DNS, because my external IP address changes frequently. However, I want to create an alias to this host, so I can access it with ...
3
votes
2answers
2k views
What is sendmail referring to here?
When I install sendmail from the debian repos, I get the following output:
Disabling HOST statistics file(/var/lib/sendmail/host_status).
Creating /etc/mail/sendmail.cf...
Creating ...
3
votes
5answers
4k views
Unix - how to get hostname along with domain name
In unix (Solaris) is there any command that returns the hostname and domain name together?
For instance:
hostname -> servername
domainname -> us.xyz.com
I need : servername.us.xyz.com
3
votes
2answers
2k views
How to request a hostname from a DHCP server on Ubuntu?
I have an Ubuntu 11.04 server virtual machine. I would like to request a specific hostname from the DHCP server at the office. Since I don't run it often, the IP changes nearly every time that I boot ...
2
votes
1answer
157 views
Changing hostname without errors
I tried to change my hostname according to this guide for Debian based system:
I edited /etc/hostname
I ran /etc/init.d/hostname start
Though there are errors. Always when I write a sudo command ...
2
votes
2answers
5k views
Unable to resolve hostname
So I try to do:
ssh $(hostname)
and it tells me:
ssh: Could not resolve hostname woofy: Name or service not known
It knows that its own hostname is "woofy"; why can't it connect to itself?
2
votes
1answer
165 views
ZSH %m prompt escape not working as documented under Debian Linux
The zshmisc man page on my new Debian Squeeze install states, under SIMPLE PROMPT ESCAPES:
%m
The hostname up to the first `.'. An integer may follow the '%' to specify how
many components of the ...
2
votes
2answers
1k views
How do I get to use .local hostnames with Arch Linux?
If I'm using Ubuntu or Linux Mint (the only two flavours I've tried and know work for sure), I can run something like this:
wayne@myhost$ ssh wayne@otherhost.local
And the name is automagically ...
2
votes
1answer
175 views
Remove a directory level from a website URL
Can anyone tell me how to configure apache to not display a website folder name at the end of a base URL, please? - but only for one out of many websites.
Let me describe the scenario ...
I have a ...
2
votes
2answers
2k views
Get client hostnames from DHCP
I have a voyage 2.6.38 machine running DNSMASQ for a DHCP server and I would like to get the hostnames of the clients that acquire DHCP leases. How would I go about doing this?
2
votes
1answer
843 views
Hosts file on server with dynamic DNS?
I am setting up a RHEL-based server that is associated with dynamic DNS from DynDNS, with a domain of, say, "abc.dyndns.org" that is dynamically updated with the server's IP address.
I have read that ...
2
votes
1answer
261 views
Short domain name to FQDN expansion
Is it possible to configure where the system will look for the machine if I enter just a short domain name?
I work in a grid environment where the machines are many and spread across multiple ...
2
votes
1answer
250 views
Fail to ssh to remote machine via hostname
The problem is that I fail to SSH to a remote machine via its hostname, while using its IP works.
The hostname returned by command hostname is: california_desert
while the name returned by command ...
2
votes
2answers
133 views
How is my domainname determined?
If I look into /etc/hostname/ I can see the hostname of my device. This is however not the name that shows up when I use nslookup on our network. How do I tell the DNS server which name it should use?
...
2
votes
1answer
197 views
How to add another domain to my chrooted named server
Firstly I successfully have a domain working in a chroot named. There are files in /var/named/chroot/var/named called mydomain.com.db and named.local and named.root.
Also in /var/named/chroot/etc ...
2
votes
3answers
40 views
Can DNS identify hostnames dynamically if they're statically configured?
I've got a small environment of ~40 VMs with static IPs on 12 servers, it would be dandy if I could refer to each VM by name. We have a lot of VMs come and go, so maintaining one static list is a ...
2
votes
2answers
2k views
Fedora 16 ssh over the internet/home network help. Same computer ok
I first posted this on serverfault, but this forum seem to be more appropriate.
http://serverfault.com/questions/345471/fedora-16-ssh-over-the-internet-home-network-help-same-computer-ok
I think I ...
2
votes
0answers
138 views
why is FQDN using external IP address
When postfix connects to the FQDN dur.bounceme.net it uses the external IP address:
root@dur:~#
root@dur:~# tail /var/log/mail.log
Aug 28 04:39:45 dur postfix/master[6667]: terminating on signal 15
...
1
vote
2answers
2k views
What is a valid hostname label?
I set up my hostname to a number, where running hostname gives:
6592
But when I run ping 6592, I get:
connect: Invalid argument
I checked the related Wikipedia page, and it does say that such a ...
1
vote
1answer
185 views
I changed my hostname, rebooted and lost internet connection
I set a new hostname on my machine using:
sudo hostname NEWHOSTNAME
Then I restarted, and tried accessing the internet and nothing happened. I checked the hostname and it was set to ...
1
vote
1answer
41 views
Resolving an alias to a remote server
I have what I think is called an IP alias, which is used to access a Windows file server from a Unix server. The path on Unix looks something like:
/folder/file.txt
which is somehow resolved as:
...
1
vote
1answer
25 views
Changing the server name
I changed the name of the hosts in /etc/hosts to
IP.GOES.HERE newname
Apache does recognize the new server name; but still, via ssh i get this on the ssh prompt:
[root@oldname]
Why? Where else ...
1
vote
1answer
598 views
New SL6 system: No hostname?
This is in regards to Scientific Linux 6.1 system, but should also apply to CentOS 6.1 & RHEL 6.1.
I am setting up a new Scientific Linux 6.1 system, using kickstart and DHCP (via xCAT). This ...
1
vote
0answers
557 views
centos 6, hostname won't resolve, dns issue, loop detected
I've searched everywhere and tried all the suggestions that I've seen, but I just can't get this to work now (it was working before). This is the first time I've ever installed a test server that I ...
1
vote
3answers
204 views
How to append / extend zshell completions?
I am using zsh with oh-my-zsh. Unfortunately, oh-my-zsh does not use file ~/.ssh/config for hostname auto-completion (see Issue #1009, for instance).
This could easily archived by the following code:
...
0
votes
2answers
115 views
How to add an IP to hostname file
I have a Centos 5.8 server. How can I add my server IP address 192.168.20.254 so that it reflects when I run the command hostname -i
At the moment the command only shows the loopback IP 127.0.0.1 and ...
0
votes
1answer
157 views
How to set name to localhost in fedora15?
I want to set name to my localhost.for example I want mysite.com instead of localhost/mysite how to do that?
I have searched but couldn't get a solution for Linux.
0
votes
1answer
173 views
Unable to set hostname for use within network
I am having a lot of trouble setting up a hostname for my home server for use within my home network. My home server is running Ubuntu 12.04 LTS and all packages are up to date. Management of this ...
0
votes
4answers
65 views
Setting a network hostname doesn't work
I'm on a Kubuntu 11.10 and I'm having trouble setting a hostname on the network.
I already tried changing send host-name "myhostname" in /etc/dhcp/dhclient.conf or /etc/dhcp3/dhclient.conf with a ...
0
votes
1answer
278 views
nacl crypto installation on arch
I am trying to install nacl crypto on my system:
% uname -a
Linux (none) 2.6.39-ARCH #1 SMP PREEMPT Mon Jun 6 22:37:55 CEST 2011 x86_64 Intel(R) Core(TM) i5 CPU M 540 @ 2.53GHz GenuineIntel GNU/Linux
...
-1
votes
2answers
106 views
Applications get started in the network instead of localhost [closed]
Normally uname -a shows me Linux localhost.localdomain [more stuff...] but for some reason it shows me some other other domain (but it is still my own terminal but really slow). I guess I am connected ...