Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [hostname]

The unique name by which any device attached to a network is known by.

483
votes
14answers
893k views

How do I change the hostname without a restart?

I want to change the OS hostname but I do not want to restart. I have edited /etc/hostname but it requires a restart to get implemented. How to avoid this?
320
votes
13answers
704k views

How do I change the computer name?

When I connect to my server (ubuntu server 10.10), I get this: name@server-name.belkin ~> How can I remove ".belkin"?
50
votes
7answers
290k views

How to find a computer name in a LAN from the IP address?

My network includes machines running Linux and others running Windows. And my machine is running Linux.
37
votes
2answers
88k views

How to use host names rather than ip addresses on home network?

I've a small home network up and running and managed to set up ssh. Can anyone tell me what I need to do to refer to one computer on the network from another by host name rather than IP address (which ...
29
votes
1answer
73k views

Why I got 'unable to resolve host' when I do 'sudo'? [duplicate]

Whenever I do 'sudo' I get an error saying 'sudo: unable to resolve host HP-Pavilion'. I recently change my hostname to "HP-Pavilion". I wonder if I screw up something. $ sudo mkdir SourceCodePro ...
26
votes
3answers
71k views

Changing System name [duplicate]

I am given an old Ubuntu working system and the previous user had everything on his name so started turning it to my name as typing his name everywhere was bugging me. I tried: $ usermod -l hussain ...
25
votes
2answers
24k views

What does “.local” do?

I've got several Ubuntu machines on my network at home, but the DNS is provided by a windows server (2K). When I ssh to them from another , if I ssh to them as "machine" I can't connect, but if I ...
21
votes
1answer
2k views

How do I change the hostname on an Ubuntu Core system?

I just installed Ubuntu Core on my Raspberry Pi 3 and I would like to use a name other than localhost.localdomain. How would I do this? Are there special considerations to take into account?
17
votes
0answers
1k views

Safe way to rename my computer/hostname? [duplicate]

Possible Duplicate: How do I change the computer name? I'd like to rename my computer. What's the recommended way to do this? Is there anything likely to break after I rename it?
15
votes
5answers
24k views

Modifying /etc/hosts does not have an effect

I'm attempting to block myself from time-wasting websites but changes I make to /etc/hosts. For example: 127.0.0.1 localhost 127.0.1.1 ross-laptop 127.0.0.1 bing.com # The following lines are ...
14
votes
4answers
87k views

How to get the hostname using terminal command-line?

I have used arp-scan in terminal to get the ipaddress as well as mac address, is there anyway i can get to know the hostname of the ipaddress that are there in the terminal? for example there are A-pc ...
14
votes
4answers
15k views

Name resolution on home LAN?

Is there an easy way to allow my other computers to resolve my hostname over the network without having them edit their hosts files or their DNS settings? Some of the computers are on Windows.
14
votes
3answers
49k views

ubuntu server not resolving LAN hostnames

Bit stuck here. I have 2 machines that cannot resolve LAN hostsnames, unless there are specific entries in /etc/hosts But other machines on the LAN can resolves hostnames. My LAN: 1 x Cisco ...
14
votes
8answers
84k views

How to get the hostname from a DHCP server

I want Ubuntu to get the hostname and DNS name from a DHCP client. The default installation of Ubuntu 11.10 (Oneiric Ocelot) does not do that. The same question was asked and is unsolved on ...
11
votes
5answers
6k views

How to reach a host in the same network by hostname?

I have a network which connects a couple of hosts. I would like to be able to reach other hosts from one of them using the hostname. I just discovered the ".local" domain, which is available through ...
11
votes
2answers
34k views

How to get the hostname from /etc/hostname & DNS domain name?

How do I get the host name from /etc/hosts? by writing hostname? And what about the dns domain name, how do I get that? How do I get these names through the commandline?
10
votes
1answer
12k views

changing 127.0.1.1 back to 127.0.0.1 — will it break anything in Unity?

The /etc/hosts file defaults your hostname to 127.0.1.1 rather than 127.0.0.1 127.0.0.1 localhost 127.0.1.1 my_machine I've already found out why. But that was giving me problems testing some ...
9
votes
3answers
10k views

Should one use FQDN in /etc/hostname instead of hostname?

