Ask Question
16 September, 04:34

Which of the following is not a command for determining if MySQL is running on Linux (Ubuntu) ?

(a) sudo service mysql status

(b) ps - ef | grep 'mysql'

(c) sudo check status mysql

(d) sudo systemctl status mysql

+4
Answers (1)
  1. 16 September, 05:35
    0
    (c) sudo check status mysql

    Explanation:

    The commands service, ps and systemctl, are different ways to find out if MySQL is running on Linux (Ubuntu), but there is not such a command called check to do so in Linux.

    Different programs in Linux operating system are organized in processes, and they are all created for a specific purpose: running an application, starting a web browser, and so on.

    Some other programs like the init program start and stop essential service processes and there are currently two major implementations in Linux distributions:

    System V init (traditional implementation) systemd (emerging standard for init).

    The commands service and systemctl are related to System V init and systemd, respectively, and can list the status of a program.

    Thus, the command service can list if MySQL is running on Linux using the piece of code in the question: sudo service mysql status.

    Likewise, the command systemctl can activate and deactivate services, and, among many other functionalities, list the status of a program (like the one in the question: systemctl status mysql).

    The command ps (process status) "displays information about a selection of the active processes" [ps man page]. The command has many options, and some are - e (select all processes) and - f (full-format listing). In this case, the command output is piped to grep (global regular expression print) command to find those processes mainly related to 'mysql'.

    It is important to remember that command sudo (superuser do) permits a user to "execute a command as the superuser or another user" [sudo man page], since commands service and systemctl require privileges to be run, for security reasons.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Which of the following is not a command for determining if MySQL is running on Linux (Ubuntu) ? (a) sudo service mysql status (b) ps - ef | ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers