Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [hostname]

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

1
vote
1answer
36 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
84 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
48 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 ...
7
votes
1answer
187 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
95 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 ...
1
vote
1answer
208 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
123 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
85 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
0answers
323 views

ssh does not recognize host name defined in config file [closed]

My ssh can no longer resolve my hostname. Everything was working fine until I did a security update on my ubuntu v16.04. I try to do ssh <myhost> and receive the error ssh: Could not resolve ...
0
votes
2answers
188 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
40 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 ...
14
votes
2answers
2k 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
52 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
24 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
170 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&...
0
votes
0answers
84 views

PC-name, localhost, hostname etc. on Fedora

Today I reinstalled Fedora and saw a strange name on the command line [ekkl@37L4247F27-25 ~]$ uname -a Linux 37L4247F27-25 4.16.15-300.fc28.x86_64 #1 SMP Tue Jun 12 00:42:35 UTC 2018 x86_64 x86_64 ...
2
votes
1answer
86 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
29 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 ...
1
vote
1answer
199 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 ...
0
votes
1answer
40 views

Set hostname via ssh error SCRIPT

im using this script to change hostname via ssh but i got some errors. read -p "Insira o IP : " ip read -p "Insira o nome do utilizador : " host read -s -p "Insira a palavra passe : " oldpass ...
-1
votes
1answer
93 views

Setting up hostname, hosts & domain correctly [closed]

I'm new to this platform but I try to be as specific as possible. I researched quite a lot but every new answer just adds to the confusion at the moment. I am running Debian on my first server with a ...
1
vote
1answer
45 views

Is it possible to display a different hostname, when a user logs in?

I have an issue where my customer used a different hostname naming convention than my company did, for the devices they purchased from us. Example: We named the devices Lenny1, so the FQDN is lenny1....
0
votes
0answers
170 views

Cannot change hostname of raspberry pi in local network

I have a clean install of the debian-based OSMC os on a raspberry pi. I've manually set a static IP: $ ifconfig wlan0 wlan0: flags=-28605<UP,BROADCAST,RUNNING,MULTICAST,DYNAMIC> mtu 1500 ...
0
votes
1answer
33 views

What is the best approach to find a system's domain name?

I use the following syntax in order to find the domain name on a Linux machine: hostname | sed s'/\./ /g' | awk '{print $2}' hostname master02.sys65.com hostname | sed s'/\./ /g' | awk '{print $2}' ...
1
vote
0answers
88 views

Is changing the system hostname on a server with a running MySQL / MariaDB service harmful?

I want to change the hostname of a running CentOS 7 server which is running MySQL (mysql Ver 15.1 Distrib 10.0.33-MariaDB, for Linux (x86_64) using readline 5.1). Although I can't find any sources ...
1
vote
1answer
50 views

How can I ping my dhcp server using hostname?

I've just configured a PC with a dhcp server and an apache server on it. I want to set a hostname to my server (i.g "myserver") in order to be able to access its web server by writing on the browser "...
0
votes
0answers
133 views

UFW blocks hostname lookup on LAN for ssh and ping

I'm experiencing a problem connecting to hosts on my LAN via their hostname only when UFW is enabled. When UFW is enabled: ssh <machine> gives the message: ssh: Could not resolve hostname &...
1
vote
2answers
5k views

Could not reliably determine the server's fully qualified domain name

I was following this tutorial to setup two virtual hosts in Centos 7. The issue is i am getting the following error while restarting the httpd. [userme@server ~]$ sudo systemctl restart httpd....
1
vote
1answer
53 views

Changing system hostname makes samba being unaccessible

I found something weird in my debian 9 config. I changed my hostname by editing /etc/hostname and rebooting from "myhost" to "myhost-hello". Since this modification connecting to the machine via it'...
2
votes
1answer
2k views

Is /etc/init.d/hostname.sh still an option for debian stretch?

I changed the host name and went to make it stick, but my previous solution didn't work. I am using Linux raspberrypi 4.9.59-v7+ #1047 SMP Sun Oct 29 12:19:23 GMT 2017 armv7l GNU/L. Is there a new ...
1
vote
1answer
1k views

How the hostname resolution / lookup happens in Linux? [closed]

I am new to Linux and need to know how nslookup command resolves hostname? what are the configuration files that are used by nslookup command - I need to know the exhaustive list of files that are ...
1
vote
1answer
2k views

SUSE Linux Enterprise 12: Change Hostname permanently

I want to change the hostname for a VM, but struggle to do it permanently. Already changed it via /etc/hosts and /etc/hostname, but did't work out. Does anyone have an advice? Thanks in advance.
1
vote
2answers
187 views

How can I log into a running docker instance?

