switch user in ubuntu code example Example 1: change user linux sudo su - username Example 2: switch user ubuntu $ su - user2