Create lock screen alias in Mac terminal

You can use a terminal command to lock the screen in Mac.

To do that you need to add the following like to your bash_profile (otherwise every time you restart, you’ll lose the changes).

A) I don’t have bash_profile

Create the file:

B) I have bash_profile

Edit the file (the name might vary depending on that you set the moment you created it):

Add the following line (you can change the “lock” keyword to something else):

Save the file.

Leave a Reply

Add <code> Some Code </code> by using this tags.

*
*