I want my prompt in the Linux terminal to display the full path instead of the current directory. I tried to modify the /etc/bashrc file as per the suggestions available in Linux forums still not getting the desired output. This change I want to happen for all the users and not only for root or oracle users.
Default
[root@ol7-19p ~]# cd /home/oracle/Downloads/
[root@ol7-19p Downloads]# pwd
/home/oracle/Downloads
Desired
[root@ol7-19p /root]# cd /home/oracle/Downloads/
[root@ol7-19p /home/oracle/Downloads]# cd /home/oracle/Downloads/
Before
PROMPT_COMMAND='printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}"'~
~PROMPT_COMMAND='printf "\033k%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}"'
After
PROMPT_COMMAND='printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD}"'
PROMPT_COMMAND='printf "\033k%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD}"'