Google Chrome: Force Restore Previous Session from Command Line

Did you accidentally close your browser and it wasn’t set to restore the pages that were open last? Instead of being frustrated, simply use a command line switch for Chrome and restore the previous session. I do this enough that I went ahead and made a Restore Session shortcut on my desktop that sits next to my regular Google Chrome shortcut.


To do this from a command prompt, use one of the following:

Vista:

C:\Users\\AppData\Local\Google\Chrome\Application\chrome.exe --restore-last-session

XP:

C:\Documents and Settings\\Application Data\Local\Google\Chrome\Application\chrome.exe --restore-last-session

where username is the username whose profile contains the Google Chrome installation.

To create a shortcut:

1. Copy the shortcut for Google Chrome and paste it on the desktop.

2. Rename the shortcut to Restore Last Session.

3. Right-click the new icon and select Properties.

4. In the Target textbox, go to the end of the path and after chrome.exe, insert a space and input the following:
--restore-last-session

5. Click OK.

Now you have a way to restore the last session, regardless of the way you have configured Google Chrome to startup.

 

About Rob Rogers

Once a prolific author here on Tech-Recipes, Rob has moved on to greener pastures.
View more articles by Rob Rogers

The Conversation

Follow the reactions below and share your own thoughts.

35 Responses to “Google Chrome: Force Restore Previous Session from Command Line”

  1. November 21, 2008 at 6:04 am, sss said:

    it doesnt work buddy.. properties would not allowe the change and addition… is it a scam or what+

    Reply

    • March 27, 2014 at 9:53 pm, Joshua said:

      It can be a little touchy with how it works, and you may need to deviate slightly from what it show above rather than following it exactly, but it does work. For example, in the pictures, there is no ” at the end of chrome.exe but there was in my target box so I thought I had to remove it. Nope. So I thought I had to put what was shown before the “. Nope. So then I put it AFTER the ” and it worked. Even though that isn’t what is shown in the instructions. It’s called troubleshooting and I kinda fancy myself to be rather good at that.

      Reply

  2. January 03, 2009 at 1:16 am, nick said:

    or you can use FF :)

    Reply

  3. August 16, 2009 at 3:28 pm, sue said:

    nope, doesn’t work. guess i should have read the comments first, eh?

    Reply

  4. September 07, 2009 at 8:58 am, Mr Anderson said:

    works fine, thanks for the tip !

    Reply

  5. November 02, 2009 at 6:36 pm, Hector Leach Clay said:

    Wats a command prompt?

    Reply

  6. December 03, 2009 at 12:53 pm, Shotty said:

    For the shourtcut you should add ‘-restore-last-session’ at the end of the , just one dash at the beginning(without the quotes)

    From the command prompt enter C:UsersYourUserNameHereAppDataLocalGoogleChromeApplicationchrome.exe -restore-last-session, replacing YourUserNameHere with(obviously) your username.

    Reply

    • December 03, 2009 at 12:57 pm, Shotty said:

      First sentence should read “For the shourtcut you should add ‘-restore-last-session’ at the end of the target text box, just one dash at the beginning(without the quotes)”

      Should have proofread :/

      Reply

      • September 11, 2013 at 9:36 pm, ithisar said:

        Your post should have read “For the shortcut you should add ‘-restore-last-session’ at the end of the target text box, just one dash at the beginning(without the quotes)”

        Should have proofread :/

        Anyhow, doesn’t work for me either way.

        Reply

  7. January 05, 2010 at 3:58 pm, Name said:

    “I do this enough that I went ahead and made a Restore Session shortcut on my desktop that sits next to my regular Google Chrome shortcut.”

    Uh… If you do it “enough,” then why don’t you just configure Chrome to restore your session upon startup by default?

    And to the person who said “use FF,” FF is garbage. It’s bloated, slow and clunky.

    Reply

  8. May 26, 2010 at 1:41 pm, Didn't worked for me said:

    I tried man, but it did not work. I don’t have the application data folder, or I have it but in another adress. thank you

    Reply

  9. May 26, 2010 at 1:41 pm, Didn't worked for me said:

    I tried man, but it did not work. I don’t have the application data folder, or I have it but in another adress. thank you

    Reply

  10. June 28, 2010 at 11:38 am, Tam said:

    Great it just did restore my _current_ session …..

    Reply

  11. November 19, 2010 at 12:36 pm, Hotboxsnowcave said:

    Nice – works a treat. Thanks.

    Reply

  12. January 22, 2011 at 6:03 pm, Rod said:

    Worked fine here. That’s exactly what I was looking for, thanks.

    Reply

  13. March 12, 2011 at 11:42 am, Aaaaa said:

    it didn’t work buddy in windows 7 !

    Reply

  14. September 07, 2011 at 6:37 am, Tim said:

    With current version of Chrome, if you always want your last session restored, this can be achieved by simply going into Options and at the top of the Basics panel select “Reopen the pages that were opened last”

    Reply

  15. January 29, 2012 at 9:26 pm, human mathematics said:

    To everybody leaving comments like “Look in recently closed tabs” or “Set your default to open pages that were open on the last session” or “Ctrl + Shift + T”:

    that DOES NOT WORK every single time. If the system crashes it’s possible that none of the pre-set methods will work. This kind of advice is just insulting, like asking if you’ve restarted your computer. Yes: I’ve already tried that; I’m not stupid.

    Reply

  16. March 18, 2012 at 8:35 am, Samir said:

    I accidentally closed my Google Chrome window with about 12 tabs open. To restore the session, I tried the method described above and it didn’t work for me. I tried using both one and two dashes (-) in the command. That didn’t help. Maybe because I had already started a new Google Chrome window, which perhaps resulted in that the command was only restoring an empty (default) session.

    Reply

  17. March 18, 2012 at 8:36 am, Samir said:

    Then I read what “human mathematics” wrote about the command for restoring previously closed tabs, the ctrl+shift+t command. This helped! I started pressing the command once, and it restored one tab, then twice, it restored another tab, and then third time it not only restored one more tab but a whole bunch of tabs in a separate Google Chrome window. Hence, this key combo not only restores previously closed tabs within the session and window you are in currently, but it also restores tabs from previous sessions.

    Thank you “human mathematics”!

    Reply

    • June 21, 2012 at 9:40 pm, Christopher said:

      Yes! ctrl+shift+t works! Keep pressing it as it goes back through the previously closed tabs/windows!

      Thank you Samir and thank you “human mathematics”!

      Reply

    • June 21, 2012 at 9:44 pm, Christopher said:

      Yes! Ctrl+Shift+T works!! Keep pressing it until what you lost loads up as it goes through all the previously open tabs/windows!

      Thank you “human mathematics”!

      Reply

  18. April 03, 2012 at 7:27 am, Kostas said:

    It works !!!!!!!!!

    Reply

  19. April 19, 2012 at 12:20 pm, roman said:

    yes, use opera, the chrome became too buggy

    Reply

  20. May 15, 2012 at 2:48 pm, AM 2 PM_Programmer said:

    cool works like a charm ;) whose the …hole sayin its not workin … works fne in xp,vista, an win 7 not chekd in lnux & mac though ….. u need to at least whats cmd or else u r not capable of reading this article

    Reply

  21. May 24, 2012 at 5:56 am, N said:

    C:\Users\[YOU PUT YOUR USER HERE like MR___'S COMPUTER]\AppData\Local\Google\Chrome\Application\chrome.exe –restore-last-session

    then it should let you change it xD

    Reply

  22. July 04, 2012 at 6:14 am, Thea said:

    Great! Thanks for the tip! It worked after I noticed the space after exe!

    Reply

  23. July 17, 2012 at 8:46 pm, minhal shah said:

    How To Get Rid Restore Option Please Help Me!!!!!!!!!!!

    Reply

  24. August 19, 2012 at 7:38 am, suck said:

    This sucks really bad job on this redo it for us please i gonna kill my sell

    Reply

  25. September 09, 2012 at 8:00 am, krys293 said:

    if you accidentally closed your chrome browser, all you need to do is open it up again, right click on the tabs bar and select “reopen closed tab”, it will open all the tabs you had previously

    Reply

  26. September 15, 2012 at 9:24 pm, Mark said:

    Using W7 & Chrome 21.0.1180.89, this solution works well, even though not as automated as with Firefox:
    1. Settings -> On startup -> Continue where I left off.
    2. With several Chrome windows open, each with a few tabs, right-click Close all windows.
    3. Reopen Chrome – only one window will be restored.
    4. Open a new Chrome window (not tab). Bottom right click Recently closed. There’s a list not only with closed pages but also ‘XX tabs’. I start from top and click eg. ’12 tabs’. That previous window with 12 tabs is now restored.
    Start over from 4 and click next ‘XX tabs’ under Recently closed, eg. ’8 tabs’. Etc…

    Reply

  27. October 29, 2012 at 6:47 pm, mitch said:

    worked perfectly for me with XP. THANK YOU!!!

    Reply

  28. March 30, 2013 at 4:38 am, mc said:

    can it be done on mac?

    Reply

  29. June 24, 2013 at 10:38 pm, mx said:

    an easier way to restore the session is to go to the lower right corner of the new tab screen and click the recently closed tabs button. it will have all the tabs from your previous session, often in a group at the top of the list. Simply click the group and watch in awe as your previous session re-opens.

    Reply

Leave a Reply