DNF 套件管理指令

  1. dnf [Tab][Tab] 提示 dnf 工具有 112 可命令可用。
    [root@kvm8 ~]# dnf [Tab][Tab]
    Display all 112 possibilities? (y or n)
    
  2. 列出 dnf 使用的所有套件庫
    [root@kvm8 ~]# dnf repolist
    repo id                                 repo name
    AppStream                               App Stream
    BaseOs                                  Base OS
    
  3. 搜尋 ftp 相關的套件
    [root@kvm8 ~]# dnf search ftp
    baseos                                          8.9 MB/s | 1.5 MB     00:00
    appstream                                        12 MB/s | 1.5 MB     00:00
    Last metadata expiration check: 0:00:01 ago on Wed 08 Oct 2025 02:54:42 PM CST.
    ========================= Name & Summary Matched: ftp ==========================
    ftp.x86_64 : The standard UNIX FTP (File Transfer Protocol) client
    python3-requests-ftp.noarch : FTP transport adapter for python3-requests
    syslinux-tftpboot.noarch : SYSLINUX modules in /tftpboot, available for network
                             : booting
    tftp.x86_64 : The client for the Trivial File Transfer Protocol (TFTP)
    tftp-server.x86_64 : The server for the Trivial File Transfer Protocol (TFTP)
    vsftpd.x86_64 : Very Secure Ftp Daemon
    ============================== Name Matched: ftp ===============================
    lftp.x86_64 : A sophisticated file transfer program
    ============================= Summary Matched: ftp =============================
    curl.x86_64 : A utility for getting files from remote servers (FTP, HTTP, and
                : others)
    nbdkit-curl-plugin.x86_64 : HTTP/FTP (cURL) plugin for nbdkit
    wget.x86_64 : A utility for retrieving files using the HTTP or FTP protocols
    
  4. 試安裝 vsftpd?如果出現 Is this ok [y//N]: 表示設定無誤可以取得套件進行安裝。y 安裝、N 不安裝,輸入 n 不安裝退出。
    [root@kvm8 ~]# dnf install vsftpd
    Last metadata expiration check: 3:23:43 ago on Tue 30 Sep 2025 03:11:06 PM CST.
    Dependencies resolved.
    ================================================================================
     Package         Architecture    Version               Repository          Size
    ================================================================================
    Installing:
     vsftpd          x86_64          3.0.5-9.el10          AppStream          171 k
    
    Transaction Summary
    ================================================================================
    Install  1 Package
    
    Total download size: 171 k
    Installed size: 344 k
    Is this ok [y/N]: n
    Operation aborted.