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

learn more… | top users | synonyms

0
votes
1answer
24 views

hostname -f .com.com

I modified my /etc/hostname file and /etc/hosts like that: hostname.com and 127.0.0.1 localhost.localdomain localhost ::1 localhost ip6-localhost ip6-loopback ff02::1 ...
0
votes
1answer
38 views

I got error “hostname: Name or service not known” when checking IP of hostname

I'm running Ubuntu 14.04 on my company's cloud service (my instance has elastic IP) I want to check out IP of my instance i'm running by command line but it didn't work. root@ubuntu14-graphite:~# ...
4
votes
2answers
160 views

Persistent Bash Prompt Prefix Linux

I want to have the FQDN as bash prefix instead of just using the hostname. So I can change root@web: ~$ to root@web.domain.tld: ~$ I already know that that is possible by using: ...
0
votes
1answer
29 views

DRBD - 'node1' not defined in your config (for this host) - Error when setting Primary [closed]

I am getting the following error when trying to set the Primary node for DRBD. 'node1' not defined in your config (for this host). I know this is related to DNS/Hostname/Hosts and the config ...
1
vote
1answer
22 views

how to change all the hostnames reported by hostname --all-fqdns?

Running hostname -A reports two host names: an incorrect one that doesn't even resolve to my server and a correct one. $ hostname -A notmyhostname.notmydomain.com myhostname.mydomain.com The ...
1
vote
1answer
37 views

sudo: unable to resolve host “hostname”

I'm testing a VPS provider, and recently created a virtual machine with a hostname testserver using an ubuntu template. This VPS provider reserves and bills resources by the month, so if you create a ...
0
votes
0answers
26 views

Why are the names different in “/etc/HOSTNAME” file and hostname command in SLES11SP3?

My OS is SuSE(SLES11, SP3), executing the hostname command: # hostname lxc-dl580-g8-1 But the name in /etc/HOSTNAME file is different? # cat /etc/HOSTNAME linux-2pny.site Why are the names ...
1
vote
1answer
28 views

Separate server's hostname appearing in this server's cron logs

I get entries like these in /var/log/cron, in a host named SERV2 (RHEL 6.2): Apr 21 14:50:01 SERV1 CROND[14799]: (root) CMD (/usr/lib64/sa/sa1 -S DISK 1 1) Apr 21 15:20:01 serv2 CROND[24438]: (root) ...
4
votes
0answers
44 views

Why does connecting using an ssh key fail with one host name but work with others? [closed]

Trying to use an ssh key to a server which has different host names works with some host names, but not with others? Is there some reason why ssh would work that way? E.g. say hostname1.com and ...
10
votes
1answer
9k views

linux hostname -f command is not working on RHEL

I am running a RHEL 5.7 and the hostname command gives me the correct hostname. But hostname -s and hostname -f return: Unknown host. Why?
5
votes
1answer
877 views

Display hostname in GDM3 on Fedora 19 at login screen [closed]

I'm managing almost 100 lab PC's running Fedora 19. It's difficult to manage because it seems like no where that I can display the hostname at the login screen. GDM version: gdm-3.8-3.2
1
vote
1answer
30 views

Check presence of a hostname under custom port in known_hosts

I need to add a check if the hostname is already present in the known_hosts. Normally I would do something like that: ssh-keygen -H -F hostname However, that does not seem to work for me in this ...
0
votes
2answers
40 views

Hostname troubles

I am trying to change the hostname on a Linux RHEL6.5 box and have changed it in /etc/hosts and in /etc/sysconfig/network, as I have read.. The command hostname'now returns the new hostname, but ...
1
vote
0answers
24 views

Rsyslog to use hostname instead of leftmost FQDN label

I have an Ubuntu 15.10 configuration in which /etc/hostname reads projectname-environmentname and /etc/hosts reads 127.0.0.1 localhost 127.0.1.1 environmentname.projectname.tld ...
2
votes
2answers
32 views

Where does FQDN come from when not set explicitly?

When there is no FQDN explicitly specified on an Ubuntu server: $ cat /etc/hostname banana $ cat /etc/hosts 127.0.0.1 localhost banana Then where does mydomain.com come from? $ hostname -A ...
3
votes
1answer
53 views

Unable to update hostname output for Ubuntu Server (on Digital Ocean)

