Posts

Showing posts from November, 2021

Manage Packages on RPM Linux Distros With DNF

 In this tutorial, How to install and remove packages on RPM-based Linux Distros with DNF. DNF is the default package manager on Fedora and RHEL. when you run yum command on new Linux distros, it is actually using DNF in the background. Verify command below ls -l /usr/bin/yum The output the yum command is a symbolic link to dnf. Search package with DNF dnf search nginx get more infomation abount a certain package dnf info nginx List all packages installed your system. dnf list installed Installing package use DNF sudo dnf install nginx How to view all the dependencies installed of nginx dnf deplist nginx Uninstall package use DNF sudo dnf remove nginx DNF keeps a record of all transactions that involve installing or removing software packages dnf history Removing Unused Dependencies To remove such dependencies sudo dnf autoremove remove data downloaded along with installed packages. sudo dnf clean packages clean up your software package cache and other metadata that installed packages

Run Multiple Commands in Linux

Image
In this tutorial, How to Run Multiple Commands in Linux at Once. You will executing multiple Linux commands at one. On Linux, there are three ways to run multiple commands in terminal. 1. Using Logical OR (ll) operator The syntax command A || command B if command A runs successfully, command B won't execute. Command B will only execute if command A fails Example: sudo find /tmp -name devopsroles.com || touch huuphan.com The output terminal as below 2. Using the AND (&&) Operator The syntax command A && command B Command A runs successfully, If command B not error. Example: mkdir /tmp/devopsroles && cd /tmp The output terminal as below 3. Using the Semicolon(;) Operator The syntax command A ; command B Command A and command B run executed sequentially  The output terminal as below

How to check CPU in Linux

Image
 In this tutorial, How to you check CPU in Linux system.  Check CPU information use cat command $ cat /proc/cpuinfo Display the CPU architecture information use lscpu command $ lscpu The output terminal as below use cpuid command show x86 CPU $ cpuid display Linux hardware information $ sudo dmidecode processor type Inxi tool command to display Linux system information $ inxi -C The output terminal as below List Hardware Configuration use lshw tool $ sudo lshw -C CPU The output terminal as below hwinfo is used to extract information about the hardware present on a Linux system $ hwinfo -cpu nproc command Printing number of processing units $ nproc The output terminal as below