Can I log out from my Mac using Terminal.app?

Is there a command I can issue in Terminal.app to log myself out? I'm just looking for a command-line equivalent of Apple >> Log Out. I would like to script this action so I can add it to my dock. Thanks.

Hi--
I wasn't able to find a way to completely log out via the Terminal (i.e., quit all apps and go back to the login window), though I did find a way to suspend the current login session (your apps are still running when you come back, much like with fast user switching):
<pre class="command">/System/Library/CoreServices/Menu Extras/User.menu/Contents/Resources/CGSession -suspend</pre>
You can also log out via AppleScript:
<pre class="command">tell application "System Events" to log out</pre>
Just save it as an application and put it on your Dock. I didn't do much testing, though, so I don't know if it'll quit your apps for you cleanly. Basically, I just got to the point where the dialog came up and left it at that.
charlie

Similar Messages

  • HT4865 I just bought this ipad and cannot log out from icloud because i dont have the password.how can i log out from icloud?need help

    I just bought this ipad and cannot log out from icloud because i dont have the password.how can i log out from icloud?need help

    You need to return it to the seller and get your money back.  You cannot reset or use the device with another AppleID installed unless you know the password for that ID.
    If the device has been jailbroken, no one on here can give you any further help...the Terms of Use prohibit us from doing so.

  • HT201356 I have accidentally deleted my alternate iCloud (email) address. Are there any possibilities to retrieve it back because my iPad is connected to that email address, and now, I can't log out from it on my iPad, because it doesn't exist?

    I have accidentally deleted my alternate iCloud (email) address. Are there any possibilities to retrieve it back because my iPad is connected to that email address, and now, I can't log out from it on my iPad, because it doesn't exist.
    I have alternate icloud email attached to my iPad and I accidentally delete it from appleid.apple.com. And now I can't log out that iCloud account because it doesn't exist and it can't recognize my password.

    If you mean that Find My Phone is asking for a password to a different Apple ID to your current Apple IDand that ID is a previous version of your current ID, not an entirely different one.
    This feature has been introduced to make stolen phones useless to those that have stolen them.
    However it can also arise when the user has changed their Apple ID details with Apple and not made the same changes to their iCloud account/Find My Phone on their device before upgrading to iOS 7, or if you restore from a previous back up made before you changed your details and some other circumstances.
    The only solution is to change your Apple ID back to its previous state with Apple at My Apple ID using your current password, you don’t need access to this address if it’s previously been used with your Apple ID, once you have saved these details enter the password as requested on your device and then turn off "find my phone" and delete the account from your device. It may take a short while to remove the account.
    You should then change your Apple ID back to its current state, save it once again and then log back in using your current Apple ID. Finally, turn "find my phone" back on once again.
    This article provides more information about Activation Lock.

  • HT201363 How can i log out from game center? im using iphone5

    Please help, thank you

    Hi danleo!
    Here is an article that can tell you how to log out of Game Center:
    Using Game Center
    http://support.apple.com/kb/ht4314
    You can change the account you are signed into by:
    iOS: Tap Settings > Game Center.
    OS X: Click the Me tab in the Game Center app and click on your Account.
    Thanks for coming to the Apple Support Communities!
    Regards,
    Braden

  • Hello there. i lost my Ipad and i need to log out all email and facebook. Also is there any chance get my diary somehow. how can i log out from my Ipad? please help, i have very important information and other stuff in my Ipad?

    I need help to log out from my stolen Ipad. please help.

    If you had installed iOS 7 it would be Activation locked, but I see you only have iOS 5. You do have a backup of you iPad files on your computer or iCloud, don't you?
    If the iPad was running iOS 7, the thief/finder will not ever be able to use it.
    iCloud: Find My iPhone Activation Lock in iOS 7
    http://support.apple.com/kb/HT5818
    Apple (and no one else) can not assist (with serial number or iCloud) in finding a lost or stolen iPad.
    Report to police along with serial number. Change all your passwords.
    These links may be helpful.
    How to Track and Report Stolen iPad
    http://www.ipadastic.com/tutorials/how-to-track-and-report-stolen-ipad
    Reporting a lost or stolen Apple product
    http://support.apple.com/kb/ht2526
    What to do if your iOS device is lost or stolen
    http://support.apple.com/kb/HT5668
    How to Find a Missing iPad with FindMyiPad
    http://www.dummies.com/how-to/content/how-to-find-a-missing-ipad-with-findmyipad .html
    iCloud: Locate your device on a map
    http://support.apple.com/kb/PH2698
    iCloud: Lost Mode - Lock and Trace
    http://support.apple.com/kb/PH2700
    iCloud: Remotely Erase your device
    http://support.apple.com/kb/PH2701
    Report Stolen iPad Tips and iPad Theft Prevention
    http://www.stolen-property.com/report-stolen-ipad.php
    General steps to follow for a Stolen iPad
    http://stolen-ipad.com/
    How to recover a lost or stolen iPad
    http://ipadhelp.com/ipad-help/how-to-recover-a-lost-or-stolen-ipad/
    How to Find a Stolen iPad
    http://www.ehow.com/how_7586429_stolen-ipad.html
    What NOT to do if your iPhone or iPad is lost or stolen
    http://www.tomahaiku.com/what-not-to-do-if-your-iphone-or-ipad-lost-or-stolen/
    Apple Product Lost or Stolen
    http://sites.google.com/site/appleclubfhs/support/advice-and-articles/lost-or-st Len
    Oops! iForgot My New iPad On the Plane; Now What?
    http://online.wsj.com/article/SB10001424052702303459004577362194012634000.html
    If you don't know your lost/stolen iPad's serial number, use the instructions below. The S/N is also on the iPad's box.
    How to Find Your iPad Serial Number
    http://www.ipadastic.com/tutorials/how-to-find-your-ipad-serial-number
    iOS: How to find the serial number, IMEI, MEID, CDN, and ICCID number
    http://support.apple.com/kb/HT4061
    Check the serial number (located on back/bottom) in this lost/stolen iPad database. However, most owners are not aware of this database and don’t enter the serial number.
    Stolen iPad Database
    http://www.stolenlostfound.org/online-stolen-ipad-database
    Also do a search, using the serial number, on your local Craig’s List. Some users list the serial number of a stolen iPad to thwart the sale of a stolen device.
     Cheers, Tom

  • I can't log out from a gmail acount on firefox. Support suggested to activate cookies, but they were anyway activated and I can't find any solution.

    While I am trying to log out from a gmail account on firefox , a new tab pops out informing me about problem with the cookies options. I couldn't follow the instructions in the tab, because I couldn't find anything of the suggestion in the options menu. Then I checked everything that online mozilla support suggested and nothing seems to be wrong with the cookies, they are activated. I don't know if this is connected with this problem, but the account that I am trying to log out is not mine, it belongs to a friend that has ever logged in before through my firefox until yesterday, and since then I am stuck with her account and basicly I can't even have acces to my emails. I think that's all.
    Thank you!!

    Type '''about:preferences#privacy''' <enter> in the address bar.
    The button next to '''History,''' select '''Use Custom Settings'''.
    Under History, turn on '''Accept cookies from sites''' and '''Accept third-party cookies.'''
    You may have a corrupt '''cookies.sqlite''' file.
    Type '''about:support''' in the address bar and press enter.
    Under the page logo on the left side you will see '''Application Basics.'''
    Under this find '''Profile Folder.''' To it’s right press the button
    '''Show Folder.''' This will open your file browser to the current
    Firefox profile. Now '''Close Firefox.'''
    Locate the '''cookies.sqlite''' file. Then rename or delete it. Restart Firefox.

  • How can i log out from icloud without losing any document?

    I want to create a new icloud account, but first I need to delete the previous one without losing my documents.

    On your mac, use Pages or whichever app is needed for the specific document and save it locally instead of in icloud.  Then disconnect your iOS device from the account.  You can later sync the document via itunes.

  • How can i log out from my social media from a distance because my iPod got stolen and i don't want anyone hacking my accounts

    how do i log out of my social media from a distance because my ipod got stolen and i dont want any one hacking in to my account??

    Change your password.

  • HT4314 How can I log out someone who's using my Game Center account from another device?

    So my friend got hacked and the guy who hijacked her account stays loged in to her account, and even if when she changes all her Game Center and apple account info it doesn't log the hacker out of her account...
    So what can she do..? Please help us it's really important and urgent!
    P.S the game is Clash of Clans.

    Hi Benishty,
    Thanks for visiting Apple Support Communities.
    I would recommend that they use this article to contact Apple Support if it seems like their Apple ID has been compromised:
    Apple ID: Contacting Apple for help with Apple ID account security
    http://support.apple.com/kb/HT5699
    Best Regards,
    Jeremy

  • I can't imassage from my original imessage email it says its in use already. how can i log out from other devices ?

    ......

    The idea to jumpstart by change was not the smartest one, but gives you an opportunity to use that "temporary" account as permanent. You do not have a choice cause obviously despite you thinking that old account is no more -it does exist on Apple servers. And if you are unwilling to share your [email protected] with friend, just create one extra [email protected] for your friend. One suggestion - do not use gmail.

  • Can't log out from iCloud

    Hi. I have a problem. Several times a day, my iPad try to log it self into iCloud on a mail I don't use anymore. And the problem is, that I can't remove it, cuz I don't have the password anymore. I've tried to recover it, but it won't send any mail to do so. So how should I do? Seems impossible to fix this :( and it's a big pain in the ***!

    Hello there, Martiniswe.
    The following Knowledge Base article should provide assistance with your issue:
    iOS 7: If you're asked for the password to your previous Apple ID when signing out of iCloud
    http://support.apple.com/kb/TS5223
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro D.

  • If I am backing up my iPhone, can I close out of settings and use other apps?? Or does it stop the backup. Also, do I have to contstantly keep the screen on while its backing a

    ?

    I understand all of this Meg; that is why I bought an Iphone; but never expected my phone not even give a at least a 24 or even 12 hours....I work 12 hour shifts and also would expect to have to charge each night but not twice a day or more.  I am not always somewhere I can charge my phone.
    Your points are true; however it doesn't help me......

  • Can I log off from a distance?

    I left my tablet at a friends house and my Skype account is still logged on. What can I do about that? Would it help if i changed my password or can I log out from a distance or something?

    CTVS wrote:
    I left my tablet at a friends house and my Skype account is still logged on. What can I do about that? Would it help if i changed my password or can I log out from a distance or something?
    Hello and welcome to the Skype Community.
    If you know your username and password you can log in from any device anywhere.
    TIME ZONE - US EASTERN. LOCATION - PHILADELPHIA, PA, USA.
    I recommend that you always run the latest Skype version: Windows & Mac
    If my advice helped to fix your issue please mark it as a solution to help others.
    Please note that I generally don't respond to unsolicited Private Messages. Thank you.

  • How can i log out on Facebook?

    How can i log out on facebok

    Log out of Facebook where, on Safari, on one of the Facebook apps (and if so which one) ? If Safari then touch the Account button top right and select Log Out, if you are using an app then saying which one would be useful

  • Possible scenarios Extension Mobility can get logged out

    I'm trying to determine what are the possible causes a user can get logged out from the Extension Mobility session?
    I know one of it is when the maximum login time is reach, the user will get logged out but what other scenario's can a user get logged out?

    Hi,
    One reason is listed in the link below
    http://www.cisco.com/c/en/us/support/docs/unified-communications/unified-communications-manager-callmanager/18772-extension-mobility.html#logsout
    Just want to add that a phone reset / restart or deactivating extension mobility service will not result in the logout of the IP phone from extension mobility logged in profile.
    HTH
    Manish

Maybe you are looking for

  • Age analysis for stock materials

    I needs to have a z report on age analysis of all the stock materials, the hitch being – they do not have batch mgmt active. Age analysis is needed from a period to a period, e.g. - current quarter.

  • Some music not syncing from iTunes to iPod Touch

    I downloaded music from two different artists recently. I created playlists for both. I changed the number ordering on the playlists a bit. And now I no longer have those artist's music on my iPod. I have tried: * Restoring original settings * Double

  • Multiplexing error

    Has anyone discovered a way to solve this problem? I have never had issues using iDVD and suddenly this problem has popped up. I have tried what others suggested but they have not worked. My project is 77 mins long and exported from FCP. I keep getti

  • Material aging table

    Hi experts, Can any one tell me what is the exact table to display "Material aging"? points guaranteed cheers kaki

  • Form compilation Error in Oracle R12

    Dear All i am Facing a Problem during compilation of forms (10g) over oracle EBS R12. My Operating System is 'Linux'. Following is the command for compilation: [oracle@dell US]$ frmcmp_batch module=FORM_NAME.FMB userid=apps/apps output_file=/u01/orac