Skip to main content

Linux command: dnf

DNF is a software package manager

Notes while using DNF — software package manager — on Fedora Workstation 30.

dnf Cheat Sheet

dnf install -y packagename1 packagename2
dnf reinstall -y packagename
dnf remove -y packagename
dnf search packagename

Examples

Count number of packages

[tuyen@g73jh ~]$ dnf list | wc -l
58683
[tuyen@g73jh ~]$

Count number of installed packages

[tuyen@g73jh ~]$ dnf list --installed | wc -l
1802
[tuyen@g73jh ~]$ 

Search for 'dynamips' package

[tuyen@g73jh ~]$ dnf search dynamips
Last metadata expiration check: 0:24:44 ago on Wed 18 Sep 2019 10:51:38 AM +07.
======================== Name Exactly Matched: dynamips ========================
dynamips.x86_64 : Cisco Router Emulator
[tuyen@g73jh ~]$ 

Check if 'bison' package is installed

[tuyen@g73jh ~]$ dnf list --installed | grep bison
[tuyen@g73jh ~]$

Check if 'gcc' package is installed

[tuyen@g73jh ~]$ dnf list --installed | grep gcc
gcc.x86_64                                        9.2.1-1.fc30                        @updates                    
gcc-gdb-plugin.x86_64                             9.2.1-1.fc30                        @updates                    
libgcc.i686                                       9.2.1-1.fc30                        @updates                    
libgcc.x86_64                                     9.2.1-1.fc30                        @updates                    
[tuyen@g73jh ~]$ 

Popular posts from this blog

Linux command: lastlog

lastlog command reports the most recent login of all users or of a given user. NAME lastlog - reports the most recent login of all users or of a given user SYNOPSIS lastlog [options] DESCRIPTION lastlog formats and prints the contents of the last login log /var/log/lastlog file. The login-name, port, and last login time will be printed. The default (no flags) causes lastlog entries to be printed, sorted by their order in /etc/passwd. OPTIONS The options which apply to the lastlog command are: -b, --before DAYS Print only lastlog records older than DAYS. -h, --help Display help message and exit. -R, --root CHROOT_DIR Apply changes in the CHROOT_DIR directory and use the configuration files from the CHROOT_DIR directory. -t, --time DAYS Print the lastlog records more recent than DAYS. -u, --user LOGIN|RANGE Print the ...

Install Microsoft .NET Core SDK

.NET Core Software Development Kit (SDK) is a set of libraries and tools that allow developers to create .NET Core applications and libraries.

Powershell: Test-NetConnection

PS C:\Users\tuyen> get-help Test-NetConnection NAME     Test-NetConnection SYNTAX     Test-NetConnection [[-ComputerName] <string>] [-TraceRoute] [-Hops <int>] [-InformationLevel {Quiet |     Detailed}]  [<CommonParameters>]     Test-NetConnection [[-ComputerName] <string>] [-CommonTCPPort] {HTTP | RDP | SMB | WINRM}     [-InformationLevel {Quiet | Detailed}]  [<CommonParameters>]     Test-NetConnection [[-ComputerName] <string>] -Port <int> [-InformationLevel {Quiet | Detailed}]     [<CommonParameters>]     Test-NetConnection [[-ComputerName] <string>] -DiagnoseRouting [-ConstrainSourceAddress <string>]     [-ConstrainInterface <uint32>] [-InformationLevel {Quiet | Detailed}]  [<CommonParameters>] ALIASES     TNC REMARKS     Get-Help cannot find the Help files fo...