I recently created a droplet server at Digital Ocean named: ubuntu-2gb-nyc3-01-2016-03-13 and then did a rename on the server at the Digital Ocean control panel, to exchange.mydomain.com. ...
16
votes
3answers
48k views

How to change the hostname of a RHEL-based distro?

I logged in for the first time, opened terminal, and typed in ‘hostname’. It returned ‘localhost.localdomain.com’. Then I logged as the root user in terminal using the command, ‘su –‘, provided the ...
0
votes
1answer
3k views

Editing /etc/hosts and /etc/sysconfig/network doesn't chane the hostname [duplicate]

We have tried both the /etc/hosts and also /etc/sysconfig/network. Edited both files and service network restart. Yet the hostname is showing as localhost.localdomain. How to resolve on this? Googling ...
0
votes
0answers
33 views

Set name for NAS with samba

Hi I'm in the midst of setting up a torrent box which has ArchLinux installed. I've been following quite a few of the archlinux tutorials and I'm at the point where I have a samba server up and ...
1
vote
2answers
43 views

How to randomly pick one of multiple hostnames under one alias (~/.ssh/config)

Is it possible to make ssh pick a random ip adress (using a wildcard) to connect? We have 30 computers with IP addresses from "asd1.asd.asd.asd.com" to "asd30.asd.asd.asd.com", and i want to connect ...
1
vote
1answer
299 views

how do I set a hostname in yast?

how do I set the hostname, FQDN, in yast? I ran yast => network devices => network services => hostname/DNS: YaST2 - lan @ arrakis Network Settings ...
2
votes
1answer
56 views

Changing hostname disturbs the system and DE's like KDE, Gnome, etc… What can I do to allow it anyway?

Long time ago I started to develop some kind of stealthmode-demon in c++. Part of this is to be only run as root and another part of it is, to change the hostname to a randomn generated one. I ...
2
votes
3answers
8k views

CentOS 7 hostname will not change

I have two CentOS 7 VM's running in virtualbox. On each of the machines I want to set the hostname and a static IP address. VM1 works just fine. VM2 does not. I did the same thing on both servers so ...
1
vote
2answers
95 views

hostname: Name or service not known

I got this error during the installation of 2 packages. I tried to follow different tutorials around internet, however none of them seems working for me. Can you help me with this? root@blackbox:~# ...
3
votes
2answers
222 views

How to change the part after root@

For example. [root@ip-10-0-7-225 ~]# I edited /etc/hosts but it didn't work.
1
vote
1answer
31 views

ssh_config: Add a host section that matches IPs even when connecting via hostname

I want a host section in my ssh config that matches any local IP: Host 10.* 192.168.*.* 172.31.* 172.30.* 172.2?.* 172.1?.* setting setting ... This works as long as I connect directly to a ...
0
votes
1answer
37 views

Why doesn't 'sudo' skip hostname-checking when the command can be run on 'ALL' hosts?

The sudoers file provides a way to limit which "runas" entries apply to which hosts. When running a command with sudo, the hostname is checked against the hosts on which a "runas" entry applies. When ...
5
votes
3answers
2k views

How to get the computer name (not its hostname)?

All the results of my searches end up having something to do with hostname or uname -n. I looked up the manual for both, looking for sneaky options, but no luck. I am trying to find an equivalent of ...
0
votes
1answer
125 views

CentOS 6.7: 'No address associated with name' as 'hostname --fqdn' output

please, before read this question, I would pray you to consider that I'm a Linux newbie and that I really need a help. I apologize in advance if the question will be trivial or stupid, I will search ...
2
votes
2answers
350 views

uname -n vs hostname

What is the difference between uname -n and hostname? Are there any real differences in what they return? Are there any differences in availability on different OSes? Is one of them included in POSIX ...
5
votes
2answers
35k views

Unable to resolve hostname

So I try to do: ssh $(hostname) and it tells me: ssh: Could not resolve hostname woofy: Name or service not known It knows that its own hostname is "woofy"; why can't it connect to itself?
1
vote
1answer
9k views

CentOS 6 not registering new hostname on Windows Server 2003

I rebuilt a Windows 7 Workstation with CentOS 6.5. The Windows 7 had a host name aaa attached to domain ddd.local. The new CentOS hostname is bbb. When I try to ping it: $ ping bbb ping: unknown ...
2
votes
3answers
1k views

Avoid overwriting of hostname by transient hostname at reboot

