Linux LPI 117-101 # 4 Of 9

53 Questions | Total Attempts: 112

SettingsSettingsSettings
Linux Quizzes & Trivia

Linux lpi testing


Questions and Answers
  • 1. 
    Type the command line to check the installed package mypackage for anyconfiguration file changes since install?
  • 2. 
    What command on an rpm-based system will upgrade any existing packages on asystem, but not add any packages? Type just the command and switch(es).
  • 3. 
    What command on an rpm-based system will upgrade any existing packages on asystem, and add any packages needed? Type just the command and switch(es).
  • 4. 
    Which command will allow you to find a specific installed package?
    • A. 

      Rpm -- list rpmname

    • B. 

      Rpm -qvl rpmname

    • C. 

      Rpm rpmname

    • D. 

      Rpm -qv rpmname

    • E. 

      Rpm -f rpmname

  • 5. 
    Which command will print to standard out only the lines that do notbegin with # (pound symbol) in the file foobar?
    • A. 

      /bin/grep ^# foobar

    • B. 

      /bin/grep -v ^# foobar

    • C. 

      /bin/grep #$ foobar

    • D. 

      /bin/grep -v #$ foobar

  • 6. 
    You have an updated RPM called screensaver-1.1.i386. rpm. Youhave version 1.0 installed. Using RPM, how do you view the changelog ofthis file to see if you should install the update?
    • A. 

      Rpm -qp --changelog screensaver-1.1.i386.rpm

    • B. 

      Rpm --changelog screensaver-1.1.i386.rpm

    • C. 

      Rpm -qc screensaver-1.1.i386.rpm

    • D. 

      Rpm -showchangelog screensaver-1.1.i386.rpm

  • 7. 
    You want to preview where the package file,apache- xml.I386.rpm, will install its files before installing it. Whatcommand do you issue?
    • A. 

      Rpm -qp apache-xml.i386.rpm

    • B. 

      Rpm -qv apache-xml.i386.rpm

    • C. 

      Rpm -ql apache-xml.i386.rpm

    • D. 

      Rpm -qpl apache-xml.i386.rpm

  • 8. 
    You see following output while trying to install an updated package:[[email protected] pub]# rpm -i gthumb-2.2.0.i386.rpm package gthumb-1.0.1.i386.rpm is already installed.Which command will allow you to install the updated version?
    • A. 

      Rpm -i gthumb-2.2.0.i386.rpm

    • B. 

      Rpm -ivh gthumb-2.2.0.i386.rpm

    • C. 

      Rpm -U gthumb-2.2.0.i3S6.rpm

    • D. 

      Rpm -qu gthumb-2.2.0.i386.rpm

    • E. 

      Rpm -qiv gthumb-2.2.0.i386.rpm

  • 9. 
    You have to test a new kernel version. Which of the following is thebest way to add a new linux kernel in your system?
    • A. 

      Rpm -fvh kernel_package

    • B. 

      Rpm -Uvh kernel_package

    • C. 

      Rpm -u kernel_package

    • D. 

      Rpm -u kernel_package && make

    • E. 

      Rpm -u kernel_package && make

  • 10. 
    You want to search the file myfile for all occurrences of a string containing at leastfive characters, where character number 2 and 5 are "a" and character number 3 isNOT "b". Which command would you use?
    • A. 

      Grep a*^b*a myfile

    • B. 

      Grep .a[^b].a myfile

    • C. 

      Grep .[a].*.[a] myfile

    • D. 

      Grep .a*^b..a myfile

  • 11. 
    You installed a beta rpm package, but are experiencing some problems with it. Howcan you remove this package?
    • A. 

      Rpm -qe rpmname

    • B. 

      Rpm -V --remove rpmname

    • C. 

      Rpm -r rpmname

    • D. 

      Rpm -r rpmname

    • E. 

      Rpm -ev rpmname

  • 12. 
    You wish to set your shell options so that the output from a redirect will NOToverwrite an existing file. Type the command including switches.
  • 13. 
    You wish to turn off the shell option that stops you overwriting exisiting files. Typethe command in that will do this including switches.
  • 14. 
    You have just typed the following three commands and got the following output:prompt> echo $PATH/usr/bin:/usr/local/bin:usr/sbin:opt/kde/binprompt> pwd/home/anna/gamespromt> lsgame1 game2 game3You want to run the program game1, but get the response that it is not found.What did you forget to do?
    • A. 

      To type ./game1 rather than game1.

    • B. 

      To switch the directory /home/anna first.

    • C. 

      To unset your PATH before running the program.

    • D. 

      To set execution permissions for the program game1.

  • 15. 
    What is the name and full path of the file that contains the system wideEnvironment variables and Startup programs?
  • 16. 
    Type in just the name of the command that allows you to edit the command history,and will execute the contents of the buffer when exited.
  • 17. 
    You wish to find out more information on a file e.g. Last accessed, Modifiedchanged, Inode. What is the simplest command that would show this informationfor a file called certkiller?
  • 18. 
    Which command will output the exit status of the previous command (a 1 or a 0)?
    • A. 

      Echo $?

    • B. 

      Echo $1

    • C. 

      Echo $EXIT

    • D. 

      Exitstatus

  • 19. 
    What 3 letter command will show you the values set by the /etc/profile script file forthe entire system?
  • 20. 
    What 3 letter command will show you the values set by the /etc/bashrc script file forthe entire system?
  • 21. 
    Your Linux machine has 2 monitors. Your second monitor is configures as thesecond screen of the first display. If you want the "netscape" program to bedisplayed on your second monitor, what command should you use before startingnetscape?
    • A. 

      Export set display=:10; netscape

    • B. 

      Export set DISPLAY=:0:0; netscape

    • C. 

      Export set DISPLAY=:0:1; netscape

    • D. 

      Export set DISPLAY=:1:0; netscape

  • 22. 
    You have a dual-head workstation with two monitors. Your secondary monitor isdefined as the second screen of the first display. You want to start Mozilla anddisplay its window on the second display. Which command line would you use toachieve this?
    • A. 

      Export DISPLAY=:1.0; mozilla

    • B. 

      Export DISPLAY=:0.1; mozilla

    • C. 

      Export SECOND=1; mozilla

    • D. 

      Export SECOND=2; mozilla

  • 23. 
    Which of the following are executed ONLY during a Login session? Select all thatapply.
    • A. 

      /etc/profile

    • B. 

      /etc/bashrc

    • C. 

      ~/.bashrc

    • D. 

      ~/.bash_profile

    • E. 

      ~/.bash_logout

  • 24. 
    In which file are you likely to find the settings for umask, path, and ulimit on a peruser basis?
    • A. 

      /etc/profile

    • B. 

      /etc/bashrc

    • C. 

      ~/.bash_profile

    • D. 

      ~/.bashrc

  • 25. 
    In Bash, inserting "1>&2" after a command redirects
    • A. 

      Standard error to standard input

    • B. 

      Standard input to standard error

    • C. 

      Standard output to standard error

    • D. 

      Standard error to standard output

    • E. 

      Standard output to standard input

Back to Top Back to top