How to automate interactive installation on Linux: Short&Sweet

Ayesha M
1 min readMar 6, 2020

Nifty way to automate installations — Expect command.

Short&Sweet:

yum -y install expect

autoexpect ./your-installer-file.sh

This will spawn your installer file and prompt you for the answers to the questions and you will provide answers just this once — I promise! It will record your answers and generate a file named script.exp in the same directory. Next time or any number of times you want to run the installer with the same inputs, you just need to do:

./script.exp

And you are done!

--

--

Ayesha M

I am a software developer, who is easily intrigued by anything tech and is always thriving to make software development more inclusive and empathetic.