Forum Discussion
RD ID in the CLI prompt
If you have ever wondered, which RD are you in (when working in the command line and switching between Route Domains using rdsh), add the following to your /etc/bashrc
getRD()
{
rd=''
if [ -n "$TMOS_RD" ]; then
rd="%$TMOS_RD"
fi
echo "$rd"
}
and update the PS1 variable definition according to your taste. For example
PS1='[$USER@$(getHostName):$(getPromptStatus)$(getAvcCount)$(getRD)] \W \$ '
The Route Domain ID will be shown in the prompt, like this
[admin@bigip:Active%2] config
2 Replies
- What_Lies_Bene1
Cirrostratus
Thanks Tarmo, this will be very useful. - hoolio
Cirrostratus
Thanks for the suggestion Tarmo. I submitted a request for enhancement in SR1-83412302 to add this to the bash CLI prompt if the user switches to a non-default route domain.
Aaron
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com