poking docker to see how it works: ubuntu@ip-172-31-14-19:~$ ubuntu@ip-172-31-14-19:~$ sudo docker run --net=host -d -t jmar71n/freepbx ...
1
vote
1answer
47 views

openSuSE prompt on AWS configuration

On an Amazon aws ec2 openSuSE instance: thufir@ip-<ip>:~> thufir@ip-<ip>:~> echo $PS1 \u@\h:\w> thufir@ip-<ip>:~> how do I set the prompt to something more friendly? ...
1
vote
1answer
781 views

Why isn’t the hostname command getting the FQDN from /etc/hostname? [duplicate]

I set the hostname. # more /etc/hostname kafka01.ocff4.com The hostname is still as follows. hostname kafka01 I restart using the following command. systemctl restart systemd-hostnamed But ...
0
votes
1answer
189 views

Postfix myhostname change

I'm currently trying to change the myhostname field. So, I have this situation: My server doesn't need an Internet domain anymore, since it will be a local host server. But I want to serve mail ...
0
votes
1answer
114 views

How do I change hostname in trueos

I want to change the hostname that was generated during installation. How do I do that in Trueos?
1
vote
1answer
142 views

How a Virtualbox ubuntu VM able to resolve another ubuntu VM's hostname.?

I have 2 Virtualbox VM's on which I have Ubuntu 15. The hostnames are: Machine 1: satya-VirtualBox Machine 2: sam1-VirtualBox Hosts file on machine 1- But I am able to ping machine 2 from 1 using ...
0
votes
0answers
302 views

Validate hostname

As part of my script I have to validate a user input hostname. I am currently doing this. nslookup $cloud_hostname 1> /tmp/.hostname_look_up TEST_HOSTNAME=$(grep find /tmp/.hostname_look_up) if [[...
0
votes
1answer
72 views

My Linux server forgets its host name every day

I have a Linux server # uname -a Linux site 3.12.39-47-default #1 SMP Thu Mar 26 13:21:16 UTC 2015 (a901594) x86_64 x86_64 x86_64 GNU/Linux # lsb_release -a LSB Version: n/a Distributor ID: SUSE ...
6
votes
1answer
12k views

How to filter by host name in Wireshark?

Display filter in form ip.src_host eq my.host.name.com yields no matching packets, but there is traffic to and from this host. DNS name is resolved successfully, and filters using ip addresses like ip....
1
vote
1answer
162 views

getnameinfo is not resolving IP

I have gateway installed on Ubuntu, and not able to get hostname for local IPs, using nslookup or programmatically using getnameinfo nslookup gives: fuad@URLF:~$ nslookup 192.168.1.107 Server: 127.0....
2
votes
2answers
1k views

How to block hostnames with wildcards or Regex?

Currently I uses a big /etc/hosts to block unwanted hostnames. But the file is getting bigger and bigger closing in on 700000 entries. The are many similar entries so I would like to use wildcards ...
1
vote
1answer
294 views

Changed hostname, now I can't run a tripwire check: “policy file does not match policy used to create database”

So due to problems with my hostname I just changed it. The problem with that is that in the tripwire configuration I left the hostname variable within the name of the dbfile and the local keyfile as ...
1
vote
2answers
1k views

Fedora 26 and fully qualified domain names?

I installed Fedora 26 for testing under GCC 7. F26 is installed in a 64-bit VirtualBox VM. I ran the following commands to configure the system post-install, and then rebooted: localhost:~$ sudo ...
1
vote
1answer
3k views

CentOS7 unable to resolve nslookup for short hostname

I tried setting up a DNS Lookup on CentOS 7 (in a Virtual Box VM), which works for FQDN on the same virtual machine as the DNS. However when I try to resolve the short hostname, it fails. I have seen ...
1
vote
1answer
904 views

Making “host -v hostname” command work for CentOS 7

I have a fresh CentOS 7 install. During installation, I provided centa.home.local as hostname. Now one of the software needs to see "host -v centa" output to locate the server IP address on server. ...
9
votes
1answer
2k views

Mac OS command to resolve hostnames like “getent” on Linux

I would like a command that will resolve a hostname to an IP address, in the same way that a normal program would resolve the hostname. In other words, it has to take into account mDNS (.local) and /...
3
votes
4answers
5k views

Need to force hostname update without restart

I need to change the hostname of a system without rebooting it. Im running CentOS 7 and have the correct hostname in the /etc/hostname file but im still showing the old hostname at prompt. I know that ...
1
vote
0answers
143 views

Jenkins deploy doesn't pass variable to java

Problem that I ran into is that when we deploy our Java application via Jenkins hostname variable is not passed to it. Inside the script somewhere we define HOSTNAME=$(hostname -f) variable, which we ...