Do more on the web, with a fast and secure browser!

Download Opera browser with:

  • built-in ad blocker
  • battery saver
  • free VPN
Download Opera

A Way I Found To Install Opera Stable From The Terminal

  • Hello Opera Lovers Who Use Linux,

    Yesterday I wanted to install Opera stable, version 27, on my computer by way of the terminal. I learned how to do so, and I thought maybe another newbie might like to learn how to do so also. That's why I'm posting here. This original discussion took place in Peppermint forum, originally concerning a little bug Opera stable has when opening at first boot. If anyone can improve upon this installation method by way of the terminal, please do so. That's what Linux is all about after all.

    Here's a way to install Opera stable 27, on a 64 bit computer, from the terminal within Ubuntu, or any one of its many derivatives. If you have either a 32 bit computer or 64 bit computer, you can follow these instructions to install Opera 12.16 on your computer too! You simply copy, paste, and enter these commands within the terminal. Enjoy!

    From the terminal, add a pointer to the opera stable sources.

    sudo sh -c 'echo "deb stable non-free" >> /etc/apt/sources.list.d/opera.list'

    Install the key:

    wget -q -O - | sudo apt-key add -

    Update repo:

    sudo apt-get update

    Install Opera:

    sudo apt-get install opera

    Stop here is you are installing on a 32 bit computer, or if you only want Opera 12.14 on your computer; but anyone with a 64 bit computer can continue on to install Opera stable 27.

    Install Opera stable (for 64 bit computers only):

    sudo apt-get update

    sudo apt-get install opera-stable

    Remove and purge Opera 12.16

    sudo apt-get remove opera

    Nothing may have been removed, but that's okay.

    sudo apt-get purge opera

    Remove and clean any residual Opera and Opera stable files you do not need.

    sudo apt-get autoremove

    Again, nothing may have been removed, but, again, that's okay.

    sudo apt-get autoclean

    Keep Opera stable version 27's start page from minimizing at start up.

    Go into Opera stable's Settings > On Startup. Make sure Continue where I left off is dotted. If not, place a dot within that circle.

    That's it!

    Sources and credits:

    1. PCNetSpec, of Peppermint Forum, for his best hunch as to why Opera stable 27 wasn't opening fully at first boot; and for his improvement of the command for getting the public key for the repository. This improvement will save many a person a harmless nuisance while updating.

    2. Eric Leschinski within ask ubuntu. In my opinion his post should have gotten the green check of approval in this thread.

    1. Ruarí Ødegaard of Opera, of course!

    1. Thread of the original discussion from Peppermint forum:,1516.0.html

  • that's what i love about you ubuntu guys, your built-in faible for sudo. 😃

    you'll keep your fingertips soft and smooth by doing it the real debian way (because, as you may already have heard, ubuntu is a debian derivative originally designed for people who might get confused with the oh so many packages debian comes with):

    1. anoint yourself with root privileges:


    2. emit all the commands perknh wrote without the sudo babble, and use parameters for apt-get:

      apt-get --purge remove opera
      apt-get --purge autoremove

    3. return to your mortal state:


    and i strongly recommend that you use the --purge parameter for apt-get, because (but this you'll already know from the manpage) it removes (system wide) configuration files for packages as well. which is what the revered thread opener may have had in mind with his advice to apt-get-autoclean as a last step.

    the apt-get autoclean command acts nowhere else but on the repository, the var/cache/apt/archives directory, it simply cleans it from older package versions. but this you may not want to happen, because for some reason or another you'd like to keep older versions for a while, just in case the new ones are buggy. in this case after autocleaning the repository you'd be at a loss.

  • Note: After you've installed Opera 27, and after doing a general terminal update, if you see a message that reads something like 'Cannot find Opera's public key' -- just reenter the second command again:

    wget -q -O - | sudo apt-key add -

    This does rid the user of this pesky nuisance, although this issue sometimes goes away by itself too.

    Honestly, I don't know why this happens. My best guess is that since we've now not only installed Opera two times (the old Opera and the new Opera-stable), but we've also changed browser-engines in the process too (going from Presto to Blink), we appear to need to reset Opera's public key one more time. But, that's just my best guess.

    After rerunning the Opera's public key command, at the end of the installation, I always get an 'Okay' response, and any updating notices concerning Opera's public key go away.

    Now, a response to subhuman above:

    We owe you guys and gals at Debian a big thank you. We really do. Every day you guys and gals are in the trenches, the front lines, making life better for all the millions of users of Ubuntu and Ubuntu-based distributions that come after you.

    You guys and gals at Debian are the best!

  • After thinking about it more, and after discussing the matter with PCNetSpec* of Peppermint forum, I have an even better explanation as to why we sometimes have to add Opera'a public key a second time after installing Opera 27 stable from the terminal.

    We removed, and purged, Opera's original public key for Opera 12.16 after we installed Opera 27 stable, and this is why we now we have to add it back! That would be a better explanation.


  • i know we're the best. that's why we're so keen on helping you out with our profound knowledge of the force. where would you young padawans be without us? 😉

  • @ruario

    Hello ruario,

    I've read somewhere that Opera is now available for 32-bit computers.

    Will my method above, of installing Opera Stable through the terminal, work now for 32-bit computers too?

    Thank you,


  • Opera stable is not yet available for 32-bit, so no it won't work—it will if Opera releases a stable 32-bit Linux release.

    I also think you are making it overly complex. Install the .deb and the repository is setup for you. If you must setup the repository manually first for reasons I cannot guess, read

    P.S. I no longer work for Opera

    …the Oslo desktop team was shut down—Opera desktop development continues in Poland (along with 3 people in Nice). The vast majority of the Oslo desktop team were not offered new positions in other divisions, but a handful were. However, as I did not want to work on a non-desktop product and due to the fact that many of my closest friends lost their jobs entirely, I decided to quit. The company no longer has the same spirit that it did when I joined—at least from my personal perspective—so I felt it was time for me to go. Nonetheless, there are still many people working in Opera whom I care for deeply, including many of those who remain in the desktop team and I so wish them the best of luck.

  • Hello ruario,

    I'm sorry to hear you're no longer working for Opera. ruario, you're one the few people that inspired me to give Opera another whirl. I have always looked forward to reading your blogs and I consider your departure from Opera to be great loss for the Opera community. I do know Opera has had a checkered past concerning its employees, and now with fewer teams working in Oslo, Opera is, little by little, beginning to lose its Scandinavian charm. What's more, I'm strictly a desktop user. I have no use for a smart phone. So the Opera desktop is what is most important to me too!

    ruario, the reason why I've decided to install Opera via the command line is because I can't install Opera from my Linux repository. I consider myself to be an newbie in the world of Linux, but I do know that part of what makes Linux such a secure operating system is the strength and quality of its repositories. If a Linux user stays within the repositories, I know there's very little risk of encountering malware of any kind. Now, since there is no way to download Opera Stable from the repositories, I've found the next best thing to do is to install Opera via the command line. That's my reasoning for installing Opera in this manner. I do know downloading Opera would be the simplest thing to do. And if Opera would ever decide to go fully open source, I'll happily install Opera directly from Peppermint's (my home distro), or Ubuntu's repository when that day comes.

    ruario, all the very best to you. If you end up over at Vivaldi, or Maxthon, I'll be sure to give their browsers a try again. I feel more comfortable using a browser that I know you're standing behind.

    Thank you so much for all you've given us.


  • ruario, all the very best to you. If you end up over at Vivaldi, or Maxthon, I'll be sure to give their browsers a try again. I feel more comfortable using a browser that I know you're standing behind.

    Follow me on twitter and you will find out what I do in the future. 😉


    As of Opera 30, the commands in my first post work for both 32-bit and 64-bit computers. That said, on a 32-bit computer, these forum pages do not always render themselves correctly. If given a choice between 32-bit and 64-bit, I recommend going for 64-bit. Things work better if you do.