VOOZH about

URL: https://thenewstack.io/how-to-manage-linux-software/

⇱ How to Manage Linux Software - The New Stack


TNS
SUBSCRIBE
Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important news and exclusive content delivered fresh to your inbox to learn more about at-scale software development.
REQUIRED
It seems that you've previously unsubscribed from our newsletter in the past. Click the button below to open the re-subscribe form in a new tab. When you're done, simply close that tab and continue with this form to complete your subscription.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.
Welcome and thank you for joining The New Stack community!
Please answer a few simple questions to help us deliver the news and resources you are interested in.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Great to meet you!
Tell us a bit about your job so we can cover the topics you find most relevant.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Welcome!

We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.

What’s next?

Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.

Follow TNS on your favorite social media networks.

Become a TNS follower on LinkedIn.

Check out the latest featured and trending stories while you wait for your first TNS newsletter.

PREV
1 of 2
NEXT
VOXPOP
As a JavaScript developer, what non-React tools do you use most often?
Angular
0%
Astro
0%
Svelte
0%
Vue.js
0%
Other
0%
I only use React
0%
I don't use JavaScript
0%
Thanks for your opinion! Subscribe below to get the final results, published exclusively in our TNS Update newsletter:
NEW! Try Stackie AI
From clobbered drafts to real-time sync
Apr 14th 2026 10:00am, by David Moore
TypeScript 6.0 RC arrives as a bridge to a faster future
Mar 14th 2026 9:00am, by Darryl K. Taft
Mastra empowers web devs to build AI agents in TypeScript
Jan 28th 2026 11:00am, by Loraine Lawson
2024-08-04 12:00:40
How to Manage Linux Software
CI/CD / Linux / Operations

How to Manage Linux Software

This article explains the role of command-line package managers, examines the package manager options for various distributions and demonstrates how to manage software with some of the most common tools.
Aug 4th, 2024 12:00pm by Damon M. Garn
👁 Featued image for: How to Manage Linux Software
Feature image via Unsplash. 
This article on services fits into a larger series of Linux articles covering various sysadmin topics, including hardware identification and managing system processes. You can build a lab environment by following the information in the Linux: Companion Lab for Linux Skill Blocks Repository article.  In this series, we also covered how to pick a distribution and installation platform, how the Linux kernel interacts with hardware and how Linux manages system services, storage, file permissions, system processes, and user and group permissions.
Windows and macOS tend to have just one or two ways of managing software, but Linux offers far more flexibility and freedom. Many applications are compiled directly from the source code, while others are packaged and handled by various package managers. Several distributions have their own preferred package manager, while some rely on package managers developed by other distributions. This article explains the role of command-line package managers, examines the package manager options for various distributions and demonstrates how to manage software with some of the most common tools. Package managers are one of the easiest differentiators between Linux distributions. Some distributions use their own package managers to handle software maintenance, though most use package managers derived from either the Red Hat or Debian approaches. Linux installations that use a graphical user interface (GUI) usually also contain a mouse-driven tool for installing, updating and removing software. This article focuses on command-line package managers, which are often faster and more flexible. Another unique aspect of Linux software management is compiling applications from source code. Linux software usually falls under an open-source license, meaning you have direct access to the programming code. That allows you to alter the code or customize the program before compiling and installing it, a capability not usually available for Windows or macOS software. Note: It is poor security practice to log on to a Linux system as the root (administrator) user. Most systems force you to log on as a regular user and then use the sudo (super user do) command to elevate your privileges. You may be prompted for your password when using sudo.

Package Managers Differ Among Distributions

Various Linux distributions developed their own software package managers. You’ll need to learn to use the preferred package manager for your chosen distro. While the specific commands vary among package managers, the general concepts are the same. Package managers typically handle the following software maintenance tasks:
  • Inventory software, including version information
  • Display software information
  • Install software
  • Update software
  • Remove software
Three of the most common package managers derive from Red Hat Linux, Debian Linux, and SUSE Linux. The Red Hat approach includes several tools, while the Debian software manager relies on one primary utility.

Use RPM

The Red Hat Package Manager (RPM) has a long history with many Linux distributions, including Red Hat Linux, Red Hat Enterprise Linux, Fedora and others. It’s a command-line tool with extensive options for modifying its use. The following two rpm subcommands install (-i ) and remove (-e ) software:
$ sudo rpm -ivh package.rpm
$ sudo rpm -evh package.rpm
The additional flags run the command in verbose mode (-v ) and show a progress bar (-h ). Display version and source information for a package using the -q  (query) and -i  (information) flags.
$ sudo rpm -qi package.rpm
👁 Image
Figure 1: Use the rpm -qi option to display package information, including version.

Use YUM

For many years, Red Hat and other distributions relied on the Yellowdog Updater Modified (YUM) package manager. It works with the same .rpm  packages and offers similar features. However, it also includes more extensible features. Type these two yum commands to install or remove software:
$ sudo yum install package.rpm
$ sudo yum remove package.rpm
Get information about an installed package with this yum  command:
$ sudo yum info package.rpm
The yum  command also recognizes the update  and upgrade  commands for when you need to bring an older software package current.
$ sudo yum update package.rpm

Use DNF

