# Command to change root password

DevFeed: [Command to change root password](<https://devfeed.tech/articles/command-to-change-root-password-27621.md>)

Original publisher: [Read original article](<https://gagor.pro/2014/05/command-to-change-root-password/>)

Author: Tom

Published: 2014-05-08T00:00:00Z

Content type: tutorial

Language: en

Sources: [Tomasz Gągor](<https://devfeed.tech/sources/tomasz-gagor.md>)

Topics: [passwd](<https://devfeed.tech/topics/passwd.md>), [Command-line interface](<https://devfeed.tech/topics/cli.md>), [passwords](<https://devfeed.tech/topics/passwords.md>)

Tags: [bash](<https://devfeed.tech/tags/bash.md>), [command](<https://devfeed.tech/tags/command.md>), [command-line](<https://devfeed.tech/tags/command-line.md>), [linux](<https://devfeed.tech/tags/linux.md>), [passwd](<https://devfeed.tech/tags/passwd.md>), [password](<https://devfeed.tech/tags/password.md>), [root](<https://devfeed.tech/tags/root.md>)

## AI overview

A short tutorial shows how to change the root password from the command line without interactive input, using an echo and chpasswd pipeline.

## Source excerpt

Everybody knows passwd command but it's useless when you need to change ex. root password from command line without waiting for input. In such case oneliner below could help: echo "root:new_password" | chpasswd