where exactly does bash get \h and \H hostname parameters used to set PS1 prompt?
I want my bash prompt to display fqdn instead of hostname.
I am using ubuntu 12.04 lts amd64, installed from alternate cd, text install only, all default options, so I will paste only relevant bits.
when connecting to the machine using putty over ssh, my current prompt is like this:
myuser@imap:~$ echo $PS1
\[\e]0;\u@\h: \w\a\]$
reading bash manual page, I understand that replacing \h with \H should change the prompt to display the fqdn
I did that, and the prompt does not change.
myuser@imap:~$ cat /etc/hostname
imap
myuser@imap:~$ cat /etc/hosts
127.0.0.1 localhost
192.168.17.71 imap.domainname.tld imap
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
So, to add this question to the one in the subject, how can I get bash to display fqdn in the least intrusive way?
Question information
- Language:
- English Edit question
- Status:
- Expired
- For:
- Ubuntu bash Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply: