Questions tagged [hostname]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
21 views

Ubuntu Server: After Trying to Set Email Server Using Postfix, Ping 8.8.8.8 Only Gives Destination Host Unreachable

This morning the connection and all the things were working fine, until I following some online tutorial, installed Postfix and changed /etc/hostname and /etc/hosts. Now ping to the local router: 198....
0
votes
0answers
25 views

How do I keep my static hostname from changing?

I'm plagued with an issue. On occasion my transient hostname changes from localhost to the name of my mom's laptop, an entirely different machine. It started doing this a few days ago and I'm not sure ...
2
votes
1answer
44 views

How can I use unique hostnames across VMs with a shared root filesystem? Is this method even recommended?

Background I am creating several VirtualBox instances to use as Web development environments (Arch host/Debian guests), and I want them to share most files but have an additional drive for each ...
0
votes
0answers
30 views

How to resolve local hostnames before querying DNS with knot-resolver and dhcpcd?

What I want to do: resolve internet hostnames with a local resolver (knot-resolver). Ex: kdig unix.stackexchange.com +short should give 151.101.193.69 resolve hostnames on my local network, ex: kdig ...
4
votes
1answer
181 views

hostnamectl command causes Failed to create bus connection: No such file or directory

I'm following this guide and I'm running into issues. https://www.tecmint.com/initial-ubuntu-server-setup-guide/ I am trying to create a linux machine in Ubuntu in wsl2 and then rename it using ...
0
votes
0answers
28 views

Slow hostname resolution for SSH(git)

Strangest thing. After upgrading to Fedora 33, the git fetch, push and pull commands are SLOW. I've been able to get a bit of trace and debug info using the following command: GIT_SSH_COMMAND="...
0
votes
1answer
56 views

How to use static hostname instead of transient hostname?

Recently I have installed Fedora 33-workstation on my machine. The first thing I was noticed was about hostname in the terminal. It is shown as myname@dhcppc2. I was wondering why dhcppc2? After ...
0
votes
2answers
55 views

Why won't --uts=private allow me to set the hostname?

If I launch a container --uts=private, I still can't change the hostname. But it sounds like this is exactly what this is supposed to be for? What does --uts=private do? $ podman run -ti --uts=private ...
3
votes
1answer
103 views

How does --hostname work with `buildah run`?

Give the example here which has an attempt at setting the hostname to foo.bar.baz for the duration of the build, #!/bin/bash ctr=$(buildah from alpine:3) buildah run --hostname 'foo.bar.baz' $ctr /bin/...
0
votes
0answers
323 views

hostnamectl fails with “Connection timed out” when running inside a systemd-nspawn container

