What is linux alternatives

Introduction to the alternatives command in Linux

Photo by Rodolfo Clix from Pexels

More Linux resources

Abstractions can be helpful to users because many users don’t care how their computer achieves a task as long as it’s on target. In fact, even applications don’t always care how something is achieved as long as all of its system calls are answered correctly. In theory, a Linux sysadmin can offer many system tools according to function rather than by the exact name of the executable, but that often requires a lot of symlinking and version tracking. Unless that is, you use the alternatives command.

The alternatives command began its life as, interestingly, an alternative. Originally, this was a convenience utility, written in Perl, from the Debian Linux project, called update-alternatives . Red Hat rewrote the command without Perl, and it’s been propagated throughout Fedora-based distributions such as Red Hat and CentOS, as well as other distributions that look to Red Hat for the functional definition of the Linux Standard Base (LSB).

When to use the alternatives command

A simple and realistic example: you have a command on your system called em , which launches a simple text editor. It’s been the go-to editor for your userbase for years, many people have based workflows around it and some maintain highly customized configs for it. However, your userbase has made it clear to you recently that they can’t survive any longer without emoji support in their terminal editors and em doesn’t support Unicode.

You find a Unicode-enabled fork of em called nem , but you know that 99% of your users are used to em , have scripts that call em , and will continue to think of any replacement application as em no matter what you do. The easy solution to this situation, and many other examples similar to it, is to designate the new nem binary as the preferred alternative to the em binary when the em command is used.

Manually creating a symlink might seem tempting, but that’s not resistant to updates from a package manager, nor is it centralized.

The alternatives command is most useful when managing «generic» application names. Of course in the UNIX world, «generic» isn’t always generic any more than «Kleenex» or «Xerox» is in the real world, so terms like java, (x)emacs(-nox), (n)vi(m), whois, and iptables are often some of the first to have alternatives defined for them. For truly generic terms, like EDITOR and CC , the alternatives command is not considered an appropriate solution. For those terms, because they’re environment variables and should be defined in /etc or $HOME/.profile .

Creating a new alternative

Continuing with the example scenario of an old binary called em being supplanted by the new variant nem , it’s easy to create an alternative entry. In this example, you must rename the original command, although in other instances this isn’t necessary because the command isn’t exactly what people think it is in the first place ( java , for example, is rarely located in /usr/bin directly). If you do need to change the name of a binary, the right way to do that is in its RPM spec file, such that the RPM installing the command provides the binary under the new name.

In a pinch, especially if you’re phasing the command out anyway, you could remove the command from the system’s package management and just keep a custom version of the old command available /opt or similar.

For this example, assume you’ve renamed the original editor em2 (denoting its latest version number).

Now you have two binaries ( em2 and nem ) to be associated with one command: em . To help keep the different roles of terminology clear, assume that em and nem are both micro Emacs-style editors. In that case, a very generic term for the alternative being created might be µemacs (using the µ symbol to mean «micro») or uemacs for simplicity.

Create an alternative for the original by providing:

  • a location for the «generic» symlink
  • a name for the alternative (I’ve decided upon uemacs , to make it clear that it’s a reference name rather than a specific binary)
  • the binary to be executed when these symlinks are called
  • a priority level to indicate which alternative is preferred

Create an alternative for the new binary, with a high priority because it’s your preferred binary:

These commands create a new symlink, /usr/bin/em , pointing to /etc/alternatives/em , which you can in turn point to either /opt/em-legacy/em2 or /usr/local/bin/nem . The human-friendly reference to this bundle of alternatives is uemacs , which has been arbitrarily chosen by the systems administrator because it’s descriptive and memorable. You can choose the destination of the alternative symlink using the —config option:

Removing an alternative

Sometimes alternatives are long-term solutions, and other times they’re just to help users or admins to transition to something new. If you need to remove an alternative for any reason, you can do that with the —remove-all option, followed by the «generic» name of the alternative. In this example, that’s uemacs :

Читайте также:  Windows embedded posready 2009 настройка

This removes everything about uemacs from the alternatives subsystem: the symlink in /usr/bin and /etc/alternatives . If you only want to remove one choice from an alternative, then use the —remove option, providing the alternative name ( uemacs in this example) and the path of the choice you want to drop:

Alternatives

The alternatives command has many more features, including the ability to symlink dependent components when a specific alternative is chosen. In addition to handling a lot of the heavy lifting, alternatives keeps your inconsistencies centralized. You can check in on what alternatives are in place, so you don’t have to remember from day to day that emacs is actually emacs-26.3 , or that java isn’t java-1.8 but /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.232.b09-0 , and so on:

