mongocli config rename¶
config rename command renames a profile so you don't have to
directly edit the MongoDB CLI Configuration File.
mongocli config rename <existing-profile-name> <new-profile-name>
Name of the profile to rename.
New name of the profile.
The command output looks similar to the following if the command succeeds. If the command prints errors, see Troubleshooting for recommended solutions.
The profile <existing-profile-name> was renamed to <new-profile-name>.
The following example uses the
mongocli config rename command
to rename the
example1 profile to
mongocli config rename example1 sample2
The preceding command prints the following output to the terminal:
The profile example1 was renamed to sample2.