I’m using systemd-nspawn and qemu-arm-static to boot into a Raspberry Pi OS image to apply customizations to the stock image before flashing it onto an SD card. The host machine is Ubuntu 20.10 (...
0
votes
0answers
20 views

“hostname -i” returns IP address of different network interface devices in various Linux hosts

In some Linux box it returns IP of the interface eth0 and in some it returns IP assigned to eth1 device, and in some it returns all the IPs assigned to all the network interfaces available in that ...
7
votes
3answers
1k views

In a remote shell, how can I find out from which computer I logged into the remote machine? [duplicate]

In a remote shell, how can I find the domain name of the computer from which I logged into the remote machine? Example: My local machine is mi.pona.com. On this machine I run ssh toki@sina.pona.com ...
14
votes
3answers
2k views

What's the default file for `hostname`?

Heyo! I'm currently working on a non-lfs system from scratch with busybox as the star. Now, my login says: (none) login: Hence, my hostname is broken. hostname brings me (none) too. The guide I was ...
0
votes
1answer
22 views

How do I assign a hostname to a dynamic IP address assigned by DHCP?

On my home network, the IPv4 address changes regularly, probably because when my computer got turned off, another computer was assigned to the same address so when I started my computer, there was an ...
0
votes
0answers
13 views

How to intercept hostname changes in order to update IP based on DHCP IP plan

We're using Rancher for the provisioning of Kubernetes clusters using a VMWare vCenter integration whereas Rancher interacts with the vCenter API in order to provision the Kubernetes nodes. The ...
1
vote
2answers
126 views

Difference between bash $HOSTNAME and tcsh/zsh $HOST

Is there any difference between bash's $HOSTNAME and zsh's $HOST? If no, is there a historical reason for bash to chose the $HOSTNAME variable when tcsh and zsh use $HOST?
1
vote
1answer
67 views

How to update the hostname automatically?

When out system starts up, the default hostname is 'system', the login prompt is like this: sytem login: And now there is an application running and will set the hostname as system_<mac address>...
1
vote
0answers
31 views

Create VM from template , Hostname issue

I created a VM from RHEL ISO Fle, and followed some steps to cleanup nic details and also inserted a systemd script to create machine id. Converted VM to template, However when i spin a new VM with ...
0
votes
0answers
31 views

FQDN not persisting on server reboot

I am trying to set up the hostname for my new Ubuntu 18.04 server using the following command: hostnamectl set-hostname foo.example.com And adding the following line to /etc/hosts 12.34.56.78 foo....
0
votes
1answer
63 views

Accessing a Linux system inside a network: is it via hostname or netbios name?

Assuming a Linux system has both hostname (/etc/hostname) and NetBIOS (/etc/samba/smb.config) enabled. My questions are: Are these 2 names synchronized somehow by default settings? (for example, ...
0
votes
1answer
147 views

Special characters don't work in bashrc

I've been looking to a tutorial on how to customize my terminal. When I try to customize the PS1 into something like PS1="\u@\h \W -> " export PS1; After I source the file in the terminal, ...
1
vote
1answer
65 views

Fedora changed hostname

I am running Fedora 31 and Windows 10 on my Lenovo laptop. Everything has been running smoothly between the two systems for over half a year now, but turning on my machine today I was shocked to find ...
0
votes
1answer
237 views

hostname -d returns nothing

I've RHEL 7.5 machine and when I hit hostname -d to get domain it returns nothing. Also hostname -f, to return long host name returns name without domain. Please help me to understand what changes I ...
1
vote
1answer
124 views

Why adding hostnames to /etc/hosts entries change the website viewed

Ippsec does a lot of hackthebox boxes walkthroughs and in many of them he edits the /etc/hosts file. Sometimes he adds multiple hostnames to the same ip address and when he browses those hostnames he ...
0
votes
0answers
40 views

How to access an Angular App created on CentOs7 in a Windows 10 VM?

I created an angular app in CentOs7 and was able to open it in a web browser in my CentOs7 VM using http://localhost:4200/. I need to be able to access it my Windows 10 VM, but when I tried changing ...
0
votes
0answers
72 views

Updating of GNU screen's hardstatus hostname

According to the Gnu screen user's manual, one can set the "hostname of the system" with hardstatus string "%H". Changing via ssh into another system while in a screen session, the hostname is not ...
0
votes
0answers
57 views

How to best make systemd service wait for the hostname to be set to something other than localhost?

I have a daemon process named my_daemon that will behave oddly if it starts before the system's hostname has been changed from "localhost" (or any variant therefore) to the machine's intended ...
1
vote
1answer
202 views

hostname --fqdn on Azure Ubuntu server has unique domain name ending in .internal.cloudapp.net. How to change to my own domain?

I have added my first Azure server for production use on my domain. Azure assigned a domain name in their DNS, I created a CNAME entry in my domain to forward there. Works great. When I enter the ...
0
votes
1answer
25 views

Intermittent issue connecting to application server via Hostname

I use putty to connect to my application servers, but many times I face issue in connecting to the server via hostname. The error message says, 'Unable to open connection to my_hostname Host does not ...
0
votes
1answer
43 views

Is it possible to hook into hostnamectl?

Let's say I want to run a script when the hostname is change on a machine with hostnamectl set-hostname NAME Is there a way to hook into this? How would I go about doing it?
1
vote
2answers
140 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
514 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 ...
1
vote
1answer
3k 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! => {...
3
votes
1answer
537 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
467 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 ...
12
votes
2answers
1k 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
91 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
466 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
1answer
512 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
437 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
42 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
282 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 ...
1
vote
2answers
1k 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. ...
1
vote
1answer
190 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 ...
2
votes
1answer
1k 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
33 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
456 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
20 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
77 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 ...
1
vote
1answer
2k 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 ...

1
2 3 4 5
7