Red Hat Enterprise Linux Essentials - 033

25 Questions | Total Attempts: 417

SettingsSettingsSettings
Please wait...
Red Hat Software Quizzes & Trivia

Answer the questions:


Related Topics
Questions and Answers
  • 1. 
    Which of the following run level reboot the machine?
    • A. 

      0

    • B. 

      4

    • C. 

      2

    • D. 

      6

    • E. 

      1

  • 2. 
    If the file newdir/file2 does not exist but the directory newdir does exist, what is the effect of the following command? mv file1 newdir/file2
    • A. 

      File1 will be moved to newdir and renamed file2.

    • B. 

      File1 will be copied to newdir and named file2.

    • C. 

      An error will be reported, as this is an invalid command.

    • D. 

      Dont know

  • 3. 
    Consider the following command:[[email protected] ~]# echo $?0What does the output“0” indicates? 
    • A. 

      “0” indicates that last command was unsuccessful.

    • B. 

      “0” indicates that your current run level is 0.

    • C. 

      “0” indicates that last command was successful.

    • D. 

      “0” indicates that your current umask is set to 000.

    • E. 

      “0” indicates that password is disabled for root.

  • 4. 
    What type of files are typically in the /etc directory?
    • A. 

      Configuration files.

    • B. 

      Miscellaneous files.

    • C. 

      Standard Linux commands.

    • D. 

      All of the above.

  • 5. 
    Consider the following command:[[email protected] ~]#  cat  /etc/passwd | grep root | cut -d: -f1,7 What will be the output?
    • A. 

      Root.

    • B. 

      /bin/bash.

    • C. 

      Error.

    • D. 

      Root:x:0:0:root:/root:/bin/bash.

    • E. 

      Root: /bin/bash.

  • 6. 
    For the file reports.txt, which of the following commands would, ignoring case, extract every line containing the word "expense", the lines before and after each match, and print the relevant line numbers?
    • A. 

      Grep -i expense reports.txt

    • B. 

      Grep -A1 -B1 -n -i expense reports.txt

    • C. 

      Grep --context=1 -N -i expense reports.txt

    • D. 

      Grep -a1 -b1 -n -i expense reports.txt

    • E. 

      Grep -i -v -n expense reports.txt

  • 7. 
    Consider the following file:[[email protected] ~]# cat catscatcatalogconcatenatepolecatCatWhat will be the output when you fire the below command:sed  ‘s/[Cc]at$/dog/’ cats.
    • A. 

      dog catalog condogenate poledog dog

    • B. 

      cat dogalog condogenate poledog dog

    • C. 

      dog$ dog$alog condog$enate poledog$ dog$

    • D. 

      cat catalog concatenate poledog cat

    • E. 

      dog catalog concatenate poledog dog

  • 8. 
    Where is the configuration information for network interface eth0 stored?
    • A. 

      /etc/network/eth0.cfg

    • B. 

      /etc/network-scripts/eth0.cfg

    • C. 

      /etc/sysconfig/network

    • D. 

      /etc/sysconfig/network-scripts/ifcfg-eth0

    • E. 

      /etc/network/eth0

  • 9. 
    In the file /etc/sysconfig/network-scripts/ifcfg-eth0, which variable is modified to the value "dhcp" in order to get the IP address automatically from DHCP server? (write the name of variable in capital letters only).
  • 10. 
    How many fields (columns) are there in /etc/shadow and /etc/gshadow respectively?
    • A. 

      4, 9

    • B. 

      7, 4

    • C. 

      4, 4

    • D. 

      9, 4

    • E. 

      9, 7

  • 11. 
    Which of the following commands could be used to configure a system's date and time?
    • A. 

      Date

    • B. 

      Datetime

    • C. 

      Timeconf

    • D. 

      Time

    • E. 

      Dateconf

  • 12. 
    Consider the following scripts:echo "Enter the username:"read NAMEuseradd $NAMEecho $NAME | passwd $NAME --stdinWhat will be the password if I run the above script and enter the username as 'abc'?
    • A. 

      Password will be generated automatically

    • B. 

      Machine will ask to enter the password manually

    • C. 

      Password will be abc

    • D. 

      Password will be disabled

    • E. 

      Password will be --stdin

  • 13. 
    What command will be run by this sequence? [[email protected] ~]# !?cat
    • A. 

      The most recent cat command.

    • B. 

      The most recent command that has cat in the command name.

    • C. 

      The most recent command that has cat somewhere on the command line.

    • D. 

      The most recent command before the cat command.

  • 14. 
    Consider the following file:[[email protected] ~]# cat examplebAafced433152aWhat will be the output of below command? Why?cat example | sort | uniq -d
    • A. 

      3, because 3 is repeated in the digit 33.

    • B. 

      33, because 33 is the only two digit character in the whole file.

    • C. 

      A, because A is the capital alphabet in the file.

    • D. 

      A, because a is repeated twice.

    • E. 

      A,3; because both a & 3 are repeated twice.

  • 15. 
    In the following shell script, how many times will the date command run? for i in a b; do date; done
    • A. 

      0

    • B. 

      1

    • C. 

      2

    • D. 

      3

    • E. 

      Script is wrong

  • 16. 
    Which among the following file should be modified in order to make the permanent configuration to the vim editor?
    • A. 

      Vimrc

    • B. 

      .vimrc

    • C. 

      .exrc

    • D. 

      Exrc

    • E. 

      Either .vimrc or .exrc

  • 17. 
    What umask setting wouls be required to give, when creating a directory, read/write/execute for yourself, read & execute for group but only execute for others?
    • A. 

      022

    • B. 

      026

    • C. 

      751

    • D. 

      157

    • E. 

      024

  • 18. 
    Consider a directory /root/dropzone. Which amongst the following permissions should be set up so that group and others can save files in the directory, but they cannot read the files that are there? Root must be able to read and write the directory.
    • A. 

      Drw--wx-wx

    • B. 

      Drwx--x--x

    • C. 

      Drwx-w--w-

    • D. 

      Drwxrwxrwx

    • E. 

      Drwx-wx-wx

  • 19. 
    Write down the command to view the calendar of January 2010.
  • 20. 
    Write down the file in which DNS configuration are made.
  • 21. 
    Suppose you want to view the man page for the gshadow file format. How might you do that?
    • A. 

      Man gshadow --file

    • B. 

      Man 5 gshadow

    • C. 

      Man gshadow format

    • D. 

      Man gshadow

    • E. 

      Man -f gshadow format

  • 22. 
    What will the following command do:find -size 1024k exec rm -f {} \;
    • A. 

      It will delete the file/s of exactly 1 mb

    • B. 

      It will delete the file/s of size greater than 1 mb

    • C. 

      It will delete the file/s of size smaller than 1 mb

    • D. 

      The above command has error

  • 23. 
    Choose the inappropriate option regarding the at and crontab.
    • A. 

      At uses one-time jobs while crontab uses reccuring jobs.

    • B. 

      The syntax for deleting jobs in at is the syntax for deleting jobs in crontab is

    • C. 

      The syntax for creating jobs in at is the syntax for creating jobs in crontab is

    • D. 

      We cannot edit jobs in at while jobs in crontab can be edited using crontab -e command.

  • 24. 
    What command will you type to install linux using CLI?
    • A. 

      Linux

    • B. 

      Text

    • C. 

      Cli

    • D. 

      Linux text

    • E. 

      Linux cli

  • 25. 
    In which of the following file can you set the default run-level?
    • A. 

      /etc/runlevel

    • B. 

      /etc/inittab

    • C. 

      /etc/init

    • D. 

      /etc/motd

    • E. 

      /etc/initlevel