change password in terminal linux code example Example 1: change user password centos 7 command line sudo passwd userlogin Example 2: add password to user ubuntu passwd {username}