You want to shut down your Raspberry Pi but you’re not sure the best way to do it.
The number one thing is you should not just unplug the power cable. Uplugging the power source before properly shutting down the OS can cause file system corruption. From the command prompt enter one of these commands to shut down (then power off).
sudo shutdown -h now