Ubuntu :: Difference Between /etc/hosts And /etc/hostname?
Oct 8, 2010
What is the difference between /etc/hosts and /etc/hostname?
I think the /etc/hosts file stores all ip address associated with this computer, but what about /etc/hostname?
It sounds almost like the computer name, but what is it used for?
View 6 Replies
ADVERTISEMENT
Jan 21, 2010
the difference between $HOSTNAME and $(hostname)?
View 5 Replies
View Related
Dec 4, 2010
Ubuntu 10.10 64 bit
I need to set /etc/hostname and /etc/hosts so that on running;
$ hostname
Code:
ub1004
$ hostname -a
Code:
ub1004
[Code]....
View 2 Replies
View Related
Jan 23, 2011
I'm trying to change my computer name and looked up other posts and found I need to edit /ect/hostname and /ect/hosts, but neither of these folders exist so how do I change my computer name in ubuntu 10.10?
View 3 Replies
View Related
Dec 4, 2010
Ubuntu 10.10 64 bitI need to set /etc/hostname and /etc/hosts so that on running;$ hostname Code: ub1004 $ hostname -a Code: ub1004 set them as;cat /etc/hostname Code: ub1004 cat /etc/hosts Code: 127.0.0.1localhost.localdomain123.123.123.123ub1004.domain.comub1004
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
[code]....
View 7 Replies
View Related
Jul 13, 2010
I'm facing bit of a conundrum with my new server. It is essentially a distributed-virtual Plesk Virtuoso container with a rather simple LAMP setup (PHP5 etc) and virtual hosting. Running 10.04 LTS.
The issue is that on each reboot, the /etc/hosts and /etc/hostname files are reset with their original configs causing the virtual hosting to break, i.e. rather than hosting the vhosts correctly, it essentially routes all traffic to /var/www, or essentially 000-default ~ this beats the whole point of vhosting in the first place!
Is there any way to get around them being overwritten at boot? A very crude workaround would be to set a script to load at boot via init.d and have it rewrite both files to their correct configs - of course, I have no idea as to the point during boot at which they get replaced.
View 2 Replies
View Related
Apr 30, 2010
I can reach other hosts by means of their global addresses by either the IP address or hostname (that has the global address). What I want to (also) do is have a hostname that references the IPv6 link local IP address (an AAAA record in DNS, or just the fe80::<whatever> address in /etc/hosts) and use that host name in commands to access that host. The problem is, an interface ID is needed when making such a reference.
It sure looks like the programs just pass the host name string on to the resolver library, which does not understand the significance of the '%' even though it could find and see that the name preceding the '%' is consistent with that being an IPv6 link local address (e.g. the logic could have been "split at first % and see if preceeding name is found as a link local address and accept that if so, or ignore the split otherwise" ... but it isn't). Is there a different syntax for this ... or was it overlooked in the design of programming around IPv6?I want to be able to address a host by its link local address, while still using a mnemonic instead of having to type the IPv6 address.
View 1 Replies
View Related
Sep 27, 2010
I installed a new instance of Ubuntu server (10.04) and set the hostname equal to "ubuntu-10.04-server-i386". However when I type the command hostname I get that the hostname is equal to "ubuntu-10". I then realised that the command hostname --long gives me the full name (as defined when doing the linux installation) while hostname --short gives me the name as displayed in terminal. My question is; what is the difference between these two? Are both valid?
View 4 Replies
View Related
Aug 17, 2011
Well, as many proxy applications, GNOME Network Proxy Preferences only allow to ignore hosts. What I want to do is exactly the opposite. I only want to use the proxy for few sites. Is it possible to define only the allowed hosts in any way?
PS: I know FoxyProxy add-on for Firefox does this, but 1)I don't use Firefox and 2)I want the proxy settings system wide not only for browser.
View 9 Replies
View Related
Jan 3, 2010
I have a network of 2 WinXP machines and one linux box. I have fiddled around with the settings as you do when learning. The network is working. The network neighbourhood on the WinXP machines recognise the linux box and vice versa, (the linux Places|Network recognises the 2 WinXP). I can Ping the linux box using its hostname from a WinXp. But I cannot do the reverse. I get an 'unknown host' response. I can ping the linux to itself using its hostname.
View 7 Replies
View Related
May 2, 2011
I'm trying to use ssh-keyscan to get some known_host file population going on, but I have a ton of hosts I want to scan, all with multiple aliases in /etc/hosts. Is there a way to use my current /etc/hosts file to do an ssh-keyscan instead of making a special list of hosts that (from what I've read) ssh-keyscan needs?
View 2 Replies
View Related
May 24, 2010
I'm trying to ping another Ubuntu computer on my local network. If I try doing,ping <hostname>then I get the messageping: unknown host <hostname>however, if I doping <hostname>.localthen I get a response back. I was wondering how I can change it so that I can ping without having to append .localI've installed winbind and modified my /etc/nsswitch.conf file but this has made no difference.
View 2 Replies
View Related
May 22, 2011
I have an ubuntu 10.04 server with hostname "abc.domain.com". However, due to migration, we had to change to hostname to something else, "xyz".
I have done changing /etc/hosts and /etc/hostname and run /etc/init.d/hostname start.
Checking the hostname and all shows it is now using hostsname of xyz. However, email sending out is still using old hostname. We have some scripts that will send out alerts like failed rsync or hdd space full to my email account. But I see the sender is still "root@abc.domain.com".
How do change that to xyz? I am using postfix. I have edited main.cf and restarted postfix but no go.
View 1 Replies
View Related
Jan 26, 2011
Probably an easy (which means stoopid) question...I am trying to reroute a website using my hosts file so that it matches my servers certificate file for testing without effect dns and the live site.When I went to edit my /etc/hosts file it is non-existent. I have, I am assuming in it's place, hosts.allow and hosts.deny. Can anyone explain why I do not have a hosts file?
View 1 Replies
View Related
Jul 29, 2010
I'm having an issue on two Fedora Core 13 machines where I can ping others by hostname, but the hostname resolution fails whenever I use ssh/scp/vnc/etc. I can still do these things by IP address, just not by hostname. RHEL5.3 machines on the same network with the same configuration do not seem to have this problem.
Here's the not-so-quick-and-dirty description of the situation:
I know that there is a virtual router at 192.168.31.1 and another at 192.168.30.1. I also know that there is another network (let's call it 90.90.90.0) and on that network lies a number of resources. By nature of this configuration, any machine on 90.90.90.0 can be accessed by any 192.168.x.x, but not the other way around. Beyond that is out of my hands and currently out of my scope of knowledge.
I have a dnsmasq server on 90.90.90.10 that operates as a secondary nameserver, another machine out of my sphere of influence is the primary nameserver (90.90.90.31).
The secondary nameserver on 90.90.90.10 holds the hostnames of our development machines. The problem is that in some cases, while I can ping by hostname all day long, services such as ssh, scp, vncviewer, etc all fail to resolve the hostname. In other cases I can do all of these things.
Every machine has an equivalent resolv.conf:
As an example, I will show the output of a handful of my development machines:
I also included columbia as a one-way test -- even though it cannot access 30.x or 31.x, they can access it:
columbia -- physical machine, Red Hat Enterprise 5.3, IP 192.168.100.200
Okay, so here are the various outputs. Remember, nibbler, discovery, and atlantis can ALL:
- Ping by IP address
- Ping by hostname
- ssh, scp, vnc, etc by IP addess
Additionally, the SERVFAIL reply from 90.90.90.31 is expected since my dnsmasq server is on the secondary server.
Note that the only machine that can both ping and ssh/scp/etc by hostname is nibbler, which also happens to be the only one of the three running RHEL5.3 instead of FC13. Other virtual and physical machines running on the 192.168.31.0 and 192.168.30.0 networks (all running RHEL5.3) work just like nibbler does. So the problem seems to only affect machines running FC13.
Final note: selinux is disabled, iptables is disabled, ip6tables is disabled.
Other than that, discovery is a brand-spanking-new install straight off of the FC13 DVD. atlantis has been around longer, but its just a file server so I haven't done anything too crazy to it.
View 3 Replies
View Related
Apr 6, 2010
How do I set $HOSTNAME to dynamically update with the hostname that is specified for the ip in DNS?
View 3 Replies
View Related
Jan 17, 2011
[Code]....
What I want: multiple virtual hosts with ssl and only 1 ip address: In my example: server = 192.168.227.129
[Code]....
View 9 Replies
View Related
Aug 27, 2010
I'm have been tasked with created a base Ubuntu image that can be used for cloning to multiple machines. As this is a network environment, each hostname will obviously need to be unique. Rather than manually changing the hostname each time a new, cloned machine is rolled out, I was wondering if there is a way to use a variable in the hostname (i.e., use a variable to truncate the the last 6 digits of the MAC address to the end of the static hostname--or any other unique variable for that matter--so it would look like hostname00E6D4).
View 7 Replies
View Related
Mar 24, 2010
I just set up a new karmic server, and the hostname is being set properly, but I'm not exactly sure how, since there is no longer an init script that sets it (it used to be /etc/init.d/hostname.sh on my older servers). Now I'm curious: what is the new mechanism by which the server's hostname is set at boot time?
View 3 Replies
View Related
May 3, 2010
How i put `hostname` in uppercase in this case:date +"%Y%m%d%T" > date_`hostname`.txt Best wishes,Andr Barradas
View 3 Replies
View Related
May 14, 2010
I just have a simple question. When I installed Lucid a few weeks ago, I didnt feel very inspired, and thus left the host name at default. I just changed the hostname today, and I discovered that I can no longer resolve the host for ssh connections to the computer. When I changed the hostname files, I followed this guide: [URL].. Is there a file that I need to change regarding SSH that has a hostname in it?
Specifically, Im trying to ssh and VNC connect to the Ubuntu box from my iPhone. I have a PuTTY client installed on it (from the app store, called iSSH) and up until now, it worked.
View 9 Replies
View Related
Jul 5, 2010
I share a computer with my brother. It runs Lucid Lynx. I want to add an entry to the hosts file that will affect him negatively. Is there a way I can add the entry, without it affecting him, like, is there a user-specific hosts file?
View 9 Replies
View Related
Jul 13, 2010
Is there anyway that I can prevent access to the hosts file, or any file for that matter, for a time that I can specify, so that within that time no one will be able to open and edit the said file?
View 4 Replies
View Related
Aug 31, 2010
I have a problem reaching some hosts on the Internet, namely newegg.com and djangoproject.com. On the same machine and network connection using Windows 7 the host names resolve properly and I can connect to them. The host names are resolving in Ubuntu, but I cannot connect to them.
View 9 Replies
View Related
Oct 23, 2010
It appears that hylafax is not using hosts.hfaxd file. or that it quickly clears entries put in it.
Does anybody know how to set the admin password for hylaxfax? or where to redirect me?
I am running this on karmic.
View 2 Replies
View Related
May 15, 2011
I'm using firefox and I'm trying to block [URL] by ading the line 127.0.0.1 [URL] in /etc/hosts but it don't work. I get this error message in terminal;
Code:
(gedit:11640): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.ZTL1UV': No such file or directory
(gedit:11640): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory
View 7 Replies
View Related
Jan 3, 2010
I have installed a ubuntu 9.10 server to use mostly as a fileserver. When I installed the server I set it up as DHCP and later on I have changed the /etc/network/interfaces file, the /etc/hosts file and the /etc/hostname file. I have the ip 192.168.1.100 set on the server and I can ping and SSH this address. But I can not ping my server by it's hostname enighet. I am setting up a NFS server and I would like to use my servers hostname when I do this. Why can I not ping my server by it's hostname? These are the 3 files I have changed...
Code:
johan@enighet:~$ cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
[Code]....
View 2 Replies
View Related
Feb 22, 2010
Everytime I turn on the computer, the hostname is getting changed back to localhost.
Code:
cat /etc/hosts
127.0.0.1najilelocalhost
# The Following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
[Code]....
(side note: man hosts says that the name is based off the hostname file, but that's clearly not the case here. It's being named off the /etc/hosts file. Why did we move away from /etc/hostname? It's SOO much easier)
These computers (It's more then one) were all installed with the minimal Ubuntu disk and then installed basic software such as xorg, nautilus, gdm, and openoffice.
View 4 Replies
View Related
Jul 19, 2010
I just finished installing ubuntu server 9.10 - fairly new. I couldn't run SSH when I use IP address of the server. I've also setup DynDNS that returns responses when I ping. SSH works fine when I use the hostname of my server (leopard) but SSH doesn't work when I use IP.I was expecting IP for "eth0" something starting with 192.168.x.x as are my other computers running WIN on the same network.Any ideas why
1) Why am I not able to run SSH from IP assigned to server by DHCP. It works when I use machine hostname (leopard)
2) Why SSH isn't working from DynDNS web hostname when it responses back the ping command.
View 6 Replies
View Related
Oct 6, 2010
ok so when i sudo apt-get update i get a bunch of crap that says no address associated with hostname
ive googled this and changed my /etc/hosts to all sorts of things and no luck apache wont even work now either. this server is for a few websites the company i work for hosts. currently i swaped it over to another windows based comp but we want it on ubuntu.
ive heard this is dns related? and that a FQDN is needed? if so im not sure how to re write my /hosts file but as of not it looks like this:
Code:
127.0.0.1localhost
63.119.120.135speed
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
[Code].....
View 9 Replies
View Related