How to lock your screen from the command line

This could be very useful to you if you’re working in the terminal and need to step away for a moment. You can achieve a locked screen, just like when you do it the graphical way, with this command entered at the command line, or cli…