Basic commands for newcomers to Fedora


If you are coming to the Linux world and are starting it through Fedora, or are migrating from some other distro, like Ubuntu or Mint, these commands will help you a lot in your journey in the “blue hat” system.

This article is also for those coming from the Debian / Ubuntu base and looking for commands equivalent to apt. Remembering to always check if you are in root mode in specific cases.

Let’s start with the basics, which is to update the system packages. In Debian / Ubuntu the sudo apt-get update or sudo apt update, in Fedora we use:

sudo dnf check-update

When you need to update the installed packages we use the sudo apt-get upgrade / sudo apt upgrade or to add / remove packages that have new dependencies, we use the sudo apt-get dist-upgrade / sudo apt full-upgrade. In Fedora we use:

sudo dnf upgrade

When we need to search for a program via the terminal, Debian / Ubuntu uses the apt-cache search package_name or apt search package_name. Fedora uses:

dnf search filename or dnf search all filename (the latter includes the package description in the search)

After finding the desired package, if you want to see the «About» or «About» of the package. When using Debian / Ubuntu, the command is apt-cache show package (showing his local cache) or the apt show package. In Fedora you can use two commands, which are:

dnf info package or dnf repoquery –requires package (listing the dependencies for that package)

That done, it’s time to install the package (s), and it’s a pretty easy task. On the Debian / Ubuntu basis, you usually use sudo apt-get install package or sudo apt-get install package 1 package 2 … or sudo apt-get install -y package or still sudo apt install package. In Fedora it follows almost the same «line», which would be:

sudo dnf install pacote 


sudo dnf install pacote1 pacote2 


sudo dnf install -y pacote

Very simple «right» ?

Now if you need to install a package inside a folder for example, in Debian / Ubuntu you use the command sudo dpkg -i package.deb (format used in great majority by Debian, Ubuntu and their “daughters” distros). In Fedora it is not much different, and the command is:

sudo dnf install package.rpm (rpm is the type of packaging used in Fedora)

Removal is very simple too, in Debian / Ubuntu we use sudo apt-get remove package or sudo apt remove package. In Fedora, we only change the word, but the idea is the same:

sudo dnf erase package or sudo dnf remove package

Last, but not least, to add the RPM Fusion repository, both with free and nonfree versions, just use the following command:

sudo dnf install$(rpm -E %fedora).noarch.rpm$(rpm -E %fedora).noarch.rpm

If you need more parameters and help, you can access it directly from the terminal, by typing man dnf or by accessing the help links for Fedora and Red Hat, which are in English, but nothing that Google Translate does not help ?.

I hope this basic guide has helped you. ??

Check out the Fedora 30 Review video

This article does not end here, keep exchanging an idea there in our forum.

I wait for you next time, a big hug.

Have you seen any errors or would you like to add any suggestions to this article? Collaborate, click here.