How to patch update Suse Enterprise Linux server command

How do I patch and update Suse Enterprise Linux server from the command line option over ssh based session?

You need to use the zypper command to keep your system secure and upgrade installed packages including security updates. This page shows how to patch update Suse Enterprise Linux server version 12 SP 3.

ADVERTISEMENTS

Use the zypper to patch update Suse Enterprise Linux

zypper is a command line for software management. Both SUSE Enterprise Linux and OpenSUSE use the zypper command. We can use zypper for the following purpose:

  1. Install new software
  2. Update software
  3. Remove or delete unwanted software
  4. Manage repositories
  5. Perform various queries, and more.

Syntax

The syntax is as follows:
zypper command
zypper [options] command
zypper help command

Let us see common examples of zypper command.

How to refresh all repositories

$ sudo zypper refresh
SUSE Enterprise Linux Refresh all repositories

How to list available updates on SUSE Enterprise Linux server

We need to see all applicable patches, run:
zypper lp
zypper list-updates

How to update installed packages with newer versions

Let us patch update Suse Enterprise Linux server, execute:
$ sudo zypper update

Please note that there are some running programs that might use files deleted by recent upgrade. You may wish to check and restart some of them. Run the following command to list these programs:
$ zypper ps -s
zypper ps command
You can restart those services using the systemctl command:
$ sudo systemctl restart sshd

Reboot the box

First note down the current running Linux kernel version:
$ uname -mrs
Sample outputs:

Linux 4.4.114-94.14-default x86_64

You must reboot the box for the SUSE Enterprise Linux kernel update:
$ sudo reboot
OR
$ sudo shutdown -r now
Verify new Linux kernel version after the system reboot:
$ uname -mrs
Sample outputs:

Linux 4.4.126-94.22-default x86_64

Summary

And there you have it, SUSE Enterprise Linux Server version 12 SP3 patched and updated. We got a new kernel running too. Here is a summary of all of the options used so far in this tutorial:

zypper command Description Example(s)
refresh, ref Refresh all repositories. zypper ref
refresh-services, refs Refresh all services. zypper refs
list-updates, lu List available updates. zypper lu
list-patches, lp List needed patches. zypper lp
update, up Update installed packages with newer versions. zypper up
ps List running processes which might still use files and libraries deleted by recent upgrades. zypper ps -s

For more info see zypper command help page here or type the following two commands at the shell:
$ zypper help up
$ man zypper

🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source/DevOps topics:
CategoryList of Unix and Linux commands
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04

ADVERTISEMENTS
0 comments… add one

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.