I am a new OpenSUSE Linux server user. How do I upgrade and update OpenSUSE Linux software and kernel from the CLI? How do I use the command line tool to upgrade your system to the latest version of openSUSE software and kernel?
Introduction : You can use zypper or yast2 command for managing and updating installed software including Linux kernel on OpenSUSE Linux. This page demonstrates how to run a zypper command to upgrade OpenSUSE Linux system.
How do I update OpenSUSE Linux software and kernel from command line?
- Open the terminal application.
- Log in to the server using ssh command as follows
ssh [email protected]
- Refersh OpenSUSE repository from the Internet, execute:
sudo zypper refersh
- Upgrade OpenSUSE Linux, type:
sudo zypper update
Let us see all commands in details.
What is a zypper command in OpenSUSE?
zypper is nothing but a command line package manager. It is equivalent to apt command/apt-get command on Debian/Ubuntu or yum command on a CentOS/RHEL. One can use the zypper command for:
- Install new packages
- Delete or remove software
- Update Linux kernel on OpenSUSE
- Update all installed packages with newer available version and more
How to update OpenSUSE system to the latest packages
First, Verify that repos are enabled, run:
$ zypper repos --uri
Repository priorities are without effect. All enabled repositories share the same priority. # | Alias | Name | Enabled | GPG Check | Refresh | URI
1 | openSUSE-Leap-15.0-1 | openSUSE-Leap-15.0-1 | Yes | (r ) Yes | Yes | http://download.opensuse.org/distribution/leap/15.0/repo/oss/
2 | openSUSE-Leap-15.0-Update | openSUSE-Leap-15.0-Update | Yes | (r ) Yes | Yes | http://download.opensuse.org/update/leap/15.0/oss/
3 | openSUSE-Leap-15.0-Update-Non-Oss | openSUSE-Leap-15.0-Update-Non-Oss | Yes | (r ) Yes | Yes | http://download.opensuse.org/update/leap/15.0/non-oss/
How to refresh OpenSUSE Linux repositories
sudo zypper refresh
sudo zypper ref
How to list all applicable patches for OpenSUSE
sudo zypper list-patches
sudo zypper lp
Howo to list all available updates on OpenSUSE Linux
sudo zypper list-updates
sudo zypper lu
How to upgrade OpenSUSE system to the latest packages and kernel
Execute the following command:
sudo zypper update
sudo zypper up
At the end you will see message as follows:
There are some running programs that might use files deleted by recent upgrade. You may wish to check and restart some of them. Run ‘zypper ps -s’ to list these programs.
You can view outdated process by running the following command:
$ zypper ps -s
Restart outdated process one by one using the systemctl command:
$ sudo systemctl restart sshd
Or simply reboot the Linux system by running:
$ sudo reboot
$ sudo shutdown -r now
A note about YaST/YaST2 online update command line tool
YaST is universal configuration utility and comes with both GUI and TUI. Just run the following command to apply severe security updates:
$ sudo yast2 online_update
This page explained how to install updates on openSUSE Linux to keep your system secure. For more info see this page or type the following man command to read more about zypper tool: