How to Log Out of Your Mac Using Terminal
Apple makes it simple to log off of your Mac with the choice within the desktop’s menu bar. But there are additionally a pair of instructions you should utilize to log off utilizing Terminal, as we’ll uncover right this moment.
One means of logging out of your consumer account is by operating a command to terminate the loginwindow process. To get began, you’ll want to open Terminal. You can rapidly do that utilizing Spotlight Search.
Click the magnifying glass icon to the suitable of the desktop’s menu bar (or press Command+Space) to launch Spotlight Search.
The Spotlight Search bar will seem. Type “Terminal,” after which press the Return key or click on “Terminal” within the search outcomes.
Terminal will launch. Now, run this command:
sudo pkill loginwindow
Next, enter your account password and press the Return key.
This will terminate the loginwindow course of, efficiently logging you out of your consumer account.
launchctl instructions are a set of instructions that management the launchd process. You can discover a record of launchctl instructions by operating
launchctl assist in Terminal, however we would like to use the one which logs you out of your consumer account.
Before we begin typing instructions, you’ll want to know your consumer ID. To discover it, open Spotlight Search (click on the magnifying glass icon within the desktop’s menu bar or press Command+Space) and kind “Users & Groups” within the search bar. Press the Return key or click on “Users & Groups” within the search outcomes.
Click the padlock within the bottom-left nook of the window that seems.
Now, enter your account password and click on “Unlock.”
Next, right-click your account within the “Current User” group within the left-hand pane, after which click on “Advanced Options.”
Finally, take a word of your consumer ID. You’ll want this for the command.
With consumer ID in hand, open Terminal (use Spotlight Search to seek for “Terminal” to open the app). In Terminal, run the next command (changing
<consumer id> along with your ID famous earlier):
launchctl bootout consumer/$(id -u <consumer id>)
You’ll now be logged out of your consumer account.
This is only one of the various issues that you are able to do with Mac’s Terminal. You also can do issues like lock your Mac and even shut it down. Keep studying these primary instructions and also you’ll be a hacker very quickly!
This Web site is affiliated with Amazon associates, Clickbank, JVZoo, Sovrn //Commerce, Warrior Plus etc.