How to update your Linux kernel and packages

To update Linux using the command line you must first determine your Linux distribution. This is because Debian and Red Hat variants use different commands.

To update a Debian based system such as Ubuntu the following commands should be entered into your terminal.

sudo apt-get update
sudo apt-get upgrade

Please note that above two commands will fetch files from the Internet or local mirrors. The location of update pages is specified in /etc/apt/sources.list (repositories). You need NOT to make any changes to this file until and unless you need extra repositories for your setup.

To update a Red Hat based system such as CentOS the following commands should be entered into your terminal.

yum -y update

Why should you update your Linux kernel?

Security

Virtually every single kernel update will have some sort of security fixes that close up holes that have been discovered. This is probably one of the most important reasons to update your kernel, as you’ll always be safer with a patched kernel.

Stability

Not only do kernel updates bring with it security fixes, but it can fix other issues that could possibly make the system crash through regular use.

For further reading on how to update Linux consider using the Linux man pages. These pages can be accessed in your terminal by using the command found below or by visiting the following website Linux Man

man [option(s)] keyword(s)
eg.
man ls

Leave a Reply

Your email address will not be published. Required fields are marked *

Post navigation