To use the -y option with the apt command, you simply include it in your command line when installing a package. This will automatically confirm any prompts that may arise during the installation process. Here’s the general syntax:
sudo apt install package-name -y
Example
If you want to install a package called curl, you would run:
sudo apt install curl -y
This command will install curl without prompting you for confirmation, allowing the installation to proceed automatically.
