how do i change the root password in Linux?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

enter "passwd root"
If you are root, just say


If you are not root, you can issue command
passwd root

as pilson66 said.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
as root user run


you will not be prompted for old password

but if you are some other user then use

passwd root

and you will be prompted for old root password
Duncan RoeSoftware DeveloperCommented:
Do you still have the old root password? The above answers only work if you do. Otherwise you have to reboot with init=/bin/bash appended to the boot command line. That gives you a root shell prompt and then you change the password as in http:#a37309842 above.
The procedure for appending to the boot line is explained here
Dmitriy SkyIT EngeneerCommented:
if you under ubuntu, you have sudo to use root permissions, do not actualy need root password, and root login, (for security), u can use
sudo -sH
sudo su

to run as root,

also sudo *command* run it as root, but without root enviroment, it's not actualy need, only if you install Oracle/or something, that use u'r system enviroment

but if you still need root pass/ or forget old

passwd root
sudo passwd

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.