Variety of shell script in installing phpMyAdmin

As googling, I found the following for installation of phpMyAdmin.on LAMP.

Which one is the correct way in installing phpMyAdmin?
What is difference between (1) without -y and (2) with -y?
What does it mean by “y”?

The -y flag is just for agreeing to everything. It just means “yes” in a way. It’s for lazy people like me when I don’t want to read through all of the agreements. -y isn’t specific for phpMyAdmin or a specific package. It’s a *NIX flag typically for bypassing confirmations such as “Press the enter key or type in yes if you want to continue” screens.

DigitalOcean has a Tutorial that I think I followed to install PhpMyAdmin: (other versions are available)

An earlier version had problems which showed an error after every query and required confirmation to ignore in order to proceed. The error cleared when I installed from PhpMyAdmin site.

Do you mean the following?

It would help to know the Operating System and Version of the LAMP Installation.

Example of NOT using -Y

I use Ubuntu 19.10 and CTRL-ALT-T brings up the Gnome Terminal.

  1. Typing CTRL-R pg searches the History command
  2. Repeatedly pressing CTRL-R until the following History command is found if it has been previously entered.
  3. Pressing ENTER activates the command
  4. Saves a lot of typing :slight_smile:

sudo apt update && sudo apt upgrade

Output:

Pressing y starts the download, install, upgrade commands.

This took about ten minutes. (Normally there are not a lot of packages to install/upgrade and the operation takes less than a minute, unfortunately this is the Resource Candidate version.)

That’s it until another CTRL-ALT-T and CTRL-R tomorrow :slight_smile:

1 Like

What is difference between (1) without -y and (2) with -y?

Whenever you wonder what a command on Linux will do, you can consult the manual with the command man. For apt-get that would be:

man apt-get

This will show you an explanation of what the command is for, and list all options and what they do. In this case, for -y it lists:

-y, --yes, --assume-yes
Automatic yes to prompts. Assume "yes" as answer to all prompts and run non-interactively. If an undesirable situation, such as changing a held package or removing an essential package, occurs then apt-get will abort.

When you don’t like reading from the command line, there is also a website that has a lot of these man pages, just typing man apt-get in google will also take you there: https://linux.die.net/man/8/apt-get

4 Likes

Also, this is the sort of thing you can ask Google. Searching for “apt-get y flag” gives you this as a first result.

2 Likes

Without -y, it’ll prompt you to type in “yes” or “y” every time there’s a screen that requires confirmation. -y bypasses all of those confirmations. So there shouldn’t be any lines asking you to press enter or typing “yes” into the terminal.

1 Like