How to enable "mirror" feature in the display settings using command line?

I'll presume that your monitors have the same resolution. Check for the names of your monitors with

$ xrandr --query
Screen 0: minimum 320 x 200, current 3840 x 1200, maximum 32767 x 32767
LVDS1 connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 382mm x 215mm
   1920x1080      60.0*+   59.9  
   1680x1050      60.0     59.9  
   1600x1024      60.2  
   1400x1050      60.0  
   1280x1024      60.0  
   1440x900       59.9  
   1280x960       60.0  
   1360x768       59.8     60.0  
   1152x864       60.0  
   1024x768       60.0  
   800x600        60.3     56.2  
   640x480        59.9  
VGA1 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
DP1 connected primary 1920x1200+0+0 (normal left inverted right x axis y axis) 518mm x 324mm
   1920x1200      60.0*+
   1920x1080      60.0 +
   1600x1200      60.0  
   1680x1050      60.0  
   1280x1024      60.0  
   1280x960       60.0  
   1024x768       60.0  
   800x600        60.3  
   640x480        60.0  
   720x400        70.1  
VIRTUAL1 disconnected (normal left inverted right x axis y axis)

So here, mine are LVDS1 and DP1. If both are active, then simply run

xrandr --output DP1 --same-as LVDS1

If only one is active, then run

xrandr --output LVDS1 --auto --primary --output DP1 --auto --same-as LVDS1