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