It is almost weekend and you want to try another Linux distribution? We’ve got you covered!
The Linux ecosystem is a varied one with hundreds of distributions, each having their unique set of abilities and limitations. Some compile the source on your system, others let you choose between init systems, try to be as small as possible, experiment with security solutions and more. There is also variation in governance: some are strongly top-down organized, others decide in a meritocratic way or vote. Some have strong corporate sponsor pushing decisions – others don’t. Some care to collaborate, others don’t value the wider ecosystem much and go their own way.
The variety in solutions shows people want different things and the different distributions provide that. But people change, so do their needs. And so, for those looking for Greener pastures, we wrote this articles with an overview of ‘the openSUSE way’ and the major differences between our tools and those from other major distributions.
The Green Way
Like all distributions, we have our goals and target users, best defined as ‘providing a reliable workhorse for IT professionals’. And we strive to deliver that by developing it openly, in a collaborative fashion, and without anyone telling others what to do. See our strategy if you care for more details on our philosophy.
openSUSE 12.3 was released last week and by now, many in our user base have moved over to it already. If you’ve never used openSUSE but are familiar with other distributions, you’ll have a little adaptation to do, but nothing too bad. We’ll present you the major things in which openSUSE is unique here while further below we have lists of command equivalents between openSUSE and other distributions.
Choice
We want to offer sensible options. As an example, we ship the major Linux desktops on equal footing: GNOME, KDE, XFCE, LXDE and Enlightenment. KDE as default merely means having preselection in the installer, making it easier for new users to click ‘next, next, next’. Just as we ship Firefox as default browser – but offer plenty of others on our servers. We also ship a choice of kernels and have shipped both MariaDB and MySQL for ages. But we don’t go as far as offering different init systems: there are few if any use cases for that so it is simply not worth the extra work and complexity in our opinion.
In short, we don’t limit options for the sake of simplicity. We strive to offer flexibility and choice where it offers a tangible benefit but make decisions where it makes sense. All in the spirit of putting our users firmly in the driver seat!
Tools
openSUSE has its own collection of tools which make the flexibility of our distribution easy to access and prevent it from getting in the way of getting things done.
YaST
Most notable of these tools is YaST2. YaST offers a set of configuration tools for a variety of tasks. Unique about YaST is that it offers both graphical as well as ncurses interfaces and even a (slightly more limited) web interface for remote administration. In its infancy, YaST was a bit of a control freak, sometimes overwriting user changes to configuration but growing up it learned to play nice with administrators.
YaST2 is simple to use – look it up in a menu or a command runner and give your root password. It is also the first thing you meet once you decide to install openSUSE since it runs the whole installation process. The many wizards and configuration tools are rather self-explanatory. Keep in mind that you can install more YaST packages– visit the software management tool and just search for yast. You’ll surely find some surprises: UI’s to manage things like TFTP, squid, setting up DNS, NIS, LDAP, mail and kerberos servers, a host of security and enterprise tools and more. YaST is easy-to-use but provides for advance users and helps those who want to learn.
Not all is rosy in YaST2 land, as the tool is beginning to show its age. The UI-independent toolkit and multitude of language bindings are nice but bring their share of issues as well and few developers are fluent in writing YaST components.
Package Management
openSUSE uses rpm as low-level package handler and zypper as easier frontend, plus a YaST2 module, yum, apt4rpm and PackageKit as options. Zypper is a very powerful and efficient package manager. It deals with dependency corner cases arguably better than any competing packaging tool, is incredibly fast doing it and offers a helpful and easy interface to the end user.
patterns
zypper & friends offer patterns to deal with the installation of groups of packages. These can be recognized by the pattern- prefix and for example WebYaST and its most important modules can be installed by issueing zypper in patterns-openSUSE-webyast in a root terminal. A more pro-tip is that zypper has multi-package-support, by default enabled for the kernel. This makes sure that zypper always keeps the current kernel on your system until you’ve booted in the new one successfully; and it can be made to keep for example the last 2 kernels around if you prefer some more certainty. Zypper’s speed and versatility in handling package dependencies and corner cases is especially relevant in the light of another unique openSUSE technology: the Open Build Service.
Getting more software
software.opensuse.org offers about 200.000 packages build by thousands of contributors on build.opensuse.org, a public instance of the Open Build Service. Package installation is made easy through the openSUSE 1-click install technology. You can read more about OBS and the packages there in this article from last week.
Patented stuff and multimedia codecs
If you’re looking for patented stuff, check out the openSUSE Community site.
Installation and image building
One important capability YaST offers both during installation and on already running system is building and handling LVM (Logical Volume Manager) and RAID (Redundant Array of Inexpensive Disks) systems.
LVM enables flexible distribution of hard disk space over several file systems. It was developed because the need to change the segmentation of hard disk space might arise only after the initial partitioning has already been done during installation. YaST recognizes existing LVM setups and allows you to create and manage them during installation and on already installed systems.
RAID, or Redundant Array of Inexpensive Disks, is a system which allows two or more hard disks to be combined to increase storage space, use redundancy to protect against hardware failures, or both–while increasing overall disk performance. YaST can see and manage RAID setups as well as help you create them via ‘Software RAID’. YaST supports RAID levels 0, 1, 5, 6 and 10.
Find documentation for LVM and RAID here.
Important: Every time you use these or other potentially dangerous tools, YaST will give you a fair warning before executing any destructive actions but in the end, it is in your hand!
Distribution building tools
Apart from a Free operating system the openSUSE Project develops the tools around our distribution in an effort to lower the barrier to distribution building. Our goal is to allow others to build packages and operating systems themselves for private use, business or community purposes. The most prominent of these tools are the Open Build Service and Kiwi.
KIWI
The openSUSE KIWI Image System provides a complete operating system image solution for Linux supported hardware platforms as well as for virtualisation systems like Xen, Qemu or VMware. With KIWI you can do things like:
- Create a tuned server appliance, containing your application and just enough operating system components.
- Spin a live CD or DVD with just the packages and software you need.
- Create a ready-to-run VMware virtual appliance.
- Create a live USB key and carry your Linux system with you wherever you go.
- Build a hard disk image for preloading onto hardware.
- Build a new openSUSE project like openSUSE Medical
- and much more …
Of course many of you maybe already be familiar with the famous SUSE Studio that does most of that in a simpler ‘lego’ way through its web frontend to KIWI.
Open Build Service (a.k.a OBS)
The Open Build Service is a generic system to build and distribute binary packages from sources in an automatic, consistent and reproducible way. You can release packages as well as updates, add-ons, appliances and entire distributions for a wide range of operating systems and hardware architectures. It provides all the tools to work collaboratively and harness the power of the open source development model. You can set fine grained access rights, branch code, send merge requests and review submissions. All that of course under the GNU General Public License (GPL). It’s available for you as source, packages and as easily deployable appliance. You are free to use, fix, extend and re-use the code.
The differences
Now, let’s go over the distributions and try to give you some quick insights in the major differences. Pick your distribution to see a list of command line equivalents:
Ubuntu, Debian
Coming from Ubuntu/Debian, you will notice openSUSE has a slightly different filesystem layout and uses a number of different tools. YaST has already been mentioned, another is systemd as init system. We also do not use sudo for executing super user commands but instead you should issue the su command to create a permanent superuser login in the terminal.
package management
Zypper almost always has a ‘long’ and a ‘short’ version of commands, for example zypper install can be shortened to zypper in and zypper update can be issued as zypper up. In this table we’ll use the ‘long’ commands, just type zypper help to find the short versions. Zypper provides more in-depth help on each command if you issue it like this: zypper help <command>.
Ubuntu command | openSUSE command |
apt-get update | zypper refresh |
apt-get -u upgrade | zypper update |
apt-get -u dist-upgrade | zypper dist-upgrade |
apt-get install amarok | zypper install amarok |
apt-get remove amarok | zypper remove amarok |
apt-cache search amarok | zypper search amarok |
apt-cache showpkg amarok | zypper info amarok |
dpkg -l | rpm -qa |
dpkg -L | rpm -ql |
dpkg -s | rpm -qi |
dpkg -S | rpm -qf |
adding apt repository in /etc/apt/sources.list | zypper addrepo <repository><name> |
apt-get moo | zypper moo |
Some more advanced functionality:
Ubuntu command | openSUSE command |
apt-file search | zypper wp |
apt-get autoremove | zypper rm –clean-deps <package> (only cleans specific package’s dependencies) |
apt-get clean | zypper clean |
apt-get source package | zypper source-install <package> (also installs build dependencies) |
(use chroot) | zypper –root <location>– operate on different root |
cat /var/log/dpkg.log | cat /var/log/zypp/history |
Apt package locks | zypper addlock/listlocks/removelock |
Installing recommended packages | zypper install-new-recommends |
Tip: after running an update, zypper ps lists processes which have received updates and might have to be restarted. Zypper does, by and large, not automatically restart processes to not interrupt your work, but after big updates it is strongly recommended to at least log out and log in again from the graphical desktops.
systemd and boot management
openSUSE uses the init system systemd instead of Ubuntu’s upstart, sharing development resources between distributions like Arch, Fedora and others. Below some systemd-equivalents for upstart commands.
Ubuntu command | openSUSE command |
ls /etc/init.d | systemctl list-unit-files –type=service |
initctl list | systemctl |
start <service> | systemctl start <service> |
stop <service> | systemctl stop <service> |
status <service> | systemctl status <service> |
update-rc.d <service> disable (or editing file by hand if converted to upstart) | systemctl disable <service> |
update-rc.d <service> enable (or editing file by hand if converted to upstart) | systemctl enable <service> |
Runlevel handling
In systemd runlevels are exposed via “target units”. You can change them like this:# systemctl isolate graphical.target
This will only change the current runlevel, and has no effect on the next boot.
The symlink /etc/systemd/system/default.target
controls where we boot into by default. Link it to the target unit of your choice. For example, like this:# ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target
or# ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target
To add actions to be run after booting the system, add them to the /etc/rc.d/boot.local file.
journald
openSUSE is in the process of replacing current logging tools with a more advanced solution: journald. A few typical commands:
Ubuntu command | openSUSE command |
cat /var/log/messages | journalctl |
tail -f /var/log/messages | journalctl -f |
Use journalctl –help for some more abilities of journald. Note that while the conversion is taking place, the ‘old’ ways keep working: you can still use dmesg and tail -f /var/log/messages. Until journald integration is considered complete, we will not compromise these functions. Learn more about using journalctl here and here.
Go back up to the list of distributions
Coming from Gentoo
Gentoo lets you customize your distribution to the level of binary compilation. As openSUSE is a binary distribution it does not go this far, but if you want to apply your own patches or disable/enable some extra features, you are encouraged to use the Open Build Service. You can link a package from openSUSE:12.3 to your home, do the desired modification and use the package from your home repository.
package management
Zypper almost always has a ‘long’ and a ‘short’ version of commands, for example zypper install can be shortened to zypper in and zypper update can be issued as zypper up. In this table we’ll use the ‘long’ commands, just type zypper help to find the short versions. Zypper provides more in-depth help on each command if you issue it like this: zypper help <command>.
Gentoo command | openSUSE command |
emerge –sync | zypper refresh |
emerge –newuse –deep –update world | zypper dist-upgrade |
emerge amarok | zypper install amarok |
emerge =amarok-2.8.7 | zypper install amarok=2.8.7 |
emerge –unmerge amarok | zypper remove amarok |
emerge –fetchonly | zypper –download-only |
emerge –search amarok | zypper search amarok |
glsa-check -l affected | zypper lp –cve |
emerge –depclean | zypper remove –clean-deps |
layman -a <repository> | zypper addrepo <repository><name> |
Tip: after running an update, zypper ps lists processes which have received updates and might have to be restarted. Zypper does, by and large, not automatically restart processes to not interrupt your work, but after big updates it is strongly recommended to at least log out and log in again from the graphical desktops.
Click here for tips on using systemd and journald.
Go back up to the list of distributions
Coming from Arch
Arch Linux is known for its simplicity and rolling updates. As it has adopted systemd, the management of init is now the same but the Arch package management is based on Packman.
package management
Arch command | openSUSE command |
pacman -Syy | zypper refresh |
pacman -Syu/td> | zypper dist-upgrade |
pacman -S amarok | zypper install amarok |
pacman -R amarok | zypper remove amarok |
pacman -Rsnc | zypper remove –clean-deps amarok |
pacman -S amarok (force re-install) | zypper install –force amarok |
pacman -Ss amarok | zypper search amarok |
pacman -Sw | zypper –download-only |
ABS and makepkg -o | zypper source-install (installs source packages and dependencies) |
layman -a <repository> | zypper ar <repository><name> |
Tip: after running an update, zypper ps lists processes which have received updates and might have to be restarted. Zypper does, by and large, not automatically restart processes to not interrupt your work, but after big updates it is strongly recommended to at least log out and log in again from the graphical desktops.
Go back up to the list of distributions
Coming from Slackware
Slackware is a traditional Linux with a strong KDE orientation. Slackware is yet a BSD-style configurarion distribution.
package management
slackpkg search amarokzypper search amarok
Slackware command | openSUSE command |
slackpkg | zypper refresh |
slackpkg upgrade-all | zypper dist-upgrade |
slackpkg install amarok | zypper install amarok |
slackpkg remove amarok | zypper remove amarok |
slackpkg info amarok | zypper info amarok |
Tip: after running an update, zypper ps lists processes which have received updates and might have to be restarted. Zypper does, by and large, not automatically restart processes to not interrupt your work, but after big updates it is strongly recommended to at least log out and log in again from the graphical desktops.
Slackware uses SysVinit and enabling and disabling services happens in /etc/init.d. Click here for tips on using the init system systemd and system logging tool journald.
Go back up to the list of distributions
Coming from Fedora
Fedora is pretty close to what you can experience in openSUSE. We are RPM distribution as well and you can still use yum if you want, but if you want go faster, give zypper a try!
package management
Fedora command | openSUSE command |
yum makecache | zypper refresh |
yum update/td> | zypper update |
yum install amarok | zypper install amarok |
yum remove amarok | zypper remove amarok |
yum search amarok | zypper search amarok |
yum clean all | zypper clean |
Tip: after running an update, zypper ps lists processes which have received updates and might have to be restarted. Zypper does, by and large, not automatically restart processes to not interrupt your work, but after big updates it is strongly recommended to at least log out and log in again from the graphical desktops.
Fedora on the command setup offering some of the functionality YaST has. Also, system-config-firewall has an equivalent in yast firewall and system-config-users is comparable to yast users.
Go back up to the list of distributions
Conclusion
If you’re unfamiliar with openSUSE, we hope the above will help you get into the Geeko quickly. If you need anything else, there is plenty of documentation to find on our support portal. Of course we’re very much willing to help you – our openSUSE Forums have many volunteers willing to help out and the same is true for the other channels mentioned on the support portal. And if you want to meet us – we’re organizing the openSUSE conference in Greece this year and you’re more than welcome!
Have fun with the Geekos!
Thanks to all openSUSE community members who contributed to the command lists above, including stefano-k, Matt Haynes, terrorpup, |miska|, Kostas and others