Forrest logo
back to the chage tool

chage:tldr:7de32

chage: Set account expiration date.
$ sudo chage --expiredate ${YYYY-MM-DD} ${username}
try on your machine

This command is used to change the expiry date of a user account in Linux. Let's break down the components:

  • sudo: It is a command that allows you to execute a command with administrative privileges. It stands for "Super User Do."

  • chage: It is a utility in Linux used to modify the password expiry information for a user. It primarily handles password aging, but with the --expiredate option, it also changes the account's expiry date.

  • --expiredate ${YYYY-MM-DD}: This option allows you to set a specific date (in the format of year-month-day) as the new expiry date for the user account.

  • ${username}: It is the placeholder for the username you want to modify. Replace it with the actual username without the braces.

By combining these parts, the command will change the expiry date of the user account specified by ${username} to the date given in the ${YYYY-MM-DD} format.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the chage tool