I have been doing a lot of work using Linux containers, and I keep forgetting which of the terminals on my screen is running inside which container, particularly when I leave them open overnight.
How can I change the shell prompt, or the terminal title based on the container that the shell runs in?
This is a general question, but it'd be great if it worked for systemd-nspawn
and kde
on Arch.