As I read in man page, it is recommended to put hostname(without domain name) to /etc/hostname. For example, host instead of host.domainsub.domaintld. But, as I know, some software relies on having ...
9
votes
2answers
432 views

Make a .sh that sets new username, hostname and password

I am distributing a VM to my students for a beginners programming course. For speed, instead of getting them to install Ubuntu from scratch, I'm planning to give them a fully set up image that they ...
8
votes
1answer
10k views

What are the default settings for 'etc/hosts' and 'etc/hostname'?

I'm using Ubuntu 16.04. I recently started learning DevOps and got a bit crazy with my 'etc/hosts' and 'etc/hostname' files. In my frantic attempt to spin up a couple of servers from my local machine ...
8
votes
1answer
369 views

Why does my hostname contain odd characters?

I installed Ubuntu, went straight to the Terminal and noticed there is some odd characters in my name. Here's what it is: imageek@imageek-DP700A3D-DM700A3D-DB701A3D-DP700A7D: How do I change this?
7
votes
3answers
5k views

configured directory for incoming file does not exist

When I boot Ubuntu from Odroid, this message always appears: I change hostname and other, and I use usermod -d to change home directory, but I don't know why that message appears. When I use a ...
7
votes
1answer
23k views

How to safely change username and hostname?

I installed a fresh Ubuntu Gnome 14.04.3 today, but I just notice that I reversed the username and hostname during installation. To illustrate this, when I open a terminal, the prompt looks like : ...
6
votes
7answers
10k views

Can i configure ubuntu to append a domain to the end of an ssh hostname request?

I have many servers and they all end with the same servers.company.net, so for example vded-xx-001.servers.company.net, and was wondering if it is possible to make it so i can just type the vded-xx-...
6
votes
2answers
3k views

I want to change the host name - is it enough to edit the /etc/hosts file? [duplicate]

Short version Can I just edit the /etc/hosts file, meaning can I login as user@<hostname I wish to change> without unintentionally breaking something? Would this be enough or is there something ...
6
votes
1answer
11k views

What's the difference between `hostname` and `uname -n`

On my server, these both return the host name: $ ubuntu@mt-solo:~$ uname -n myserver $ ubuntu@mt-solo:~$ hostname myserver Is this always the case?
6
votes
2answers
7k views

Access Windows machines from Ubuntu on local network by hostname