Today’s Red Hat-derived distributions use the Dandified YUM (DNF) package manager. It provides the same basic functionality as YUM and RPM, though it offers faster dependency resolution and runs quicker. The base command is dnf. Display the configured software repositories using the dnf repolist  subcommand:
$ sudo dnf repolist
👁 Image
Figure 2: Display a list of configured repositories with the dnf repolist command.
Here are examples of installing and removing software using the dnf  command:
$ sudo dnf install package.rpm
$ sudo dnf remove package.rpm
You’ll often need to update installed software. Use the upgrade  subcommand with dnf :
$ sudo dnf upgrade package.rpm
How do you know if a package needs an update? You can use the info  subcommand to display package information, including version. Compare that against the vendor’s latest version.
$ sudo dnf info package.rpm
👁 Image
Figure 3: Partial output from the dnf info command.
DNF has many other interesting subcommands. Try dnf history  to see what DNF commands you’ve run in the past. Type dnf upgrade  to upgrade all packages that have upgrades available. Search for information about a package without installing it by typing dnf search packagename .

Use APT

The Debian Linux distribution is nearly as old as Linux itself. The developers at Debian created a package manager early on, and its descendants are still in use today. The modern version of Debian’s package manager is the Advanced Packaging Tool (APT). You’ll use it with Debian, Ubuntu, Mint and many other popular Linux distributions. APT provides similar functionality to RPM, YUM and DNF. It installs, removes, updates and reports on software packages containing the .deb  file extension. You’ll need to update the package manager repository information to access the most recent packages. The related apt command is:
$ sudo apt update
To install or remove software with the apt  command, type:
$ sudo apt install package.deb
$ sudo apt remove package.deb
👁 Image
Figure 4: Use the apt install command to add a package.
The upgrade  subcommand brings existing packages current. You can also use the info  subcommand to display information about a particular package.
👁 Image
Figure 5: The apt info command displays package information, including version.

Use Zypper

OpenSUSE Linux and SUSE Linux Enterprise Server use the Zypper command-line package manager. Managing software from the command line allows for scripting, consumes fewer resources and works on Linux servers without a graphical user interface (GUI), which is common. Zypper works with RPM packages, but the package manager itself is fundamentally different. The parent command is zypper. It’s a good practice to refresh the package manager with current remote repository information before installing or updating packages. Use the zypper refresh  command to accomplish this:
$ sudo zypper refresh
Zypper uses the same two subcommands as DNF and APT to add or remove software:
$ sudo zypper install package
$ sudo zypper remove package
Bring the installed packages current by using the update  subcommand:
$ sudo zypper update
The info  subcommand displays package details:
$ sudo zypper info package

What Are Software Package Repositories?

Distribution vendors and software developers store available packages in online repositories. Your package management software automatically searches these repositories when you attempt to install or update an application. You can edit the package manager’s configuration files to add or remove repositories. For example, you can manage the repositories DNF will pull software from by editing the /etc/dnf/dnf.conf  file. The similar configuration file for APT repositories is /etc/apt/sources.list .
👁 Image
Figure 6: The /etc/apt/sources.list file contains package repository information.
Some organizations also maintain repositories on site or on removable media for better control of software versions.

What About Compiling Software?

Linux users have another software management option that is less common for Windows or macOS folks. Linux users often compile applications from the original source code. The three-step process is relatively straightforward but may seem intimidating at first. Most software developed for Windows and macOS systems is closed-source, meaning the licensing does not allow access to the original source code. It also does not allow that code to be modified. Open-source software makes the original code available to anyone. Furthermore, anyone can change the source code and release their changes. This approach allows open-source software to evolve quickly and embrace new ideas. Some application developers will compile and package the code using one of the packaging approaches discussed earlier. Others let end-users do it. Most provide both options. Users might choose to compile software themselves for several reasons, including those listed below:
  • Get cutting-edge software for testing or beta use.
  • Customize the software in ways packaged software can’t be.
  • Obtain software not packaged for their chosen distribution.

How to Compile Software

Many software developers provide specific instructions for compiling their software. Here are the instructions for compiling Nmap, a popular network analysis tool:
bzip2 -cd nmap-7.95.tar.bz2 | tar xvf -

cd nmap-7.95

./configure

make

su root

make install
The Nmap vendor provides the above instructions.

Wrap Up

The first step with managing Linux software is recognizing which package manager application your distribution uses. There’s a good chance it is DNF or APT, but many other options exist. These options may seem confusing compared to other operating systems, but they quickly become second nature. Once you know your system’s package manager, learn the basic commands for installing, updating and removing software. Remember to use the package manager to keep track of version numbers and other information about the software. Keeping software current increases your system’s security and ensures you have the most current software features. Linux users have another option. They can compile applications directly from the open-source code, enabling access to new features and additional customization. Compiling software may seem intimidating, but it is actually pretty easy. Check your selected distribution’s preferred package manager and begin updating your software for security and feature enhancements. Then use a lab environment and a few other distributions to learn more about the various types of Linux package managers.
TRENDING STORIES
Damon M. Garn owns Cogspinner Coaction, LLC, an IT writing and editing company. He authors articles, tutorials, and labs for today’s top IT industry leaders. He regularly contributes to The New Stack, TechTarget, and CompTIA. Damon has 20 years of...
Read more from Damon M. Garn
SHARE THIS STORY
TRENDING STORIES
Red Hat is a sponsor of The New Stack. 
SHARE THIS STORY
TRENDING STORIES
TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.