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

learn more… | top users | synonyms

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 ...
13
votes
4answers
14k views

I changed my hostname, why is my bash PS1 prompt unchanged

I changed my hostname by editing /etc/hostname and can see the new hostname using the hostname and hostname -F commands. But the shell prompt is still showing the old hostname. This is Ubuntu 11.0.4 ...
1
vote
3answers
514 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 ...
32
votes
5answers
220k 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 ...
7
votes
5answers
2k views

resolve all ip addresses in command output using standard command line tools

I have several log files that contain a bunch of ip addresses. I would love to be able to pipe the data through a program that would match and resolve ip addresses. I.E. cat /var/log/somelogfile | ...
6
votes
1answer
4k views

Shell command/script to see if a host is alive?

I'm trying to figure out more ways to see if a given host is up, solely using shell commands (primarily bash). Ideally, it would be able to work with both hostnames and IP addresses. Right now the ...
9
votes
4answers
4k views

Where does `hostname` store the hostname that I've set?

This is quite puzzling. Does anyone know where the hostname command stores and reads hostname from? I thought it was /etc/hostname but there is no such file on this Linux system that I'm using. I ...
5
votes
2answers
1k views

Why is my hostname different in Emacs?

So I changed the name of my computer recently, by editing /etc/hostname. The bash prompt is user@name, so I know it has worked. But in emacs, in the window bar it says emacs@name.tiscali.co.uk. ...
4
votes
2answers
2k views

Obtaining remote host name in bash script

Sorry my knowledge of Linux bash commands is pretty basic, I've been searching for a while but I'm not 100% sure what I need to search for. I was wondering if there's a way to grab the current logged ...
2
votes
1answer
3k views

Why does hostname --fqdn only return the domain name?

Relevant files (slightly anonymized): heinzi@d2:~$ cat /etc/hostname d2 heinzi@d2:~$ cat /etc/hosts 127.0.0.1 localhost <myexternalip> d2.<myname>.at <myname>.<...
2
votes
2answers
295 views

Use a dynamically obtained hostname with an ssh config entry

Our accounts in our lab are all mounted over NFS and are accessible over all the systems in a subnet. So, effectively we can ssh into any of the machines in the subnet and continue our work. The ...
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) ...
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 ...
1
vote
2answers
7k views

URL with hostname doesn't work but it works with IP Address

I have a very basic question here. This thing is puzzling me a little bit. I have one Ubuntu machine which is running 12.04 and I am connecting to that machine from putty in my desktop (which is ...
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 ...