Any way to show full hostname in bash instead of partial?
Now for domain.com
it's:
user@domain:~$
Would like it to be:
user@domain.com:~$
Debian 8.5
Any way to show full hostname in bash instead of partial?
Now for domain.com
it's:
user@domain:~$
Would like it to be:
user@domain.com:~$
Debian 8.5
The bash prompt is configured by the PS1
variable. You can configure it simply by setting the variable for example like this:
export PS1="$(hostname -f):~$ "
If you want to make the configuration permanent you can put the export
command in your ~/.bashrc
file.
I recommend reading the ArchWiki Page for more information.
For Debian 10 open file located at: /etc/bash.bashrc
change 21st line from:
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$
to:
PS1='${debian_chroot:+($debian_chroot)}\u@\H:\w\$
\h becomes \H
then do following command:
source /etc/bash.bashrc
or restart your bash session/relogin.