Questions tagged [hostname]

A hostname is the label given to a device connected to a computer network.

Filter by
Sorted by
Tagged with
1
vote
2answers
25 views

Hostname overrided after Reboot even after making entry in /etc/hostname

I have cloned a KVM vm from one host to other host, I tried to rename the hostname and it's been renamed. But after reboot still it goes to old name. hostnamectl command output Static hostname: ...
0
votes
1answer
26 views

/etc/hosts and aliases

I puchased a domain, say fireworks.com, and I would like to call my server ubuntu-18-04. How am I expected to edit /etc/hosts? Is it possible to add multiple aliases as follows? 127.0.0.1 ...
0
votes
1answer
63 views

hostnamectl shows error: “Failed to create bus connection: No such file or directory”

When I try to set hostname with an ansible module, I get TASK [set hostname] ************************************************************************************** fatal: [10.1.38.15]: FAILED! => {...
2
votes
1answer
93 views

why host from bind9-host is/was deprecated and when?

I was looking at bind9-host shirish@debian:"04 Jan 2020 15:48:02" ~$ aptitude show bind9-host=1:9.11.5.P4+dfsg-5.1+b1 Package: bind9-host Version: 1:9.11.5.P4+dfsg-5.1+b1 State:...
1
vote
1answer
155 views

How can I know the hostname of an Android phone for use in SSH connection? [closed]

When setting up public key authentication on SimpleSSHD server on my Android phone, by http://www.galexander.org/software/simplesshd/ Quick start Install SimpleSSHD. On any computer which ...
11
votes
2answers
723 views

How can you determine the hostname associated with an IP on the network?

How can you determine the hostname associated with an IP on the network? (without configuring a reverse DNS) This was something that I thought was impossible. However I've been using Fing on my ...
1
vote
0answers
85 views

Manjaro Update Error

I'm on Manjaro since 1 year now and since two months I'm in China, without stable network to do any update. Yesterday, I ran "pacman -Syu" the update face fine, no errors. But when I reboot, I noticed ...
1
vote
1answer
73 views

zsh ssh autocomplete Host instead of Hostname from ~/.ssh/hosts

Is there a way I can massage my ~/.zshrc to make the ssh auto-completion autocomplete for the Host, not the Hostname? I have an entry in my ~/.ssh/config that looks like this: Host staging-rfc ...
0
votes
0answers
14 views

nslookup ip query

I am member of the domain at work, and we have our local DNS resolver. Sometimes I'd like to know the hostname of a specific IP, so I run the IP through nslookup which uses our domain-controller/DNS ...
0
votes
1answer
61 views

`hostname` result is different from “/etc/hostname”! [duplicate]

If I open a terminal windows in my graphical user interface, hostname command result is different from content of /etc/hostname: me@ZyXEL1:~$ hostname ZyXEL1 me@ZyXEL1:~$ cat /etc/hostname N4010 me@...
0
votes
1answer
75 views

Gentoo: how to set hostname for local network?

I'm used to debian/raspbian, setting the hostname for a computer is easy as: /etc/hostname: my-computer and /etc/hosts: 127.0.0.1 localhost ::1 localhost ip6-localhost ip6-loopback ff02::1 ...
0
votes
0answers
41 views

Renaming a Debian host via script: Need my work checked

Just want to make sure I've covered all the bases (not counting domain names). As far as I can tell, everything is working. #!/bin/sh # Needs 1 and only 1 argument if [ "$#" -ne 1 ]; then echo "...
0
votes
1answer
39 views

Output remote hostname in sshpass session

I have created a shell script to connect to a list of servers using sshpass and run a list of about 30 commands. An extract of the script is below. The script will wget a new config file, but then I ...
0
votes
2answers
279 views

$(hostname) doesn't work in cronjob

I have a simple backup script with this line to come up with a name for the backup: backup=$(/bin/date +'%Y-%m-%d_%H:%M_%S')_$(hostname).gz It works great when I run it under the root user. ...
0
votes
0answers
37 views

root command are not executed in ssh remote script [duplicate]

i have 10 clients linux machines and i want to change the hostname and creat a linux user automatcly , i creat this script : #!/bin/bash ADDRESS=`cat /home/admin/Documents/host.txt` USERNAME=client ...
1
vote
1answer
36 views

Fedora 30's computer name changed during usage, but I can't change it back

I have recently installed Fedora 30 on a new laptop. When I had set it up, my hostname, as seen in the command prompt, was set to simply 'fedora'. At some point during the last month of usage the ...
1
vote
1answer
428 views

SSH is unable to resolve local domain names

I'm trying to connect to several computers via their hostnames since they get their IP via DHCP. I can successfully ping the machines via ping host-01.local. ping, wget, avahi-resolve and even ...
0
votes
1answer
27 views

How to make Wordpress independent of hostname

I set up a basic Wordpress installation (on a Raspberry Pi running Raspbian Stretch - Debian 9) using NGINX. Recently I changed the hostname of my system (as part of a plan to ensure consistent ...
0
votes
1answer
63 views

dnsdomainname and hostname -f does not return FQDN

I have one box (Rasberry Pi, running rasberian) with a static IP. It's running in a network with a domainname, and I have several DNS-server set up. However, I can not get FQDN name to work on this ...
0
votes
0answers
14 views

Sendmail Hostname error

We recently changed hostname on our Fedora server to xyz and Sendmail logs report like: July 08 00:06:36 xyz sendmail[20506]: That's fine. But we changed the hostname back to abc but the sendmail ...
1
vote
1answer
32 views

How scp between two Oracle Linux machines with localhost.localdomain hostnames

How to scp between two Oracle Linux 7.6 machines on virtualbox that have the hostnames localhost.localdomain scp -r test.txt oracle@localhost:/home/oracle/Desktop/ isn't working. When I changed the ...
0
votes
0answers
926 views

Temporary failure in name resolution

I upgraded both my computers from Mint 17.2 to 19. I no longer have hostname resolution. I cannot ssh or use ssh pass with a hostname as well as ping with hostname. So it would seem hostname ...
1
vote
1answer
636 views

Why does “hostname -i” return “Unknown host”?

We have created an AWS EC2 instance using AMI type Amazon Linux AMI 2018.03.0.20190514 x86_64 HVM. After we started up the instance, our software printed out an IP address error. When we tried ...
0
votes
0answers
19 views

What does journal hostname field refer to?

I have a question about hostname field that journalctl displays. From journalctl documentation I know that _hostname= is displaying the name of the originating host. So in that case this log: march ...
4
votes
1answer
591 views

Bash prompt takes only the first word of a hostname before the dot

I configured my machine as the following hostname ( in reshat 7.2 ) digi.master01.usa.com but my prompt is like this [root@digi ]# while we want [root@digi.master01 ]# any idea how to change ...
1
vote
2answers
672 views

NetworkManager interferes with hostname configuration

I'm running an arch system with KDE4/Plasma, wpa_supplicant, networkmanager, systemd ... # cat /proc/version Linux version 5.0.0-arch1-1-ARCH (builduser@heftig-18825) (gcc version 8.2.1 20181127 (...
0
votes
1answer
363 views

From server cannot ping server itself by its hostname while can ping by its IP

I host an ubuntu server at a data center and worked well for years till last night the server can not ping itself by host name. No config has been changed. Here are what it can/can not do now. From ...
3
votes
0answers
318 views

name resolves doesn't work in chroot for users, but does for root

I've booted a live-cd in order to download, compile and install a few packages on a otherwise working system without actually booting said system. I've created a build user on the system by issuing ...
0
votes
2answers
740 views

How can I find out the hostnames of other computers in the same local network?

In my local wifi, I can find out the IP and MAC of another computer which also runs Lubuntu, and whose hostname is known to me. $ sudo arp-scan olive [sudo] password for t: Interface: ...
0
votes
2answers
925 views

Why does Python 'gethostname()' return the entire FQDN when run on a FreeNAS server console?

I get this (FreeNAS 11.2-RELEASE-U1): Python 3.6.5 (default, Dec 20 2018, 21:27:40) [GCC 4.2.1 Compatible FreeBSD Clang 6.0.0 (tags/RELEASE_600/final 326565)] on freebsd11 Type "help", "copyright", ...
0
votes
2answers
898 views

How to access a device connected in local network with hostname?

I tried accessing a webpage in a server within the local network with the host name of the device followed by its folder path and the name of the file(it is a basic php file). In first system it ...
15
votes
3answers
3k views

Does a computer system (Linux) only have one host name?

hostname is used to display the system's DNS name, and to display or set its hostname or NIS domain name. Does a computer system (Linux) only have one host name? In virtual hosting, several host ...
0
votes
1answer
532 views

Generating default DKIM keys: Cannot determine host's domain name, so skipping default key generation

I'm following this guide https://www.linuxtechi.com/configure-domainkeys-with-postfix-on-centos-7/ When I get to this section, it gives an error # opendkim-default-keygen Generating default DKIM ...
1
vote
1answer
267 views

Linux/Windows client resolve Linux hostname on LAN

According to Debian's RPi3 image wiki, I should be able to ssh into a Raspberry-Pi, with just the hostname. I shared internet from my Debian laptop, WiFi to the a Raspberry-Pi over Ethernet, but the ...
1
vote
1answer
1k views

Understanding why hostname -i returns strange IP address

I am referencing the following question because it's similar but not the same: hostname -i returns strange result in linux On my CentOS 7 system, I get a strange IP address from "hostname -i" after ...
0
votes
1answer
72 views

What is this random name in my command-line prompt? [duplicate]

I'm trying to figure out what this (obretschlt2-w7) is, from my command-line prompt. I'm using a conda environment, with the name µ_env, with my Username mu. However I can't figure out where the 2nd ...
8
votes
1answer
877 views

How to deal with underscores in hostnames?

I got DNS set up on my company's server and it works just fine, except I got problem with some phones. For example one of the phones is “Huawei P9 lite”, and it's hostname (set on the phone, no chance ...
2
votes
0answers
899 views

dnsmasq is not resolving local hostnames

I have a local Linux server running dnsmasq for my LAN. It has been working without issues for the last several years. I keep the operating system and packages regularly updated. After yesterday's ...
5
votes
1answer
6k views

How do I fix my problem with hostnamectl command. It cannot connect to dbus

I am running Debian 9.4. hostname works. $ sudo strace -f hostnamectl ...snipped... connect(3, {sa_family=AF_UNIX, sun_path="/var/run/dbus/system_bus_socket"}, 33) = -1 ENOENT (No such file or ...
0
votes
0answers
309 views

ssh to another user of the same host using dns domain

Is it a problem to ssh to another user of the same host using dns domain? I cannot conigure it. I cannot configure it to passwordless connection. Also when I am trying to connect with password the ...
2
votes
2answers
962 views

uptime Script help [closed]

I am looking to build a script that will log in to multiple servers using a host file and run uptime, hostname -I and hostname Script so far echo"" ; echo "hostname:" $(ssh $HOST hostname) ; echo "...
1
vote
3answers
596 views

macOS Sierra (10.12.6) hostname command not appending “.local”

To be brief: From what I understand the hostname command has an option -f. From the man page: -f Include domain information in the printed name. This is the default behavior. As it's the ...
1
vote
1answer
42 views

SSH connects but stays on the same machine [closed]

I've got an unusual problem at hand that I couldn't solve for 2 days. I've got two KVM running on my real machine. One of them is named headnode and the second is named computenode. These machines ...
17
votes
2answers
9k views

What's the point of the hostnamectl command?

As opposed to editing /etc/hostname, or wherever is relevant? There must be a good reason (I hope) - in general I much prefer the "old" way, where everything was a text file. I'm not trying to be ...
3
votes
1answer
96 views

How to change `ping from` value when pinging Linux server?

Content of hostname file in my server is: # cat /etc/hostname sub.mysite.com But when I ping my CentOS 7 server it says: # ping sub.mysite.com 64 bytes from sub ... Even: # ping ns1.mysite.com ...
1
vote
1answer
27 views

How to attach domain to RHEL7 using the shell?

I would like to know what files must I edit in order to add a domain on a RHEL7 machine? Example: Hostname: Server1 Domain Name: qwer.tyu.iop Result: Server1.qwer.tyu.iop
0
votes
1answer
500 views

CentOS Application Installer Updates failed “Cannot resolve hostname”

I attempted to run updates from the Application Installer and ran into the following error. failed to download https://extensions.ognome.org//extension-query/?shell_version=3.22.3&page=1&...
2
votes
1answer
536 views

BIND as a DNS server host command is refused

I am attempting to run my host machine as a DNS server, it will also function as the gateway. My /etc/named.conf is as follows: options { directory "/var/named/"; allow-query {127.0.0.1;...
1
vote
1answer
33 views

Is there a canonical method a host can use to self-rename?

Naming hosts and keeping track of them is a lot of work on a home network or on a test cluster of VMs. Is there a canonical way to make a host self-rename from whatever name it was initially set with ...
0
votes
1answer
375 views

Suppress “Name or service not known” on ping

I have several Raspberry Pi's named numerically (pi0, pi1, etc). They have static IP addresses, but I wanted a simple tool to check on them and make sure they were online even if they got the wrong IP ...