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

learn more… | top users | synonyms

6
votes
3answers
5k views

Determine FQDN when hostname doesn't give it?

In another question, I found that Puppet was generating certificates for my machine's FQDN but not the simple host name. In that example, kungfumaster was the hostname and was the value retrieved by ...
2
votes
3answers
9k 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 I'...
0
votes
1answer
140 views

how to setup VPS domain registered via different service?

I have a domain that was registered with network solutions and my vps is hosted via hostWinds. I got a cheap/budget VPS because I'm a developer by trade and would rather know how to set all this ...
0
votes
1answer
21 views

Site cannot be reached after installing centos 7

Hello I am new to this unix background. I had set up a server on centOs 7. i had given ip as 192.0.2.123 and host name as www.example.com. now when i www.example.com hit the hostname in the browser ...
0
votes
2answers
32 views

How can I resolve an IP address to a hostname in Arch Linux? [duplicate]

What is the most concise way to resolve a hostname to a local IP address in Arch Linux?
1
vote
1answer
28 views

Turn off resolve peers in uTorrent server (utserver)

I have utserver running and WebUI is also working. I noticed the default seems to have the peer resolve the IP address to their host name. I want to turn this off. In the Windows client, you could ...
0
votes
1answer
39 views

Assign hostname to a variable in ksh

I am trying to assign the output of hostname to a variable and use it in my script. While I was able to get the variable to another logic, when I try to print the variable it doesn't print the ...
3
votes
4answers
3k views

How to show the host name in Linux commandline prompt

I have several VMs and right now my command-line prompt looks like -bash-3.2$; identical on every VM, because it doesn't contain the host name. I need to always see which VM I'm on using hostname ...
2
votes
2answers
33 views

How to specify protocol prefix containing “:” to bash-completion function _known_hosts_real

I am attempting to use bash-completion for URLs of the form "proto://host". Without the ":", I see expected behavior, with the ":" present, the URL comes out "faulty". Bash completion has a function ...
2
votes
1answer
535 views

Remove a directory level from a website URL

Can anyone tell me how to configure apache to not display a website folder name at the end of a base URL, please? - but only for one out of many websites. Let me describe the scenario ... I have a ...
0
votes
4answers
70 views

How to add hostname as first line of a file

I have a file which has a few lines. one two three four five I need to add hostname of the server I'm working on as the first line of the file. For example if abcd555.india.com is the server, the ...
3
votes
0answers
194 views

Use eth0 and eth1 for different subnets and assigned host name to interface?

I have a machine running SELES 10 with dual NIC Both the NICs are on separate subnets. The server uses a DHCP. So when one interface, eth0, gets the IP from DHCP and registers with DNS and then the ...
3
votes
1answer
60 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
4answers
77 views

Setting up hostnames on local network [duplicate]

So, I'm setting up an experiment network for me and the other geeks at my school to use for website testing and server practice, and I'm the sys and net admin (but really it's just for playing Quake). ...
7
votes
4answers
11k views

What is sendmail referring to here?

When I install sendmail from the debian repos, I get the following output: Disabling HOST statistics file(/var/lib/sendmail/host_status). Creating /etc/mail/sendmail.cf... Creating /etc/mail/submit....
0
votes
1answer
30 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
255 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
167 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: PS1="\[\u@$(...
0
votes
1answer
77 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
27 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
116 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
39 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
30 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
64 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 ...
11
votes
1answer
10k 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
915 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
0
votes
2answers
41 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
30 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 projectname-...
2
votes
2answers
44 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 banana....
3
votes
1answer
74 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
49k 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
45 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
48 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
360 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
61 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 ...
1
vote
2answers
145 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
276 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
50 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
40 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
239 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
397 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
38k 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? /etc/...
1
vote
1answer
90 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
421 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
15k 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 ...