To switch user in Ubuntu, use the su command followed by the user name you want to switch to. Open the terminal and type su username, replace the username with the name of the target user, and enter the user’s password to successfully switch the target user’s environment.