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.

  • sss

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

    • Joshua

      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.

  • nick

    or you can use FF :)

  • sue

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

  • Mr Anderson

    works fine, thanks for the tip !

  • Hector Leach Clay

    Wats a command prompt?

  • Shotty

    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.

    • Shotty

      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 :/

      • ithisar

        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.

  • Name

    “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.

  • Didn’t worked for me

    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

  • Didn’t worked for me

    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

  • Tam

    Great it just did restore my _current_ session …..

  • Hotboxsnowcave

    Nice – works a treat. Thanks.

  • Rod

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

  • Aaaaa

    it didn’t work buddy in windows 7 !

  • Tim

    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”

  • http://isomorphismes.tumblr.com human mathematics

    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.

  • http://www.sam.se Samir

    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.

  • http://www.sam.se Samir

    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”!

    • Christopher

      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”!

    • Christopher

      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”!

  • Kostas

    It works !!!!!!!!!

  • roman

    yes, use opera, the chrome became too buggy

  • AM 2 PM_Programmer

    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

  • N

    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

  • Thea

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

  • minhal shah

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

  • suck

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

  • krys293

    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

  • Mark

    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…

  • mitch

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

  • http://huh mc

    can it be done on mac?

  • mx

    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.