Docs Menu
Docs Home
/ /
MongoDB Command Line Interface
/ /

mongocli config rename

On this page

  • Syntax
  • Arguments
  • Output
  • Example

The config rename command renames a profile so you don't have to directly edit the MongoDB CLI Configuration File.

Tip

See also:

mongocli config rename <existing-profile-name> <new-profile-name>
Argument
Type
Description
Required?
<existing-profile-name>
string
Name of the profile to rename.
yes
<new-profile-name>
string
New name of the profile.
yes

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 sample2.

mongocli config rename example1 sample2

The preceding command prints the following output to the terminal:

The profile example1 was renamed to sample2.

Back

View Available Profiles