how to set password in ubuntu code example Example 1: add password to user ubuntu passwd {username} Example 2: change password from command line in ubuntu sudo passwd <user>