Linux is all about choice and flexibility, and the alternatives command is an example of how both users and admins can benefit from some clever sleight-of-hand.

Want to try out Red Hat Enterprise Linux? Download it now for free.

Источник

The Top 10 Ubuntu Alternatives

Try these Linux distributions for something different

Most people who are familiar with Linux have heard of Ubuntu. Ubuntu started a revolution in 2004 to make a Linux-based operating system that was hardware compliant, easy to use, and an alternative to Windows.

Ubuntu may be popular, but there are reasons to choose a Linux distribution other than Ubuntu. The Ubuntu user interface may be confusing, or you may want to customize the desktop more than Unity allows. If Ubuntu is too slow on your hardware, another distribution may run faster. Some Linux distributions allow you to get hands-on and get to the nuts and bolts of what is going on. If you prefer a familiar look, some modern distributions have Mac-style interfaces.

While there are hundreds of Linux distributions, here are 10 of the best Ubuntu alternatives.

Linux Mint

Based on Ubuntu LTS release for support up to 5 years.

Cinnamon desktop will feel familiar to Windows users.

Comes with all the software and utilities you need.

Some things can fall behind with long term support.

Traditionally, a common reason people switched from Ubuntu was the Unity desktop environment. Now, Ubuntu uses a custom version of the GNOME desktop, which isn’t traditional, especially since it’s been designed to resemble Unity. For people who prefer a traditional user interface with a panel at the bottom and a menu much like the Windows 7 menu, the Linux Mint Cinnamon desktop offers welcome refuge.

Linux Mint gives you the power of Ubuntu, but with a simple user interface. Don’t mistake simple to mean not powerful. The Cinnamon desktop has a stylish look and feel, and the ability to customize many aspects of the desktop.

Linux Mint is derived from Ubuntu and shares the same code base. The main Linux Mint distribution is based on the long-term support release of Ubuntu, which means you have all the benefits of Ubuntu but with an alternative look and feel.

Linux Mint has also rebranded and forked a number of key applications. There’s a full set of applications for everyday use, including the LibreOffice suite, Banshee audio player, Firefox web browser, and Thunderbird email client.

Who Is Linux Mint For?

People who like the stability of Ubuntu yet want a more traditional user interface.

Also Try

Linux Mint has several flavors, including two lightweight versions that use the MATE and XFCE desktop environments. These environments make it possible to use Linux Mint on older computers, and both are highly customizable.

Zorin OS

Based on Ubuntu LTS release for 5 years of support.

Zorin is easy to install, easy to use, and has a great set of applications.

Focused on a simple user experience.

Zorin specific support isn’t as easy to come by.

Zorin OS is also based on the Ubuntu LTS release, which means you get all the best features of Ubuntu with a unique look and feel.

Zorin uses a customized version of the GNOME desktop. This provides a good middle ground between the modern features of the Unity desktop and the traditional features of the Linux Mint Cinnamon desktop. You can customize many of the desktop features using a built-in Zorin look changer.

Zorin has everything the average person needs, including the Chromium web browser (a non-branded Chrome browser), GIMP image editor, LibreOffice office suite, Rhythmbox audio player, and PlayOnLinux with WINE.

The latest version of Zorin is great. Previously it was very stylish but a bit buggy. The bugs have been completely ironed out, and Zorin is every bit as good as Linux Mint.

Who Is Zorin For?

Zorin is a perfect alternative to Ubuntu and Linux Mint. It blends a great user interface with the best software that is currently available for Linux. The inclusion of PlayOnLinux and WINE means you can install and use Windows applications.

Also Try

If you like the idea of Zorin OS, but maybe not its specific style, check out Elementary OS. It’s also based on Ubuntu LTS, but it has a unique set of utilities and tools, including a desktop environment.

Fedora

Super easy install.

Well-supported by third parties.

Get the absolute latest software.

Software selection is limited without third-party repositories.

Can experience stability issues close to a new release.

For a long time, Fedora and Ubuntu were the top two Linux distributions on desktops. Both provided a polished and reliable experience. Along the way, though, Fedora changed direction toward a more business-oriented approach. That doesn’t mean Fedora isn’t still a great desktop, and you can get running with it just as easily as the latest Ubuntu release.

Читайте также:  Windows 10 x32 1511

