On 01/01/2017 03:48, ssmtpmailtesting ssmtpmailtesting wrote:
cat /root/.bashrc
HOSTNAME=mybox
export HOSTNAME
hostname mybox
PS1="\e[0;31m[\u@\h \W]\$ \e[m"
export PS1
source /root/.bashrc changes the prompt to
[root@(none) ~]$
Why is (none) there? echo $HOSTNAME and hostname returns mybox.
Not sure, but I guess the "\h" parameter shows hostname at the time bash
was launched, not what is in HOSTNAME, not what has been set by the
"hostname" command after bash was started. Try just to start a new shell:
/bin/bash
And tell me what happens.
Pierre
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page
Do not top post on this list.
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
http://en.wikipedia.org/wiki/Posting_style