How to automate the consent of (y) in bash?

Hello, could you tell me how to automatically confirm the installation of packages bash script. Establish the following:

apt-get install libfile-copy-recursive-perl libmysqlclient18 proftpd-mod-vroot update-inetd

Tried these variations (just via terminal)

apt-get install libfile-copy-recursive-perl libmysqlclient18 proftpd-mod-vroot update-inetd --force-yes
apt-get install libfile-copy-recursive-perl libmysqlclient18 proftpd-mod-vroot update-inetd-y
apt-get install -y libfile-copy-recursive-perl libmysqlclient18 proftpd-mod-vroot update-inetd

Nothing puts. Only when you manually click on the Y everything is in order. Tell me how to do everything)
June 10th 19 at 14:27
5 answers
June 10th 19 at 14:29
Here all the same. Can you show an example of this?

apt-get install libfile-copy-recursive-perl libmysqlclient18 proftpd-mod-vroot update-inetd - Vivien_Herman commented on June 10th 19 at 14:32
apt-get install -y packages - sherwood.Gutkows commented on June 10th 19 at 14:35
and here you take this and try to do so) apt-get install -y libfile-copy-recursive-perl libmysqlclient18 proftpd-mod-vroot update-inetd

On Ubuntu 14.04 - Vivien_Herman commented on June 10th 19 at 14:38
June 10th 19 at 14:31
Read man apt-get
man, unlike Google, will show the help it is for the current version of apt-get because there are nuances
somewhere --yes, somewhere --force-yes where-the -y, depending on distribution and version.
Well, here I am all these 3 options I tried, none of them fit( - Vivien_Herman commented on June 10th 19 at 14:34
and which option you found in your man apt-get? - sherwood.Gutkows commented on June 10th 19 at 14:37
June 10th 19 at 14:33
So I have not asked:
apt-get --yes --force-yes install ...
root@tests:~# apt-get --yes --force-yes libfile-copy-recursive-perl libmysqlclient18 proftpd-mod-vroot update-inetd
E: Command line option --yes is not understood

But if instead of --y to do y as not being mounted. - Vivien_Herman commented on June 10th 19 at 14:36
And install where?
Should be:
apt-get --yes --force-yes install libfile-copy-recursive-perl libmysqlclient18 proftpd-mod-vroot update-inetd - sherwood.Gutkows commented on June 10th 19 at 14:39
The truth is I always says after installation:
W: --force-yes is deprecated, instead use the options that begin with --allow.
but I always forget about it :-)

morihaos@n145xu:~$ uname-a
Linux n145xu 4.10.0-40-generic #44~16.04.1-Ubuntu SMP Thu Oct 9 15:33:07 UTC 2017 i686 i686 i686 GNU/Linux - Vivien_Herman commented on June 10th 19 at 14:42
June 10th 19 at 14:35
-y should work, here is the story:
apt-get install -y libfile-copy-recursive-perl libmysqlclient18 proftpd-mod-vroot update-inetd

If not working, give full output from terminal, can you just sudo missed?
Here is an example where -y: https://github.com/nazar-pc/docker-webserver/blob/...
June 10th 19 at 14:37
yes | team

Find more questions by tags LinuxUbuntuDebianbash