My server is CentOS 7.1. After reboot the hostname is overwritten by the transient hostname (mail) and I can't find a way to avoid that. Maybe AutoDNS and the MX record mail causes that? ...
1
vote
1answer
66 views

Telnetting the local port working but trying with ip not working

My question is similar but opposite to to Telnetting the Local port not working but trying the ip working For me, telnet to the local port works but trying with IP does not work :( I am running ...
0
votes
3answers
396 views

Hostname variable doesn't work

I'm on a Raspberry Pi using RPiTC (Raspberry Pi Thin Client). I had made a script with an Hostname variable. It's worked perfectly but today when I had launch my script I saw something strange. My ...
2
votes
3answers
14k views

Unable to set hostname for use within network

I am having a lot of trouble setting up a hostname for my home server for use within my home network. My home server is running Ubuntu 12.04 LTS and all packages are up to date. Management of this ...
1
vote
5answers
3k views

Setting a network hostname doesn't work

I'm on a Kubuntu 11.10 and I'm having trouble setting a hostname on the network. I already tried changing send host-name "myhostname" in /etc/dhcp/dhclient.conf or /etc/dhcp3/dhclient.conf with a ...
0
votes
1answer
63 views

Browse by hostname from internet browser

I can browse my server site using ip:8080 which is inside my home network.But I am not able to browse using hostname:8080 I do not have dns server. I have edited /etc/hosts file to include ...
3
votes
1answer
153 views

What is the best way to keep a Linux server's hostname consistent?

We have a server with a CentOS distribution of Linux. It lost its hostname in the month somehow, since our last reboot. We ran an ETL (extract, transform, load) job last week, and part of that ...
27
votes
5answers
204k views

How to change hostname on CentOS 6.5?

I can't seem to change the hostname on my CentOS 6.5 host. I am following the instructions I found here: http://www.rackspace.com/knowledge_center/article/centos-hostname-change I set my /etc/hosts ...
0
votes
1answer
24 views

set up pfctl to forbid local applications accessing a specific hostname

I am an OSX user, and I want to ban some hostnames, with which some local applications may do nasty things. pfctl is the default firewall on OSX 10.11 El captain. So, how to block the specific ...
14
votes
2answers
826 views

Host name changed remotely by wifi?

Am am currently visiting TU Wien and today I connected my Debian Linux laptop to their eduroam wlan using wpa_supplicant and the credentials of my home institute - as always when I am visiting another ...
1
vote
1answer
3k views

How to set the fully qualified hostname on CentOS 7.0?

How do I set the fully qualified hostname on CentOS 7.0? I have seen a few posts online for example using: $ sudo hostnamectl set-hostname nodename.domainname However, running domainname returns ...
5
votes
4answers
2k views

How to append / extend zshell completions?

I am using zsh with oh-my-zsh. Unfortunately, oh-my-zsh does not use file ~/.ssh/config for hostname auto-completion (see Issue #1009, for instance). This could easily archived by the following code: ...
0
votes
2answers
3k views

Display hostname in ping output

When I ping my Linux server (running in a VM on my Windows7 host) with the following command: ping -a 192.168.56.*** I get the results shown below. Why isn't it resolving my server's name? ...
6
votes
2answers
10k views

Using DNSMasq for Local Hostname Resolution

I'm working on setting up a home intranet for me and my roommates. My idea is that we'll be able to store things like past utility bills in a place that's more accessible than a drawer in the kitchen ...
1
vote
2answers
202 views

What's the use for the special ipv6 addresses in /etc/hosts?

I have the following block in my /etc/hosts: # The following lines are desirable for IPv6 capable hosts ::1 localhost ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ...
0
votes
2answers
551 views

Debian stuck in Endless DHCPNAK/OFFER loop unless I ask DHCP server to clear expired leases

have a Marvel Kirkwood device running Debian with 3.16 Kernel. On boot, the DHCPClient gets stuck in a loop and never picks up an ip unless I log onto the dhcp server and ask it to dump the expired ...
0
votes
2answers
54 views

How to change ThisName@HostName ~ $

I am quite new to Linux and I was wondering how to change the following when in terminal permanently. When I set up my computer I used a name that I now want to change: In terminal, the name I want ...
0
votes
1answer
32 views

Local hostname not displayed by script at boot

I have written a very simple bash-code which is trying to send the local hostname of the system to a php-page, basically using: curl mypage.com/?hostname=$HOSTNAME When I run this bash file "per ...