User Tools

Site Tools


Managing Software

Date: Mon Sep 17 12:40:59 EDT 2018

Many modern Linux distros offer some kind of package manage- ment for intalling, managing, and removing software. On RedHat based systems, package management is based on RPM (the RedHat Package Manager). On Debian based systems, package management is based on dpkg.

There are some advanced things you can do with these base package management systems, but most of the time it will be easier to use their frontends. For RedHat systems, the current frontend is called dnf, and for Debian systems, it's apt or apt-get. Let's look at a few of the basic dnf commands:

To see a history of how dnf has been used on the system:

$ sudo dnf history

To get info on the history of a specific package:

$ sudo dnf history mosh

To get information on a specific package:

$ sudo dnf info bash

To search by tag, which you can see listed in the info search:

$ sudo dnf repoquery --queryformat "%{arch}" bash

$ sudo dnf repoquery --queryformat "%{reponame}" mosh

Let's install something:

$ dnf search tmux
$ dnf info tmux
$ sudo dnf install tmux
$ echo "set-option -g prefix C-a" > .tmux.conf
$ tmux

Now, let's play around:

$ sudo dnf install -y rubygems
$ gem install lolcat
$ ls -l | lolcat
$ # install browsh
$ sudo dnf install -y
$ sudo dnf remove browsh

dnf basics

  • dnf search [name]
  • dnf install [name]
  • dnf remove [name]
  • dnf repolist
  • dnf list installed
  • dnf list available
  • dnf provides /bin/bash
  • dnf info [name>
  • dnf update [name]
  • dnf check-update
  • dnf update OR dnf upgrade
  • dnf autoremove
  • dnf clean all
  • dnf help clean
  • dnf help
  • dnf history
  • dnf grouplist | less
  • dnf groupinstall 'Python Science'
  • dnf groupupdate 'Python Science'
  • dnf groupremove 'Python Science'
linux/managing-software.txt · Last modified: 2019/01/21 11:07 by seanburns