Officially, Fedora is something of a testbed for the latest technologies coming to Red Hat Enterprise Linux (RHEL). When the open-source giant develops a new feature, it arrives on Fedora years before RHEL or CentOS. As a result, Fedora moves at a speedy pace, with new releases arriving about every six months. Fedora also pushes new versions of software along the way, meaning you usually have the latest and greatest.

With Fedora, you get an interesting balance. Most leading-edge distributions, like Arch Linux, require technical know-how to use effectively. That’s not the case with Fedora. It uses a simple graphical installer, like Ubuntu. When you get a Fedora system running, you benefit from access to the latest multimedia software and access to the latest drivers and gaming software. With Fedora, you get access to all the toys the cool kids have, without the hassle of configuring every aspect of your computer manually.

Who is Fedora For?

Fedora excels in the hands of developers and system administrators. That’s the audience it’s intended for, but anyone willing to learn about their computer and how it works will have a great experience with Fedora.

Also Try

If you’d like something similar to Fedora that’s more stable and moves at a slower pace, give CentOS a try. CentOS is the community version of RHEL. It’s essentially the same distribution without the Red Hat branding.

CentOS is geared toward business users that need rock-solid stability. Because of that, it’s extremely popular on servers. As a desktop, CentOS is rock solid, and it stays out of your way and lets you get straight to work.

openSUSE

Fantastic KDE Plasma desktop support.

One of the longest running and most reliable distributions.

Multiple releases to choose.

Community isn’t as large as Ubuntu’s.

Not as much third-party support as Ubuntu, Fedora, or Debian.

openSUSE has been around longer than Ubuntu, and there are two versions of openSUSE available: Tumbleweed and Leap.

Tumbleweed is a rolling release distribution meaning that once it’s installed, you never have to install another version (somewhat similar to the model that Windows 10 uses).

The Leap version of openSUSE follows the traditional model whereby you install the latest version when it is released by downloading and installing it. Generally, a release occurs once every six months.

openSUSE is not based on Debian or Ubuntu and is more aligned to Red Hat in terms of package management. It isn’t a Red Hat distribution, though. It’s independent, and its primary selling point is stability.

openSUSE has a perfectly tuned KDE Plasma desktop that strikes a balance between modern features and classic design. Plasma comes complete with its ecosystem and utilities for everything you could hope for, including Android connectivity.

Along with Plasma, you get other popular open-source applications, like Firefox and LibreOffice. OpenSUSE has a massive package repository, so there shouldn’t be much you can’t find and install.

As with CentOS and Fedora, multimedia codecs aren’t installed by default. However, there is a good guide available for finding everything you need.

The installer for openSUSE is a bit hit and miss, making it the sort of distribution you install as a standalone distribution as opposed to a dual boot solution.

Who is openSUSE for?

openSUSE is for anybody who wants a stable, fully-featured, modern Linux desktop operating system and who wants a viable alternative to Ubuntu.

Also Try

Consider Mageia. Mageia is easier to install and utilizes the Plasma desktop environment. Mageia comes with many applications pre-installed including GIMP, LibreOffice, Firefox, and a complete toolbox from Plasma.

Debian

One of the oldest and most respected distributions.

Massive software library with loads of applications.

Excellent third-party support.

Rock solid stability.

Stable releases move slowly, leaving you with outdated software.

Community tends to be more technical.

Debian is the parent to Ubuntu and grandparent to other distributions on this list. So, these distributions share many tools, features, and components.

The way to install Debian is to use a network installer. The benefit of using this installer is that you choose the features of the operating system as you install it. For example, you can choose to have a suite of desktop applications or a bare-bones operating system.

You can also choose the desktop environment that is installed. If you want GNOME, then you can have GNOME (this is the default). If you prefer KDE, then KDE it is.

The reason to choose Debian over other versions of Linux is that you choose what you want, and you can customize the distribution from the moment you install it.

The Debian tools are easy to use and powerful. Some of the installation steps go too far for the average person, but for somebody looking to do something that is out of the ordinary, it is perfect.

If you choose to install the default set of standard applications, you get Firefox, LibreOffice, and Rhythmbox.

Who is Debian For?

Debian is for people who want to build a system the way they want it from the ground up. It’s also for those who want to choose the version from the ultra-stable version, the testing version, or the modern but possibly less reliable unstable version.

Also Try

Another distribution that’s based on Debian is MX Linux. MX Linux is a fairly new Linux distribution, but it’s taken off in popularity. MX Linux is based on the Debian stable branch and uses the XFCE desktop. So it doesn’t fall behind, the MX Linux developers included the Debian backports repositories and some additional software, like the latest Firefox release. The overall result is a semi-rolling release system that takes the stability of Debian and adds some newer applications to provide a more functional desktop experience.

