How To Install expect on Fedora 34

expect is A program-script interaction and testing utility

Introduction

In this tutorial we learn how to install expect on Fedora 34.

What is expect

Expect is a tcl application for automating and testing interactive applications such as telnet, ftp, passwd, fsck, rlogin, tip, etc. Expect makes it easy for a script to control another program and interact with it. This package contains expect and some scripts that use it.

We can use yum or dnf to install expect on Fedora 34. In this tutorial we discuss both methods but you only need to choose one of method to install expect.

Install expect on Fedora 34 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install expect using dnf by running the following command:

sudo dnf -y install expect

Install expect on Fedora 34 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install expect using yum by running the following command:

sudo yum -y install expect

How To Uninstall expect on Fedora 34

To uninstall only the expect package we can use the following command:

sudo dnf remove expect

expect Package Contents on Fedora 34

/usr/bin/autoexpect
/usr/bin/dislocate
/usr/bin/expect
/usr/bin/ftp-rfc
/usr/bin/kibitz
/usr/bin/lpunlock
/usr/bin/mkpasswd-expect
/usr/bin/passmass
/usr/bin/rftp
/usr/bin/rlogin-cwd
/usr/bin/timed-read
/usr/bin/timed-run
/usr/bin/unbuffer
/usr/bin/weather
/usr/bin/xkibitz
/usr/lib/.build-id
/usr/lib/.build-id/14
/usr/lib/.build-id/14/2b2e4f42a84125f3b922b0ecfd9263f27f1169
/usr/lib/.build-id/6b
/usr/lib/.build-id/6b/257802a51571f4ff73882ce29bae84d9775d62
/usr/lib64/libexpect.so
/usr/lib64/libexpect5.45.4.so
/usr/lib64/tcl8.6/expect5.45.4
/usr/lib64/tcl8.6/expect5.45.4/pkgIndex.tcl
/usr/share/doc/expect
/usr/share/doc/expect/FAQ
/usr/share/doc/expect/HISTORY
/usr/share/doc/expect/NEWS
/usr/share/doc/expect/README
/usr/share/man/man1/autoexpect.1.gz
/usr/share/man/man1/dislocate.1.gz
/usr/share/man/man1/expect.1.gz
/usr/share/man/man1/kibitz.1.gz
/usr/share/man/man1/mkpasswd-expect.1.gz
/usr/share/man/man1/passmass.1.gz
/usr/share/man/man1/unbuffer.1.gz
/usr/share/man/man1/xkibitz.1.gz

References

Summary

In this tutorial we learn how to install expect on Fedora 34 using yum and dnf.