Skip to main content

Questions tagged [hostname]

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

Filter by
Sorted by
Tagged with
553 votes
14 answers
1.1m 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?
Deepak Rajput's user avatar
388 votes
14 answers
822k views

How do I change the computer name?

When I connect to my server (ubuntu server 10.10), I get this: [email protected] ~> How can I remove ".belkin"?
Wolfy's user avatar
  • 7,950
69 votes
7 answers
381k 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.
Islam Hassan's user avatar
  • 1,162
44 votes
2 answers
107k 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 ...
naftalimich's user avatar
  • 1,155
37 votes
2 answers
40k 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 ...
Marc's user avatar
  • 525
35 votes
1 answer
93k 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 ...
n179911's user avatar
  • 641
29 votes
2 answers
86k 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?
dada dudu's user avatar
  • 391
26 votes
3 answers
73k 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 ...
Hussain Nagri's user avatar
23 votes
5 answers
43k 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 ...
Ross's user avatar
  • 1,832
22 votes
1 answer
3k 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?
Jorge Castro's user avatar
  • 72.2k
20 votes
3 answers
40k 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 ...
user avatar
19 votes
10 answers
143k 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 ...
Oguz Bilgic's user avatar
18 votes
4 answers
117k 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 ...
thanmai's user avatar
  • 357
18 votes
3 answers
75k 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 ...
teracow's user avatar
  • 283
17 votes
0 answers
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?
Olivier Lalonde's user avatar
15 votes
4 answers
18k 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.
Olivier Lalonde's user avatar
15 votes
1 answer
53k 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 : ...
Rémi B.'s user avatar
  • 954
14 votes
7 answers
23k 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-...
Tim Lassie Freeborn's user avatar
13 votes
2 answers
129k views

How to change the display name on the Terminal? [closed]

When I open the terminal, the username and host name are displayed to the left of the typing area like this: administrator@administrator:~$ What specific steps do I take to set custom values?
Benjamin's user avatar
  • 177
13 votes
1 answer
30k 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 I ...
user avatar
12 votes
1 answer
14k 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 ...
vartec's user avatar
  • 6,995
11 votes
3 answers
14k 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 ...
seok hyun Ko's user avatar
11 votes
5 answers
10k 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 ...
benzen's user avatar
  • 345
11 votes
1 answer
8k 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 ...
Oatlad's user avatar
  • 111
9 votes
2 answers
2k 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 ...
Ben's user avatar
  • 93
8 votes
1 answer
689 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?
Im A Geek's user avatar
  • 183
8 votes
1 answer
15k 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?
Steve Bennett's user avatar
7 votes
2 answers
60k views

How to change my device name? [duplicate]

I want to change my device name but I have not found any option in the settings to do it. I am using Ubuntu for first time. Is there any way to change the device name that appears when I lock the ...
Randeep Sarkar's user avatar
7 votes
2 answers
46k views

How to get Ubuntu Host to Register Hostname With DNS Server

I'm in an Active Directory domain. I have a windows computer (not joined to the domain). When I connect it to the network, I can ping it by hostname from any other computer on the network. How can I ...
SW_user2953243's user avatar
7 votes
3 answers
5k 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 ...
rumtscho's user avatar
  • 1,051
6 votes
2 answers
7k 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 ...
hello_there_andy's user avatar
6 votes
4 answers
62k 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 ...
invert's user avatar
  • 731
6 votes
1 answer
41k 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 ...
Threshold's user avatar
6 votes
1 answer
4k views

ssh known_hosts file not using hostnames anymore

I'm running into this weird issue when I ssh into a new machine but my known_hosts file gets updated with a hash of sorts but not the hostname. This ends up with me not being able to autocomplete when ...
Koen van der Rijt's user avatar
6 votes
2 answers
43k 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 ...
Abdul Shajin's user avatar
  • 1,825
6 votes
1 answer
347 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 ...
James Riley's user avatar
6 votes
2 answers
8k 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 ...
Jim Connors's user avatar
6 votes
1 answer
27k 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 ...
Bogdan Crișu's user avatar
5 votes
2 answers
12k 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 ...
pylover's user avatar
  • 2,315
5 votes
1 answer
24k views

How should I add a host name to /etc/hosts?

There are several answers on how to change hostname of Ubuntu, and all of them propose to do "the same changes" to /etc/hosts. "The same" stands for "the same as in /etc/hostanme". But unfotunately, ...
Dims's user avatar
  • 1,823
5 votes
2 answers
27k 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 name sudo /etc/init.d/hostname.sh start This is what I ...
rgamber's user avatar
  • 206
5 votes
1 answer
5k views

Why can't I use the same host name for two dual-boot OS on the same machine?

I run Win 10 (installed first) and Ubuntu 16.04 (installed second) on the same notebook. During the Ubuntu installation, I was asked to enter a host name for the computer. I tried to enter the same ...
Byte Commander's user avatar
  • 108k
5 votes
1 answer
4k 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 ...
begtognen's user avatar
  • 1,680
5 votes
0 answers
10k views

avahi daemon constantly needs restarting

I have Ubuntu 11 running on a Thinkpad W520. Things work great, but not avahi-daemon. It seems that my laptop becomes invisible (ssh [email protected] can't find the laptop) to other computers on ...
dan's user avatar
  • 3,083
4 votes
1 answer
20k 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 ...
Bach's user avatar
  • 751
4 votes
3 answers
1k 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.
Aevi's user avatar
  • 105
4 votes
2 answers
4k views

How to change my user or computer name which appeares before each command in the terminal window? [duplicate]

Is there any way to change the name which appears before every command line in the terminal window? If so, then how? As shown below, my current one is way too long and takes up a lot of space in each ...
liam's user avatar
  • 43
4 votes
2 answers
2k 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 ...
Martin Owens -doctormo-'s user avatar
4 votes
1 answer
744 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....
karthick87's user avatar
  • 82.4k
4 votes
2 answers
258 views

Why does host name have 'child' in it

When I installed Ubuntu 18.04 into this computer I picked a username = 'test' and computer name = 'abc'. However it set my hostname to be abc-child. So on my terminal I see test@abc-child:~$ Why did ...
AmourK's user avatar
  • 251

1
2 3 4 5 6