Questions tagged [hostname]
A hostname is the label given to a device connected to a computer network.
348
questions
0
votes
1
answer
53
views
Instead of a single hostname specified on the command line, it reads in a list of multiple target IP addresses from a file
I want to make it so that instead of a single hostname specified on the command line, it reads in a list of multiple target IP addresses from a file.
#!/bin/bash -
# bannergrab.sh
function isportopen (...
0
votes
0
answers
10
views
How to reflect the name of Beaglebone in the router panel?
For my BBB, my router displays the following:
But I'd like it displays the hostname of my BBB. How to do that?
So far, I have modified the hostname with $ sudo hostnamectl set-hostname myname
And ...
0
votes
0
answers
44
views
how to verify the domain name of remote machine without using ssh
is it possible to verify the domain name of linux remote machine without using ssh?
for example with ssh is like this
ssh remote_machine hosname -d
but in case we cant use ssh , then what are the ...
0
votes
0
answers
14
views
hostname -I prints the same ip address after switching to a different wifi network
On my ChromeOs terminal, when I type hostname -I, when connected to a Jio Fiber wifi network it prints
100.115.92.199 2405:201:d021:408f:216:3eff:fe4b:6f1b
and when I'm connected to a Airtel Wifi ...
-1
votes
1
answer
52
views
DNS Hostname resolv problem
My linux server that i set up earlier won't resolv by hostname :
i can't access on ssh or on website (port 80,8834) via the hostname but only via IP
my /etc/hosts file is well configured i think :
127....
-1
votes
1
answer
86
views
Empty hostname (sethostname)
For some unrelated reason I want to set the hostname of a Linux machine to an empty string using the sethostname system call.
#include <unistd.h>
int main()
{
sethostname("", 0);
...
0
votes
1
answer
83
views
hostname and /etc/hosts
On a server I have had issues with sudo saying
sudo: unable to resolve host
Now I don't know if this is related but someone else has modified
/etc/hostname
but not
/etc/hosts
so that the new ...
3
votes
0
answers
74
views
Set arbitrary or random computer name when connecting to public wifi
I am not sure about the correct terminology of what I want to achieve. Here is a hand-waving description:
When connecting to a (usually) public WIFI spot, I want that spot to not know my computer name ...
0
votes
0
answers
159
views
Debian net install to preseed hostname and domain name
Basically the opposite of Debian preseed: How to force prompt for hostname and domain?
With the new Debian bullseye release, the net install is asking me for hostname and domain name. How to preseed ...
1
vote
1
answer
131
views
How can docker communicate to other hosts in local network using hostnames?
I have two computers in the same network with below hostnames and IP address(Dynamic IPs):
host1.local - 10.0.0.11
host2.local - 10.0.0.12
host1 is running Docker with default configuration.
...
1
vote
0
answers
93
views
What exactly does "sudo hostnamectl set-hostname NEW_HOSTNAME" change?
Just want to understand exactly what sudo hostnamectl set-hostname NEW_HOSTNAME is doing.
Surely it does something other than changing the value inside /etc/hostname?
0
votes
1
answer
89
views
$HOSTNAME mismatch
There are two different version of hostname on my system. This is a problem when trying to use wget against $HOSTNAME, which differs from what is expected.
[user@box ~]# wget https://$HOSTNAME/login....
0
votes
1
answer
284
views
How to use hostname rather than IP address for website
I've set up a VirtualBox VM which has an apache webserver running. I've created a webpage and I can navigate to it via the IP address on devices in the lan. However I want to use a hostname rather ...
0
votes
0
answers
48
views
My macOS hostname changed randomly should I be worried?
My hostname on my macOS 11.5 changed from MacBook-Pro-username to DESKTOP-NMO2G92 without me changing anything
Should I be worried? aka malware etc
1
vote
0
answers
128
views
sudo command showing delay after using hostnamectl to set hostname
I've got a system - accessible over local network but not connected to the internet. I'm facing issues when changing the hostname of this system. I know that changing hostname is a two step process:
...
0
votes
0
answers
117
views
systemd change hostname without logging out
I have a systemd service that reads some environment values (that may change at startup) and set the hostname accordingly.
The service at the moment is a mix of several tries
[Unit]
Description=...
1
vote
0
answers
78
views
Why is my computer sometimes assigned two internal IP addresses?
I run Debian 10 and sometimes when I start the computer the output of hostname -I has three entries:
$ hostname -I
192.168.0.13 192.168.0.2 fdaa:bbcc:ddee:0:d69a:20ff:fef8:dca8
Sometimes it has one ...
0
votes
2
answers
93
views
How is the LAN IP connected to the machine name?
I can't find how/where the LAN ip is connected to my machine name such that anyone typing the machine name (host name) will be directed to the IP. I know the machine name is under /etc/hostname/ but ...
0
votes
1
answer
40
views
Root cannot install packages in rescue or chroot plus service errors
I am using Arch linux.
Currently, I am having the trouble of:
User Login Management failed
User Login Management failed
User Login Management failed
User Login Management failed
Kernel Module drm ...
0
votes
0
answers
28
views
Different hostnames, same configuration
I set up two Ubuntu 20.04 servers to run Pi-hole for my home network. One is running on a Raspberry Pi 4 and the other is virtual. Both are running Ubuntu Server 20.04.
lsb_release -a
Distributor ID: ...
0
votes
2
answers
131
views
How to setup a .local Wifi hostname to SSH in a Linux system?
I SSH to my Raspberry Pi's wifi via ssh raspberrypi.local, simply done by adding the following code in a file named wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
...
0
votes
1
answer
387
views
How to reconfigure hostname on Arch Linux so the pacman command works properly
I just finished installing Arch Linux on my computer to the point where I can boot my system without
the thumb drive. After rebooting I started making some adjustments and quickly realized that my ...
2
votes
1
answer
187
views
Why is the UTS namespace isolation not working?
1. Starting a shell process under a separate child UTS namespace
sudo unshare -f --mount-proc -u /bin/bash
2. Change the hostname in this process
hostnamectl set-hostname newhostname
3. Monitor the ...
0
votes
1
answer
51
views
How do I get the inside of the network to see the server properly? Inside the network, foobar.net doesn't resolve
I'm running MINT 20.1.
I am connected to the net via AT&T UVERSE fiber optic.
I have a DNS, foobar.net, set up to point at my router, and when I am outside the network, I can load a website ...
0
votes
1
answer
92
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
0
answers
64
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
1
answer
72
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 ...
4
votes
1
answer
1k
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
0
answers
195
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
1
answer
496
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
2
answers
319
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
1
answer
137
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/...
1
vote
0
answers
2k
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
0
answers
101
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
3
answers
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
3
answers
3k
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
1
answer
161
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 ...
1
vote
2
answers
469
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
1
answer
190
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>...
0
votes
0
answers
85
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
0
answers
55
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
1
answer
179
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
1
answer
457
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
1
answer
85
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
1
answer
795
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
1
answer
330
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
0
answers
74
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
0
answers
184
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 ...
1
vote
1
answer
430
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
1
answer
143
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 ...