Joshua Yates

Joshua Yates

1653102540

Linux dnf Command Explained with Examples

Linux Crash Course - The dnf Command

There's a handful of popular package managers that are used on various  Linux distributions, and dnf is among the most popular. It's the default package manager on distros such as Red Hat, CentOS, AlmaLinux, Rocky Linux, Fedora, among others. In this video, we'll explore the dnf command and see examples of basic usage.

## Individual sections
00:00 - Intro
01:04 - Sponsor for this video: Linode
02:30 - What is "dnf"?
03:14 - Installing a single package with dnf
07:45 - Using dnf to search for a package to install
09:45 - Listing installed packages
11:10 - Listing packages that have been recently updated
12:06 - Installing more than one package at a time
15:48 - Uninstalling packages with dnf
17:39 - Updating a package to the latest version
18:47 - Updating all installed packages to the latest version
20:41 - Setting up automatic updates with dnf-automatic
24:00 - Reinstalling a package with dnf
25:29 - Removing unused dependencies

#linux 

What is GEEK

Buddha Community

Linux dnf Command Explained with Examples

Examples of the dig command in Linux

Dig Command Line Options and Examples
Here is the frequently used command line options and example’s of dig command.
1. Basic Dig Command
A basic dig command accept domain name as command line parameter and prints Address record.
2. Query With Specific DNS Server
The default dig command queries to dns server configured on your system. For example, the Linux systems keep default DNS entry in /etc/resolv.conf.
3. Print Short Answer
Use +short command line option to print result in short form. This is basically useful with the shell scripting and other automation tasks.
4. Print Detailed but Specific Result
Use +noall with +answer to print detailed information but specific. This will print only answer section including few more details as a result.

#linux commands #command #dig #dig command #useful examples #linux

Useful Example for the mv command in Linux

mv Command Examples
Below is the basic mv command examples on Linux terminal.

  • Rename file in current directory – For example rename file source.txt to dest.txt in current directory.
  • Move file to destination directory – Move a source.txt file available in current directory to /tmp directory. In above command the file name is unchanged at target directory. You can also rename file name at destination directory just by providing filename at destination.
  • Move file from source directory to destination directory – We can also move files or directory from some other directory to destination directory.
  • Move multiple files to destination at once – The mv accepts multiple source files and move them to the destination directory at once. The following command will move file1.txt, file2.txt in current directory and /opt/file3.txt to the /tmp directory. Here the last command line parameter is used as destination by the mv command.

#linux commands #command #mv #useful example #mv command #linux

Examples of how to use the lsof command in Linux

Below are some of the popular usage of the lsof command.

  1. List all open files
  2. List by filename
  3. List open files by username
  4. List open files by process
  5. List open files by PID
  6. List open files containing directory
  7. Repeat mode
  8. List open files with network protocol
  9. List open files by port
  10. List open files by IPv4/IPv6
  11. List open files on NFS
  12. List locked deleted files

#linux #command #lsof command #examples

date command in Linux with Examples

date Command Examples
Show date time in UTC/GMT
View past dates on specific days
View future dates
View date in other timezone
Print date in specific format
View file modification time

#linux commands #command #date #linux

Examples of the curl command in Linux

URL Syntax
The URL syntax is completely protocol-dependent with cURL. Before reading more about parameters or example, you must know the URL formats, you can use with curl.
CURL Command Options
curl command comes with large number of command line options. Which provides it great flexibility to perform various tasks. Here we will describe you some frequently used command options with curl command.

#linux commands #curl #examples #linux