22.10.2018 - Changing the root password in CentOS. Step 1: Access the command line (terminal) Right-click the desktop, then left-click “Open in Terminal.” Or, click Menu > Applications > Utilities > Terminal. Step 2: Change the password. At the prompt, type the following, then press Enter: sudo passwd root..