How to switch from root to user in Ubuntu running in Termux?

To switch to an user with username john, enter the command

su john

And the prompt would change from # to $ (root to ordinary user).

To get back to root, type exit.