Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Mastering Linux Administration - Second Edition

You're reading from  Mastering Linux Administration - Second Edition

Product type Book
Published in Mar 2024
Publisher Packt
ISBN-13 9781837630691
Pages 764 pages
Edition 2nd Edition
Languages
Authors (2):
Alexandru Calcatinge Alexandru Calcatinge
Profile icon Alexandru Calcatinge
Julian Balog Julian Balog
Profile icon Julian Balog
View More author details

Table of Contents (24) Chapters

Preface 1. Part 1:Basic Linux Administration
2. Chapter 1: Installing Linux 3. Chapter 2: The Linux Shell and Filesystem 4. Chapter 3: Linux Software Management 5. Chapter 4: Managing Users and Groups 6. Chapter 5: Working with Processes, Daemons, and Signals 7. Part 2:Advanced Linux Administration
8. Chapter 6: Working with Disks and Filesystems 9. Chapter 7: Networking with Linux 10. Chapter 8: Linux Shell Scripting 11. Chapter 9: Securing Linux 12. Chapter 10: Disaster Recovery, Diagnostics, and Troubleshooting 13. Part 3:Server Administration
14. Chapter 11: Working with Virtual Machines 15. Chapter 12: Managing Containers with Docker 16. Chapter 13: Configuring Linux Servers 17. Part 4:Cloud Administration
18. Chapter 14: Short Introduction to Cloud Computing 19. Chapter 15: Deploying to the Cloud with AWS and Azure 20. Chapter 16: Deploying Applications with Kubernetes 21. Chapter 17: Infrastructure and Automation with Ansible 22. Index 23. Other Books You May Enjoy

Linux Software Management

Software management is an important aspect of Linux system administration because, at some level, you will have to work with software packages as a system administrator. Knowing how to work with software packages is an asset that you will master after finishing this chapter.

In this chapter, you will learn how to use specific software management commands, as well as learn how software packages work, depending on your distribution of choice. You will learn about the latest Snap and Flatpak package types and how to use them on modern Linux distributions.

In this chapter, we’re going to cover the following main topics:

  • Linux software package types
  • Managing software packages
  • Installing new desktop environments in Linux

Technical requirements

No special technical requirements are needed for this chapter, just a working installation of Linux on your system. Ubuntu, Fedora (or AlmaLinux), or openSUSE are equally suitable for this chapter’s exercises as we will cover all types of package managers.

Linux software package types

As you’ve already learned by now, a Linux distribution comes packed with a kernel and applications on top of it. Although plenty of applications are already installed by default, there will certainly be occasions when you will need to install some new ones or remove ones that you don’t need.

In Linux, applications come bundled into repositories. A repository is a centrally managed location that consists of software packages maintained by developers. These could contain individual applications or operating system-related files. Each Linux distribution comes with several official repositories, but on top of those, you can add some new ones. The way to add them is specific to each distribution, and we will get into more details later in this chapter.

Linux has several types of packages available. Ubuntu uses deb packages, as it is based on Debian, while Fedora (or Rocky Linux and AlmaLinux) uses rpm packages, as it is based on RHEL. There...

Managing software packages

Each distribution has its own package manager. There are two types of package managers for each distribution – one for low-level and one for high-level package management. For an RPM-based distribution such as CentOS or Fedora, the low-level tool is the rpm command, while the high-level tools are the yum and dnf commands. For openSUSE, another major RPM-based distribution, the low-level tool is the same rpm command, but in terms of high-level tools, the zypper command is used. For DEB-based distributions, the low-level command is dpkg and the high-level command is apt (or the now deprecated apt-get).

What is the difference between low-level and high-level package managers in Linux? The low-level package managers are responsible for the backend of any package manipulation and are capable of unpacking packages, running scripts, and installing apps. The high-end managers are responsible for dependency resolution, installing and downloading packages...

Installing new desktop environments in Linux

We will continue to use Fedora as an example, but the commands shown here can also be used for any RHEL-based distribution, such as AlmaLinux or Rocky Linux.

By default, Fedora Workstation uses GNOME as the desktop environment, but what if you would like to use another one, such as KDE? Before showing you how, we would like to give you some information about the graphical desktop environments available for Linux.

Linux is all about choice, and this can’t be more true when it comes to desktop environments (DEs). There are dozens of DEs available, such as GNOME, KDE, Xfce, LXDE, LXQT, Pantheon, and others. The most widely used DEs on Linux are GNOME, KDE, and Xfce, and the first two have the largest communities. If you want to use the very best and latest of GNOME, for example, you can try distributions such as Fedora, openSUSE Tumbleweed with GNOME, or Arch Linux (or Manjaro). If you want to use the best of KDE, you can try KDE...

Summary

In this chapter, you learned how to work with packages in Ubuntu, Fedora/AlmaLinux, and openSUSE, and the skills you’ve learned will help you to manage packages in any Linux distribution. You learned how to work with both .deb and .rpm packages, and also the newer ones, such as flatpaks and snaps. You will use the skills you’ve learned here in every chapter of this book, as well as in your day-to-day job as a systems administrator – or even in your free time, enjoying your Linux operating system.

In the next chapter, we will show you how to manage user accounts and permissions, where you will be introduced to general concepts and specific tools.

Questions

Now that you have a clear idea of how to manage software packages, here are some exercises that will contribute further to your learning:

  1. Make a list of all the packages installed on your system.

Hint: Consider using the apt list --installed command.

  1. Add support for flatpaks on your Ubuntu system.

Hint: Follow the documentation at flatpak.org.

  1. Test other distributions and use their package managers. We recommend that you try openSUSE and, if you feel confident, Arch Linux.

Further reading

For more information about what was covered in this chapter, please refer to the following resources:

lock icon The rest of the chapter is locked
You have been reading a chapter from
Mastering Linux Administration - Second Edition
Published in: Mar 2024 Publisher: Packt ISBN-13: 9781837630691
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}