Sometimes System or Network Administrator might need to reset the devices. So let’s see how we can reset juniper devices to factory default using the CLI.
Here we will reset the juniper switch to the default configuration using the load factory-default command:
This command will run in the config mode and only erase the configurations that you made and load the default configuration. In order to use this command, you need to set the root authentication password before committing the changes.
you cannot load to default config until you set the root password so Now you need to set the new root authentication password before committing the change.
root#set system root-authentication plain-text-password
Now type the root password and confirm it.
Retype new password:enteryournewrootpassword
After successfully setting the root password Now you can commit the changes you made.
configuration check succeeds
Once the commit is done the running configuration will be erased and the default configuration will be the running configuration on your device.