[I've searched a LOT for a solution to this issue, but if someone wants to point me to a related question and/or answer, please do!] I have a local network over a broadband router with 3 Windows 7 ...
6
votes
1answer
2k views

Launching programs after hostname change returns error _IceTransSocketUNIXConnect: could not connect to local-host

After changing the hostname on 14.04 I cannot launch unetbootin, attempting to launch the application from bash returns: _IceTransSocketUNIXConnect: Cannot connect to non-local host OLDHOSTNAME ...
6
votes
3answers
4k views

How to troubleshoot a hostname problem?

I have a Ubuntu desktop PC and a Windows 7 laptop. They have network connection over a wifi router, which gives them local IP addresses. Both computers see each other when pinged by IP. The Ubuntu pc ...
5
votes
2answers
11k views

how to change my hostname?

My hostname is localhost, reported by hostname command, and terminal prompt root@localhost:~#. How can i change it to mismis.com with mismis alias? and what is the proper configuration. I confused ...
5
votes
1answer
30k views

Ubuntu 12.04 - Can't Resolve Hostname

I have a small dedi server on which I have installed Ubuntu 12.04. I access it via x2go since I have a desktop installed. All worked fine until 2 days ago when, after a reboot, I lost any Internet ...
5
votes
1answer
3k views

Changed hostname, closed before changing hosts, now sudo is broken, catch-22!

I'm using Lubuntu 12.04. I was trying to change my computer name to "main" and I messed up, I'm not sure what to do now. I was following the directions on this page. Here's what I did: sudo ...
5
votes
2answers
21k views

Permanent hostname change on Ubuntu

I have successfully changed the hostname of my Ubuntu machine, though whenever I restart it, I need to run this command to access it using host nname sudo /etc/init.d/hostname.sh start This is what ...
5
votes
1answer
45 views

Numeric Prefix in Hostname

In the Ubuntu Server Installer, we are precluded from placing a number as the first character in a hostname. However, once installed, we can issue a hostname command to rename the server to have a ...
5
votes
1answer
18k views

Got SERVFAIL reply from 8.8.8.8, trying next server [ubuntu 14.04 digitalocean ispconfig]

All started with a vps from digitalocean and the following documentation from ispconfig https://www.howtoforge.com/perfect-server-ubuntu-14.04-apache2-php-mysql-pureftpd-bind-dovecot-ispconfig-3 after ...
4
votes
3answers
46k views

Why can I ping via IP address but not hostname?

I have a media/file server running Ubuntu 10.10 Maverick Meerkat, connected via cable directly to a DSL router, which also acts as a network switch. The router uses DHCP to dynamically assign IP ...
4
votes
3answers
429 views

Change Machine Name [duplicate]

How to change machine name in Ubuntu; as in my case it is written as Lenov@G500, and I want to change both names i. Lenovo and G500. how it can be done through Terminal.
4
votes
2answers
1k views

How can I get a PXE install to ask for the hostname

I use a pxe install for a lab of machines, one problem I have is that the hostname is always set to 'ubuntu'. This is wrong, it should instead ask during the install what hostname should be used. One ...
4
votes
1answer
603 views

Changing hostnames in bulk

I just need to rename the hostnames of all the Desktops based on their IP Addresses. For example if the IP address is 172.29.72.25 hostname should be assigned as node25, if the IP address is 172.29.72....
4
votes
1answer
948 views

About the use of dotted hostname with avahi

I recently discovered avahi. It help you when you when to resolve hostname for the local network. But in my situation I've got a issue. I decided to host a machine called a.alpha and a another called ...
4
votes
0answers
4k views

How can I configure Ubuntu to report its hostname to windows? [duplicate]

Possible Duplicate: Access Ubuntu Server by host name How can I configure Ubuntu server to report its hostname in such a way that typing http://thehostname/ in a web browser will connect to ...
4
votes
1answer
962 views

Blank/empty hostname

I am using Ubuntu 12.10 and i was wondering if there is way to not send my hostname when connecting to a router? For example when I connect to my router I can see my laptop hostname when I log on the ...
3
votes
1answer
16k views

sm-msp-queue says: unable to qualify my own domain name (xxx) — using short name

Every 20 minutes, for days, sm-msp-queue (something related to sendmail, I guess) writes a message in my ubun that goes like that: unable to qualify my own domain name (ubun) -- using short name ...
3
votes
1answer
2k views

Get IP of remote windows machine from Hostname

I have a headless Windows 7 box I'm trying to access using VNC viewer from my Ubuntu Gnome Raring machine. Previously, when I was running Linux mint, I could do this no problem... but I can't ...
3
votes
2answers
247 views

Ip address changes whenever I modified my location

Why each time I change of location the ip address is modified. In fact, today, I was in three different places during day, and each time I've execute the hostname -I command the ip address was ...
3
votes
1answer
10k views

unable to edit /etc/hosts file in ubuntu 14.10

I changed the hostname from default name, set during installation to something short and nice, but didn't change it in /etc/hosts file. /etc/hostname is changed after restart but sudo is not working. ...
3
votes
2answers
491 views

If I rename my computer, will it lead to problems with Ubuntu One?

If I rename my computer by editing the /etc/hostname file as shown here, will I get some synchronization problems with Ubuntu One, which knows my machine as a different name ? Can I have any other ...
3
votes
3answers
2k views

Issue when sudo something after a hostname change [duplicate]

I was tired of my system's name so i decided to change it. I gksudo gedit /etc/hostname and changed my first and never touched computer name to a new one. Then now when i sudo something like sudo ...
3
votes
2answers
5k views

can not ping by host name for some computers

I have 11.04 installed. It is joined to a domain. I am able to ping some of my computers by their name, but some I can't. Those I can't are our NAS machines (Readynas Netgear). I can ping them only ...
3
votes
1answer
28k views

Is it possible to give two IP addresses for the same host name?

I want to give two ip addresses for same host name. Like in /etc/hosts file: xx.x.x.x example # if system is connected to dhcp y.y.yy.y example # if system is connected to VPN So is it ...