Читайте также:  Rdp менеджер для windows

Manjaro

Easy to install and use.

Benefits from the large Arch Linux community.

Fast moving with the latest applications.

Giant software selection.

Rarely, it can inherit Arch’s instability.

Comes with a little more than some users need.

Manjaro Linux is one of the best Linux distributions available, and we can’t recommend it highly enough. If you follow the Linux news, forums, and chat rooms long enough, you will hear two words, again and again, Arch Linux.

Arch Linux is a rolling release distribution that is incredibly powerful. Arch Linux, however, isn’t for the shrinking violet. You need to have some nifty Linux skills, the willingness to learn, and patience.

Your reward for using Arch Linux is that you can get a highly customizable system the way you want it that is both modern, performs well, and looks great. Manjaro takes all the best bits of Arch and makes it available to a wider range of users.

Manjaro is easy to install and comes with all the applications most people expect. Plus, Manjaro is stable yet highly responsive and performs brilliantly. This is a viable alternative to Ubuntu that isn’t based on Ubuntu.

Who Is Manjaro For?

Manjaro is a modern Linux desktop operating system that is suitable for everyone. If you want to use Arch Linux, but aren’t brave enough to give it a go, this is a great way to dip your feet into the water.

Also Try

The apparent alternative is Arch Linux. Try Arch Linux if you are a Linux enthusiast with time on your hands and a willingness to learn something new. The result will be a modern desktop operating system of your design. You will also learn a lot on the way.

Another alternative is Antergos. Antergos, like Manjaro, is based on Arch Linux and provides another entry for the average person.

Peppermint

Easy to install and use.

Works well with older hardware.

Has a great tool for integrating web pages into the desktop.

There aren’t many applications installed by default.

Might be too minimal for some people.

Peppermint OS is another Linux distribution based on the Ubuntu Long Term Support release. It doesn’t have anything to do with Linux Mint except for the inclusion of the word mint in its name.

Peppermint is great for both modern and older hardware. It utilizes a mixture of the XFCE and LXDE desktop environments. What you get is a Linux distribution that performs well and has all the features of a modern operating system.

Peppermint does a great job of blending the cloud with the desktop. The best feature of Peppermint is its ability to turn web applications such as Facebook, Gmail, and other websites into a desktop application.

It is easy to install as it uses the Ubuntu installer and comes with enough tools to get you started. The ICE tool is the key feature as this utility turns your favorite websites into desktop applications.

Who is Peppermint For?

Peppermint is for everyone, whether you use an older computer or a modern one. It is especially useful for people who mainly use the internet when using their computer as it integrates the web into the desktop.

Also Try

Chromixium is a clone of the Chrome operating system used on Chromebooks made available as a Linux desktop operating system.

Solus

Super polished and simple experience.

Budgie desktop environment.

No server release, in case you need one.

Some unique configurations can be confusing.

If you’re looking for something different, give Solus a look. Unlike many Linux distributions, which are based on Ubuntu, Debian, or Fedora (Red Hat technically is), Solus was independently created from the ground up. It’s a completely fresh start that seriously pays off.

Solus was designed for the desktop only. There is no server version of Solus. Instead of getting a generalized Linux distribution, as you would with most others, you get something that’s tailored for the desktop. It’s streamlined in a way that’s efficient and makes sense.

The Solus developers created a unique ecosystem around their distribution, including the desktop environment, Budgie. Budgie started as a variation of GNOME, but it’s grown into one of the most popular desktop environments in the Linux world. Budgie is simple, elegant, and modern. The design is classic enough that it feels like second nature to use, even the first time.

Solus also has its own package manager, complete with a graphical app store. The application library started small, but it’s grown to include nearly every piece of software you could hope for. Solus is also a rolling-release distribution, meaning you get continual updates as those become available. There’s never a need to upgrade to a new Solus release. This system also means that your system will always stay fresh.

Who is Solus For?

Solus is an ideal fit for just about anyone. It’s a general-purpose desktop distribution that’s simple enough for the least technical users. Like other Linux distributions, though, more experienced users can dig around under the hood.

Also Try

The closest thing to Solus is Manjaro. Manjaro is also a rolling release distribution that gives you a complete and polished desktop out of the box. Unlike Solus, Manjaro is based on Arch Linux. The Arch ecosystem is a huge asset, and that’s probably the main reason to consider Manjaro over Solus.

Источник

Оцените статью