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

learn more… | top users | synonyms

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?
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 ...
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 ...
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
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 ...
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). ...
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:~# ...
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 ...
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
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. ...
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
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 ...
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 ...
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 ...
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 ...
3
votes
1answer
183 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 ...
0
votes
1answer
69 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 ...
0
votes
1answer
27 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
830 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
5k 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 ...
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
327 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 ff02::...
0
votes
2answers
55 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
34 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 hand"...
-2
votes
1answer
50 views

Script To Update Multiple Hostnames

Needing a script to read row by row, then ssh into the machine and update the hostname of the machine, then exit and continue with the next row. We have a cvs file that contains the previous hostname ...
0
votes
1answer
20 views

How to change hostname of a SLES11 Server

How do I change and check the hostname of a SLES11 based system?
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/...
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
0answers
471 views

CentOS DNS Server for localhost

I need install the DNS Server (BIND - CentOS 7) to work only locally. I mean, the same CentOS that has the BIND will connect/search in the DNS, any other host will 'connect' with this machine. The ...
1
vote
3answers
513 views

How to resolve hostnames with Raspbian 5/5/2015?

I'm relatively new to Linux and falling down the tree and hitting every branch on the way down (it seems). I'm trying to share an NTFS drive, or a directory on the drive, via samba, and I have found ...
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 ...
8
votes
1answer
131 views

Why does sudo need the loopback interface?

We were trying to install our software on an Ubuntu machine. To do so, we needed root privileges. Basically, all we needed to do was run a runnable jar like: sudo java -jar runnableJar.jar. All such ...
1
vote
1answer
610 views

service start: HOSTNAME: command not found

Whenever i try to start a daemon service with the service name start I get the following error: /etc/sysconfig/network: line 3: HOSTNAME: command not found MySQL Daemon failed to start. Starting ...
1
vote
2answers
116 views

Setting a domain name in LAN

I am developing a web page using Apache Web Server in my pc. When I want to open it in the browser I use the ip, for example: http://192.168.1.6/proyect My host is part of a local network (a laptop ...
1
vote
1answer
414 views

Alias name for ip address [closed]

I have a website which is hosted in local Server (CentOS 5.x) (Hostname: xxx.yyy.local, IP : 192.168.5.25). I can browse the site typing the server IP address in the browser from my Local Network e.g: ...
1
vote
1answer
131 views

any option to ignore a dns server ip from /etc/resolv.conf when doing nslookup?

We have a list of dns server IPs in /etc/resolv.conf. When doing nslookup for a particular scenario we would like to ingore the second entry below, so that naming resolution occurs via other 3 DNS ...