yum Archives - The Linux GURUS https://thelinuxgurus.com/tag/yum/ Learn Linux & DevOPS from THE LINUX GURUS Sun, 02 Feb 2020 04:26:24 +0000 en-US hourly 1 https://i0.wp.com/thelinuxgurus.com/wp-content/uploads/2020/01/cropped-thelinuxgurus_transparent_name.png?fit=32%2C32&ssl=1 yum Archives - The Linux GURUS https://thelinuxgurus.com/tag/yum/ 32 32 148921671 Install SNAP on Ubuntu & CentOS/RHEL https://thelinuxgurus.com/install-snap-on-ubuntu-centos-rhel/ https://thelinuxgurus.com/install-snap-on-ubuntu-centos-rhel/#respond Sun, 02 Feb 2020 04:26:24 +0000 https://thelinuxgurus.com/?p=1072 Snap is a software deployment & package management system, it has containerized software packages that are simple to create & install. Snap packages are safe...

The post Install SNAP on Ubuntu & CentOS/RHEL appeared first on The Linux GURUS.

]]>
Snap is a software deployment & package management system, it has containerized software packages that are simple to create & install. Snap packages are safe to run, they auto-update & we can also roll-back the changes easily.

The main advantage of using snap is that it combines a package & all the required dependencies into a single package, which allows each package to work on all Linux distribution without any issue.

Recommended Read: Beginner’s guide to Backup Postgres Database

Also Read: Conda Commands cheat sheet for Beginners

The name snap comes from snappy which was a package management system for Ubuntu phones. So also In this tutorial, we will learn to install Snap on CentOS & Ubuntu systems. Once we install snap on Linux machines, we will also discuss some mostly used snap commands for package management.

Install Snap on Ubuntu

Starting with Ubuntu 16.04, the snap comes pre-installed on the system. But if it’s not installed or you need to install it on other Ubuntu versions, then the command to do so is,

$ sudo apt update && sudo apt install snapd

Once the package has been installed, we need to log out & then log back in to update all the snap’s paths correctly. We can then use snap for package management using the commands mentioned below.

Install Snap on CentOS/RHEL

Snap on CentOS & RHEL is not available with default repository & we need to install 3rd party repository i.e. EPEL. You can refer to our tutorial on how to install EPEL repository or you can try the following command, which works on the new versions,

$ sudo yum install epel-release

Now we can start the snap installation with the following command,

$ sudo yum install snapd

After installation, we need to enable the snap package,

$ sudo systemctl enable –now snapd.socket

We now have snap installed on our systems & if we also want to enable classic snap support then we can create a system link for the same,

$ sudo ln -s /var/lib/snapd/snap /snap

Now we can either restart or log out & log back in to make sure that all the snapd paths are updated.

Snap Commands for Beginners

After snap installation, we must be aware of the commands that can be used for the package management using snap. Below mentioned are some commands that you should know for package management using snap,

  • Install Packages

To install a package using snap, execute the following from the terminal

$ snap install package

  • Remove package

To remove a package from the system, run

$ snap remove package

  • Update package

As mentioned above, snap packages are updated automatically & we might not be required to run the below-mentioned command at all but none the less, for your information,

$ snap refresh

This command will update all the snap packages.

  • Find packages

To find a package in the snap repository, execute the following command,

$ snap find package_query

  • List installed packages

To check all the installed packages on your system, run

$ snap list

  • Information for a package

To check complete information for a package, use the following

$ snap info package

This concludes our tutorial on how to install snap on Linux systems. Please feel free to send in any questions, queries or suggestions using the comment box below.

If you think we have helped you or just want to support us, please consider these:-

Connect to us: Facebook | Twitter | Linkedin

TheLinuxGURUS are thankful for your continued support.

The post Install SNAP on Ubuntu & CentOS/RHEL appeared first on The Linux GURUS.

]]>
https://thelinuxgurus.com/install-snap-on-ubuntu-centos-rhel/feed/ 0 1072
Beginner’s guide to using DNF command in Linux https://thelinuxgurus.com/beginners-guide-to-using-dnf-command-in-linux/ https://thelinuxgurus.com/beginners-guide-to-using-dnf-command-in-linux/#respond Sat, 04 Jan 2020 14:22:55 +0000 https://thelinuxgurus.com/?p=890 DNF is the package manager that was earlier used in Fedora as a default package manager but with the start of RHEL 8, it is...

The post Beginner’s guide to using DNF command in Linux appeared first on The Linux GURUS.

]]>
DNF is the package manager that was earlier used in Fedora as a default package manager but with the start of RHEL 8, it is now available a package manager choice along with YUM. In the future, it might be completely removed from RHEL versions. Yum has some problems associated with it, The problems like poor performance, high memory usage, slowness for dependency resolution, etc. All these problems have been resolved with DNF.

Recommended Read: Examples on how to use YUM command in Linux

Also Read: Examples on how to use RPM command in Linux

In this tutorial, we will learn to use DNF command in Linux,


Examples of DNF command in Linux


1- Install package and depend­encies

To install a package & its related dependencies, the command is,

# dnf install packa­ge_­name

If required, we can install local package (rpm package) and all its depend­encies with the following command,

# dnf install /path­/to­/lo­cal­/rpm

To reinstall a package, command is

# dnf reinstall packa­ge_­name


2- Install a package for which we only have a file

If we don’t know the package name & want to install the package for which we only have file (maybe config file), then we can use the following command to install it,

# dnf install /path­/to­/fi­le


3- Upgrade packages

The command to upgrade all system packages is,

# dnf upgrade

To update packages to major patchset and security

# dnf upgrad­e-m­ini­mal

To check if updates are available for packages,

# dnf check-­upd­ate


4- Downgrade packages

To downgrade the installed packages to older versions, the command is

# dnf downgrade packa­ge_­name


5- Uninstall or remove a package

The command to remove or uninstall a package from the system is,

# dnf remove packa­ge_­name

# dnf erase package_name

& if we have some orphaned packages (like some replaces packages that are not required anymore, ex old kernels etc) on our system that we want to remove, we can use the following command,

# dnf autore­move


6- Overview of how many groups are installed and available

To get the list of how many group packages are installed & how many are available, we can use

# dnf group summary group

To get the list of all packages for a group, we can use the command,

# dnf group info group

To only check a particular group,

# dnf group list group_name


7- Install group

Command to install the group is,

# dnf group install –with­-op­tional group_name


8- Remove a group

To remove an installed group of packages, use

# dnf group remove group_name


9- Upgrade a single group

To upgrade the packages from the group and upgrades the group itself

# dnf group upgrade group


10- Update all packages

To update packages to the latest version, execute the following command,

# dnf distro­-sync


11- Check information a package

To show info of packa­ge_­name, run

# dnf info packa­ge_­name


12- Check which package provides a file

To show which package provides /path­/to­/file

# dnf provides path/­to/­file


13- Perform a search term for a package

To search for term in package name and summary

# dnf search term


14- Get dnf history

To get list of all dnf transa­ction’s history

# dnf history list

History shows transaction id, to get information for a particular transaction,

# dnf history info trans­act­ion_id

To redo particular trans­action from history, run,

# dnf history redo trans­act­ion_id

To rollback a particular transaction,

# dnf history rollback trans­act­ion_id

To undo a transaction,

# dnf history undo trans­act­ion_id


15- Show user-installed packages outside dnf

To only show all instal­l only packages, packages installed outside of DNF and packages not installed as a dependency,

# dnf history userin­sta­lled


16- List repositories

To show enabled repolist,

# dnf repolist –enabled

To show disabled repolist,

# dnf repolist –disabled

To list all repos, enabled, disabled & all known repos

# dnf repolist –ena­ble­d|­–­dis­abl­ed­|-­-all


17- Search repo for selected packages

To search the available DNF reposi­tories for selected packages,

# dnf repoqu­ery


18- Add a remote repository

To add a remote repository to the system,

# dnf config­-ma­nager –add-­rep­o=­URL add remote repository


19- Download a package

To only download a package & not install it on the system, run

# dnf download package_name


20- List packages

To list installed packages on the system,

# dnf list –installed

List available packages,

# dnf list –available

List recent packages,

# dnf list –recent

List all packages,

# dnf list –all

We now end our tutorial on how to use DNF command in Linux. Please do let us know your suggestions, questions or queries using the comment box below.

If you think we have helped you or just want to support us, please consider these:-

Connect to us: Facebook | Twitter | Linkedin

TheLinuxGURUS are thankful for your continued support.

The post Beginner’s guide to using DNF command in Linux appeared first on The Linux GURUS.

]]>
https://thelinuxgurus.com/beginners-guide-to-using-dnf-command-in-linux/feed/ 0 890