How to copy settings from previous using command line
Look at the tooltips, Mas Aditia, and you'll see that it's wm.copy_prev_settings. For remote deployment, it might also be necessary to quit_blender right after executing the script. So the simplest script would be:

import bpy

bpy.ops.wm.copy_prev_settings()
bpy.ops.wm.quit_blender()


Save it as to a script file with any name, and execute Blender while running the script:

blender -P &lt;script_name&gt;.py


As the operator copies the config folder right away, nothing else needs to be done.