How to update linux ubuntu

How do I update Ubuntu?

A reminder: Asking and answering your own question is super fabulous and not at all violating our policies.

5 Answers 5

If you’re using an up-to-date version of Ubuntu, and haven’t told things not to update themselves, the answer is pretty nice:

You’re doing it already.

Just hit the buttons that it tells you to hit when it tells you to hit them, and you’ll always be up to date for ever and ever.

However, if you’d like to manually update your system, you can do this:

  • run update-manager fairly frequently (read: weekly at the least).
  • For those of you who like the command line, the following will update your system.
sudo apt-get update && sudo apt-get dist-upgrade 

To keep your Ubuntu install up-to-date, run update-manager fairly frequently (read: weekly at the least).

For those of you who like the command line, the following will update your system.

sudo apt-get update && sudo apt-get upgrade — that command will update the repositories (the software list) and then install the latest updates.

Just to play pedant, I don’t think James’ quite covers the actual question (even though it’s his!)

The question asks to update software to their latest versions but updating from the standard repositories will only get you the latest version in Ubuntu. And that assumes the software is repository controlled (eg not manually installed — eg a game from the Humble Indie Bundle).

Once a major version of Ubuntu is released, the applications in repositories usually only get updates if they have major problems (including serious regressions and most commonly security vulnerabilities). You can read all about this on the Stable Release Updates page. In short, if you’re on a released version of Ubuntu, quite a lot of your software won’t be the latest version — you’ll have what has been processed and deemed important/stable enough for you to have by the Ubuntu maintainers.

If you want to keep everything at its bleeding-edge, latest version, you need to find an alternate repo that has everything packaged up for you. Bleeding-edge software will cut you at some point so it’s not really recommended and I don’t think there are any projects that aim to keep everything brand-spanking-new for Ubuntu.

If you do need the latest everything, there are other distributions like Arch and Gentoo that form «rolling releases». Packages are updated as soon as people consider them stable. This equates to less testing and more frequent breakage. But that’s what you asked for 🙂

Источник

How to Update Ubuntu Linux [Beginner’s Tip]

This tutorial shows you how to update Ubuntu for both server and desktop versions. Also learn the difference between update and upgrade.

Let me give you more details. Please note that this tutorial is valid for Ubuntu 20.04, 22.04, or any other version. The command line method is also valid for Ubuntu-based Linux distributions, like Linux Mint, Linux Lite, elementary OS, etc.

One more thing. This article is about keeping your Ubuntu system updated. If you are looking for upgrading from one release to another, please check my tutorial on upgrading Ubuntu version.

Method 1: Update Ubuntu via the Command Line

How to Update Ubuntu

First, open the terminal in Ubuntu desktop. You can find it in the menu, or use the Ctrl+Alt+T keyboard shortcut. If you are logged on to an Ubuntu server, you already have access to a terminal.

In the terminal, you just have to use the following command:

sudo apt update && sudo apt upgrade -y

It will ask for a password. You can use your account’s password. You won’t see characters on the screen while typing password in the terminal, so keep on typing your password and hit enter. This will update the packages in Ubuntu.

See, how easy it is to update Ubuntu from terminal? Now let me explain the above command.

It’s actually not a single command, it’s a combination of two commands. The && is a way to run multiple commands in Linux in a way such that the second command runs only when the previous command ran successfully.

The “-y” in the end automatically enters “yes” when the command “apt upgrade” ask for your confirmation before installing updates.

Note that you can also use the two commands separately, one by one:

sudo apt update sudo apt upgrade

It will take a little longer because you have to wait for one command to finish and then enter the second command.

More than just OS updates: Unlike Windows, Linux works with a package manager. When you run the updates, it updates all the packages installed via apt. This means updating Ubuntu will update the core operating system, Linux kernels as well as the applications installed from the software center (if they were apt packages) or installed using apt command.

Explanation: sudo apt update

This command updates the local database of available packages. If you don’t run this command, the local database won’t be updated and your system will not know if there are any new versions of packages available.

This is why, when you run the “sudo apt update” command, you’ll see lots of URLs in the output. The command fetches the package information from the respective repositories (the URLs you see in the output).

Updating Ubuntu Linux

At the end of the command, it tells you how many packages can be upgraded. You can see these packages by running the following command:

Explanation: sudo apt upgrade

This command matches the versions of installed packages with the local database. It collects all of them, and then it will list those packages that have a newer version available. At this point, it will ask if you want to upgrade the installed packages to the newer version.

Update Ubuntu Linux via Command Line

You can type “yes,” or “y,” or just press enter to confirm the installation of updates.

So the bottom line is that “sudo apt update” checks for the availability of new package versions, while “sudo apt upgrade” actually installs the new versions.

The term update might be confusing, as you might expect the “apt update” command to update the system by installing new software, but that’s not how it works.

Method 2: Update Ubuntu via the GUI [For Desktop Users]

If you are using Ubuntu as a desktop, you don’t have to go to the terminal to update the system. You can still use the command line, but it’s optional for you.

In the menu, look for “Software Updater” and run it.

Run Software Updater in Ubuntu

It will check if there are updates available for your system.

Checking if updates are available for Ubuntu

If there are updates available, it will give you the option to install the updates.

Install Updates via Update Manager in Ubuntu

Click on “Install Now.” It may ask for your password.

Installing Updates in Ubuntu Linux via GUI

Once you enter your password, it will start installing the updates.

Updating Ubuntu via GUI

In some cases, you may need to reboot your Ubuntu system for the installed updates to work properly. You’ll be notified at the end of the update if you need to restart the system.

Updating Ubuntu via GUI

You can choose to restart later if you don’t want to reboot your system straightaway.

Installing updates via GUI in Ubuntu

Tip: If the software updater returns an error, you should use the command “sudo apt update” in the terminal. The last few lines of the output will contain the actual error message. You can then search on the internet for that error and fix the problem.

A few things to keep in mind about updating Ubuntu

You just learned how to update your Ubuntu system. If you are interested, you should also know these few things relating to Ubuntu updates.

Cleaning up after an update

After an update, your system may have some unnecessary packages that are no longer required. You can remove such packages and free up some space by using this command:

Live patching the kernel in Ubuntu Server to avoid rebooting

In the case of Linux kernel updates, you’ll have to restart the system after the update. This can be a problem if you don’t want downtime for your server.

The live patching feature allows for the patching of the Linux kernel while it is still running. In other words, you don’t have to reboot your system.

If you manage servers, you may want to enable live patching in Ubuntu.

Ubuntu version upgrades are different from package upgrades

The update methods discussed here keep your Ubuntu install fresh and updated. It doesn’t cover OS version upgrades (for example, upgrading Ubuntu 16.04 to 18.04).

Ubuntu version upgrades are an entirely different thing. They involve updating the entire operating system core. You’ll need to make proper backups before starting this lengthy process.

Conclusion

I hope you liked this tutorial on updating the Ubuntu system, and that you learned a few new things.

If you have any questions, please fee free to ask. If you are an experienced Linux user and have some tip that can make this tutorial more useful, please share it with the rest of us.

Источник

Upgrade Ubuntu desktop

Being able to upgrade Ubuntu from one version to the next is one of Ubuntu’s best features. You benefit from getting the latest software, including new security patches, and all the upgraded technology that comes with a new release without having to reinstall and reconfigure your system.

When can I upgrade?

Ubuntu users are prompted to upgrade at different times depending on their current release.

Users on interim releases such as Ubuntu 21.10 are prompted to upgrade within a few days of the next Ubuntu release becoming available. This prompt may happen automatically, or when checking for new updates.

Users on a Long Term Supported release such as Ubuntu 20.04 LTS will be prompted to upgrade once the first point release of the following LTS is available. For Ubuntu 22.04 LTS this prompt will appear once Ubuntu 22.04.1 LTS is available.

Note: Ubuntu 22.04.1 LTS is now available and the upgrade prompt will now appear for all users.

Getting ready to upgrade

Before proceeding ensure that your software is up to date by running:

sudo apt update
sudo apt upgrade

From your terminal, entering your password and pressing Y when prompted.

Also ensure that all of your user data has been backed up. Whilst it is unlikely that data will be lost during the upgrade process, it’s better to be safe than sorry.

2. Launch the software updater

You can find the Software Updater in your application menu. This will check for updates and prompt you to upgrade if it finds a more recent Ubuntu release. If no upgrade prompt appears, you are either on the latest version of Ubuntu or upgrades to the newest release have not yet been enabled.

Please Note: If you are trying to upgrade to an interim release in future (such as the upcoming Ubuntu 22.10). You may need to change your Update settings for the prompt to appear. See ‘Upgrading to interim releases’ at the end of this tutorial.

If the Software Updater finds additional updates, install them prior to upgrading and restart your machine if needed.

Once you have no additional updates to apply. Click Upgrade… to proceed.

3. Follow the upgrade flow

From this point on, the upgrade UI will guide you through the process. First you will see a link to the release notes for the target release, detailing the newest features, improvements and known issues.

Click Upgrade to continue.

This will take you to an overview window showing you the progress of the upgrade.

As this progresses through the stages you will receive some additional prompts to progress once the upgrade requirements have been gathered.

Click Start Upgrade to continue.

To prevent the OS locking during the process, the lock screen will be disabled.

Click Close to continue.

Once the newest packages have been installed you’ll be prompted to remove the obsolete packages from the previous Ubuntu release.

You can choose to keep them, but by default it’s okay to click Remove to progress.

Despite the warning that removing packages can take several hours, this is extremely unlikely and after a minute or two you will be prompted to restart your system to complete the upgrade.

Click Restart Now to complete the upgrade

4. Enjoy your shiny new Ubuntu!

That’s it! Your machine may be slower to reboot during this final step as it completes the initial configuration but after that you’ll be up and running with the latest release of Ubuntu. We hope you enjoy all the new features and functionality it has to offer!

Help is always at hand.

If you have any issues with your upgrade process, or get stuck along the way, you can always reach out to our community.

5. (Optional) Upgrading to interim releases

Ubuntu 22.04 LTS is a Long Term Supported release and recommended for users looking for a stable development environment. Interim releases give users a chance to preview new features and updates ahead of the next LTS release. Interim releases are supported for 9 months and designed for users who want access to the lasted and greatest in Ubuntu.

If you want to be prompted to upgrade to the next interim release — Ubuntu 22.10 — which will be available later this year then you can enable it in the ‘Software & Updates’ app.

Navigate to the ‘Updates’ tab and change the menu option titled ‘Notify me of a new Ubuntu version’ to For any new version.

With this setting applied you will receive the same upgrade prompt for Ubuntu 22.10 as we saw at the beginning of this tutorial, once it has been officially released.

Источник

Читайте также:  Kali linux virtualbox drag and drop
Оцените статью
Adblock
detector