Questions tagged [hostname]

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

Filter by
Sorted by
Tagged with
-1 votes
1 answer
56 views

Why Ubuntu sets system's hostname for my public IP?

In various network utilities, Ubuntu 18.04 displays my public IP address with the system hostname. Let's imagine that 12.34.56.78 is my public IP and 9.8.7.6 is some client's IP. For example, if I ...
Semyon Bayandin's user avatar
0 votes
0 answers
124 views

Ubuntu 22.04 docker failure in name resolution after moving homes

after moving homes i can't connect to the internet (local and outside) my ubuntu server with docker and home assistant installed. I didn't change anything inside the server, just was offline for like ...
Tauthe's user avatar
  • 1
0 votes
0 answers
59 views

"Permission denied" when run "ssh-copy-id node2"

I'm using ubuntu 20.04, in the file etc/hostnames, I wrote "192.168.1.1 node2" (node 2 is hostname of another node), then I want to ssh to node2. After I run ssh-keygen, I run ssh-copy-id ...
Quý Phạm Đình's user avatar
0 votes
0 answers
32 views

What is the purpose of the line 127.0.1.1 <HOSTNAME> in the file /etc/hosts in Ubuntu? [duplicate]

This question is linked to this other question which explains that to change the hostname of a system with lubuntu 22.04 installed I have to modify 2 files: /etc/hostname (by the command nmcli) /etc/...
User051209's user avatar
0 votes
1 answer
164 views

When change the hostname the content of the file /etc/hosts must be updated manually?

I work with lubuntu 22.04. To set the hostname I would like to use the nmcli command as following: nmcli general hostname "new-hostname" The previous command set the new hostname in the ...
User051209's user avatar
4 votes
2 answers
1k 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
1 vote
0 answers
85 views

Ubuntu clients can't resolve LAN hosts stored in local unbound server

I have setup an unbound server to use short names to refer to various servers by the hostname only. Example: I can call http://myserver:8080/ And it works as expected from Android, and Windows clients,...
user352472's user avatar
0 votes
0 answers
85 views

Help with error: Failed to restart hostname.service: Unit hostname.service not found

Followed a tutorial for setting my hosts and hostname file. When I go to service hostname restart I get error: Failed to restart hostname.service: Unit hostname.service not found. My hosts file is set ...
ubudoge's user avatar
  • 21
-1 votes
1 answer
113 views

nslookup NXDOMAIN error in local network

Whenever I nslookup an address inside local network I get NXDOMAIN error. It works on my other computer. Any ideas?
printf burner's user avatar
0 votes
0 answers
56 views

Unable to resolve hostname of Ubuntu 20.04 server after adding second ip address on a second adapter - no local DNS server

I recently needed to add a second IP address to a server using a previously unused Ethernet adapter. When I did this, suddenly no workstations could resolve the hostname of that server. When I undid ...
Zac Mussatt's user avatar
1 vote
0 answers
74 views

How can I pass the FQDN hostname to systemd?

I have an Ubuntu 20.04 system in AWS. The %H flag in systemd is replaced with the hostname as expected, but I need a way to capture the output of hostname --fqdn. %H outputs ip-10-0-0-188 on my ...
Josh Correia's user avatar
0 votes
1 answer
189 views

Who creates /etc/hostname

In a 20.04, after some upgrade /etc/hostname contains 'localhost' event hostnamectl working well and with hostname correctly set. It's only appreciated that /var/log/syslog shows 'localhost' instead ...
JMari's user avatar
  • 1
0 votes
1 answer
275 views

mdns hostname not fixed

I have a host that I named "betelgeuze". As such it is listed in /etc/hostname. Avahi is mangling this: boss@betelgeuze:/etc$ ps -ef |grep avahi avahi 639 1 0 13:03 ? 00:...
Unbeliever's user avatar
0 votes
1 answer
231 views

Ubuntu Studio 22.04.1 LTS Terminal commands not changing hostname

When I set up my new install I typed in my username and didn't change the suggested hostname so it's currently 'user-hostname' so when I type in Terminal it shows as "user@user-hostname" and ...
TriumphantToil's user avatar
1 vote
0 answers
85 views

How to send an ehlo test e-mail from calibre?

An excerpt from a failed test e-mail in calibre Starting job: Email book to [email protected] connect: to ('smtp.ionos.com', 587) None reply: b'220 perfora.net (mreueus004) Nemesis ESMTP ...
Nicholas Saunders's user avatar
0 votes
0 answers
575 views

How to fix failing name resolution

I have a quite new Kubuntu installation and I messed its name resolution up somehow. root @ asus-f751s ~ # host www.ecosia.org ...
Thiemo Kellner's user avatar
0 votes
0 answers
603 views

Cannot resolve LAN hostname when connected using Wireguard

My LAN has a Wireguard server than my laptop connects to from a remote location. | | | | ...
gameveloster's user avatar
0 votes
0 answers
127 views

Hostname (.local) not resolve on SmartPhone but only on PCs connected by cable

