what does the -y mean in linux. this symbol is always used after a command for example dnf -y install httpd.

Everywhere I have looked I cannot find a definite answer. Please help

  • 4
    Rely on your man pages. Type man dnf (or man find, or whatever) and read away. the command line options (like -y) are listed one by one, often in alphabetical order, with a description of its functionality. Some commands even have an EXAMPLES section at the bottom to get you started. – Stephen C Sep 16 '19 at 23:22
  • Oh yeah, hit q to exit when you're done – Stephen C Sep 16 '19 at 23:34

The -y switch confirms that you want to download and install the package that you've specified whether it's samba or anything else.

If you don't use -y then you'll see a message with the last line being:

Is this ok [y/N]:

Using -y will automatically answer y so that you don't have to type it in.

|improve this answer|||||

If you have such questions, there are a few reflexes you can learn:

help section

type dnf --help, for most programs you will get a help section explaining all options. In this case:

-y, --assumeyes automatically answer yes for all questions

man pages

type man dnf. Many programs provide man(ual) pages explaining how to use the program and its options. Here we also find:

   -y, --assumeyes
          Automatically answer yes for all questions
|improve this answer|||||

Not the answer you're looking for? Browse other questions tagged or ask your own question.