in my house I own 3 PCs and 2 smartphones PC-1 "connected via wifi" = Notebook with Ubuntu Server (my server personal), hostname "servernote.local" / ip 192.168.0.104 PC-2 "...
Fernando Gomes's user avatar
0 votes
2 answers
3k views

Ubuntu 22.04: 'Temporary failure in name resolution' for local network

I am setting up a VM with Ubuntu 22.04. I´m having problems with resolving hostnames of my local network. I can ping other Servers by IP, but not by hostname: 'Temporary failure in name resolution'. ...
JNTBSNS's user avatar
0 votes
0 answers
486 views

Cannot ping Ubuntu server by host name

I just installed Ubuntu Server 22.04 LTS onto my NUC. The installation went well, but from my MacBook Air, I cannot ping the server by name (hostname is "nuc"): ping -c3 nuc ping -c3 nuc....
Hai Vu's user avatar
  • 491
0 votes
1 answer
612 views

Several IP Addresses fetched with hostname -I

Kubuntu 20.04 LTS is returning 2 IP addresses after hostname -I. The second one is probably from docker0 network interface, so no big worries about that. Problem is that first IP address which have ...
vulkanovski's user avatar
2 votes
1 answer
3k views

Unable to set FQDN in Ubuntu 22.04

The instructions I have found say to edit the /etc/hostname file and add the hostname, without the domain portion. To set the domain portion, I should edit /etc/hosts and add an entry that looks ...
bp811's user avatar
  • 21
0 votes
0 answers
841 views

Ubuntu 22.04 cannot resolve local hosts

Environment: Virtual Machines running CentOS 7, Ubuntu 20.04 LTS, Ubuntu 18.04 LTS, Ubuntu 22.04 LTS in VirtualBox instances on Windows 10 Pro PC. Laptop running Windows 7 Pro. PC running Ubuntu 20.04 ...
DaveB's user avatar
  • 1
1 vote
0 answers
316 views

How to Set mac address as host name and hosts 127.0.1.1

I'm using Ubuntu for my OS and I'm struggling to set my host name and hosts to a mac address automatically any help on this would be great. NAME=$GATEWAY_MAC| sed s/://g hostnamectl set-hostname $NAME ...
Kasey champion's user avatar
1 vote
1 answer
832 views

Ubuntu 22.04 hostname not detected from DNS

I have been having an issue with Ubuntu 22.04 not detecting the hostname from the DNS server. I have tried using both the networkd and NetworkManager backends and the server's hostname still appears ...
Holly Sherlock's user avatar
0 votes
1 answer
128 views

How to set up servername.local in Ubuntu server

I'm trying to set up an Ubuntu server with a fixed IP address. I've set up a reserved ID in my firewall and that works - the server uses DHCP to retrieve the 192.168.1.200 IP address fine. However, ...
Keith Whittingham's user avatar
1 vote
1 answer
26 views

Got 2 Ethernets one on WAN the other LAN. but LAN Could not resolve hostname

I keep getting Could not resolve hostname but I can put in the IP and it works. I could not open the port to WWW on my LAN so just using a router and it gets on like that. Then another router for my ...
Raymond Day's user avatar
0 votes
0 answers
1k views

Command "host 127.0.0.1" does not return localhost on Ubuntu 20.04

Command "host 127.0.0.1" does not return localhost on Ubuntu 20.04. Is it possible to have it return localhost like it does in Ubuntu 18.04? We've got some tests that require this to work ...
bkelley's user avatar
-3 votes
1 answer
208 views

bash: change the hostname displayed without running the `exec bash` command

I have: lohacker@john:~$ I have a function: test1 () { sudo hostname philip echo something } If I try: lohacker@john:~$ test1 something lohacker@john:~$ hostname philip lohacker@john:~$ As ...
Mario Palumbo's user avatar
6 votes
1 answer
3k 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
1 vote
0 answers
1k views

Ping to avahi device does not work all the time

I just added a NAS to my home network and gave it the hostname mynas. I tried to access the NAS from Kubuntu 20.04 (especially via Samba). It works fine when using plain hostname, but it fails when ...
Silicomancer's user avatar
0 votes
1 answer
137 views

Host name access not working

Ubuntu Server 20.04.3 LTS Linux 5.4.0-88-generic Hostname : plexserv All was working fine, Plex and Samba set up, could access files on the server from Windows and MacOS machine no problem. Then I ran ...
exharris's user avatar
  • 143
2 votes
1 answer
16k views

hostname: No address associated with hostname

Good day! I am using 20.04.3 Ubuntu server on my Raspberry Pi 4, I am using my Rp4 as Pi-hole w/ unbound as well as a docker, everything went fine except for 1 which is the the title of my post I did ...
Ryan Laurenciana's user avatar
0 votes
1 answer
1k views

can not change hostname

I want to change the hostname of a Ubuntu 18.04 server. I did: hostnamectl --set-hostname newname --static changed /etc/hostname file to newname changed /etc/hosts file to newname rm -f /etc/machine-...
Thomas Aichinger's user avatar
1 vote
1 answer
2k views

nmap is not showing hostnames

I am new to linux, and I am trying to get all the hostnames from the hosts of my local network. I was trying the command: sudo nmap -sn 192.168.0.0/24 and also: sudo nmap -sn -R 192.168.0.0/24 but ...
Alb's user avatar
  • 11
0 votes
3 answers
3k views

How to find the username who performed SSH?

When one does ssh oracle@hostB on a local host say A, will the hostB know the user who performed SSH on host A? Is there a way to find out the username who performed SSH?
damn harshitha's user avatar
-1 votes
1 answer
1k views

hosts: files mdns4_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] dns myhostname

Aloha, i'm on Ubuntu 18.04 and i recently executed a deadly git clean command that was meant to clean the Hard Drive Cache and that whipped out nearly every thing on my hard disc. Now i can't license ...
Blad Abir's user avatar
3 votes
0 answers
866 views

cloud-image passes default hostname to dhcp server despite cloud-init script

How do I get the Ubuntu 20.04 Cloud Image to send an individual hostname along with its initial dhcp request? I am deploying Ubuntu 20.04 Cloud Images on vSphere using Nutanix Calm and a cloud-init ...
ColinHam's user avatar
0 votes
1 answer
344 views

Add an alias for LAN/WLAN IP

Right now Apache server is listening on port 80. I want people on the same network to access the site as random.xyz but without making that my actual hostname (which is ubuntu right now). The manual ...
user avatar
0 votes
1 answer
1k views

How do I change the hostname in a cutomized live-cd Ubuntu 20.04

I have customized a 20.04 live-cd using Cubic. I need help with changing the hostname to obo. No matter what method I've tried it always defaults back to 'Ubuntu'. Using Cubic's CHROOT terminal, I'...
silverspr's user avatar
1 vote
2 answers
2k views

ssh-ing in to ubuntu comp by hostname suddenly stopped working (`Could not resolve hostname [ubuntu_comp_hostname]: Name or service not known`)

(see EDIT added to end, bout avahi stuff) It just does this: > ssh -v [ubuntu_comp_hostname].local => OpenSSH_8.2p1, LibreSSL 3.0.2 debug1: Reading configuration data /home/o1/.ssh/...
Owen_AR's user avatar
  • 361
0 votes
1 answer
200 views

File system check at boot time fails

My Ubuntu 20.10 installation was showing a blank screen after booting, so I started it in recovery mode and tried sudo fsck -f /. The error it gave was: sudo: unable to resolve host dk: Temporary ...
DurlavK's user avatar
0 votes
0 answers
155 views

Multiple host names on vServer

I'm using two nginx files - one for the vue frontend and one for the nginx backend (proxy_pass). The current spcecified host name in /etc/hosts which I'm using in the nginx vue config. Like: ...
Ora nge's user avatar
  • 121
1 vote
0 answers
133 views

Why does default-string appear after hostname in etc/hosts?

Referencing: This question The author is asking how to change hostname when it includes the appendage ´default-string´, If root is required to change the file in the path etc/hosts should this be ...
XJMZX's user avatar
  • 69
0 votes
1 answer
315 views

I changed the hostname on Ubuntu 20.04 and now I am locked out

I changed hostname and it locked me out from VNC, putty or RDP.(timeout) Yet the server is running and can be accessed with IP address. Hostname cannot be resolved and cannot go back to change it ...
gatorfrank's user avatar
1 vote
2 answers
7k views

SSH hostname command on remote server shows hostname of local server

I run this SSH command from server1 on server2 : ssh server2 echo pasword | su - root -c "echo this is the `hostname`" I expected the result to be host name of server2 but instead I get ...
AlexP's user avatar
  • 93
0 votes
1 answer
789 views

Recognising Ubuntu VM hostnames on my local network

I suspect this issue may have been answered somewhere already, so please feel free to patiently direct me there (also as I'm new to this community). However I have done A LOT of searching to resolve ...
Grant Kerr's user avatar
0 votes
2 answers
2k views

Static hostname not changing Ubuntu 20.04

I upgraded to 20.04 from 18.04. My hostname had an underscore (My_PC). Now, in my terminal, it says sudo: unable to resolve host MyPC: Name or service not known. I tried: hostnamectl set-hostname ...
DevOpsSauce's user avatar
1 vote
0 answers
989 views

Blocking hostname and subdomains in hosts file

I have recently started using /etc/hosts to block distracting websites. For specific domains that works nicely, but is there any way to match a domain and all of its subdomains? So, this blocks ...
xeruf's user avatar
  • 382
3 votes
1 answer
316 views

Why doesn't hosts file get changed after the change of hostname?

So today while installing Ubuntu 20.04 on my laptop I accidentally gave it the hostname of my desktop and then changed it. A few hours later I was losing my sanity because SSHing into my desktop PC by ...
cotneit's user avatar
  • 131

1
2 3 4 5 6