Linux General and Permission (QUIZ)

NOTE: Each correct answer will give you 5 points

  1. Which command would you use to check the path of mv command?
  2. where mv
    findout mv
    path mv
    which mv

  3. Which command would you use to edit events 56 to 60 using text editor emacs?
  4. !! emacs
    emacs -e 56 61
    fc -e emacs
    fc -e emacs 56 61

  5. What is the syntax for the command you use to re-execute a specific even or command?
  6. fc !!
    fc !s
    fc -e texteditor command
    fc -s command

  7. What command do you use to view the range of commands from event 23 to 33?
  8. fc -l 23 33
    fc -l 23 to 33
    fc -r 23 33
    history 23 33

  9. Which command would you use to restrict the CPU time usage for a user's session?
  10. edquota
    logcheck
    ps -aux | grep getty
    ulimit

  11. Which component of the Pluggable Authentication Modules (PAM) facility performs the authentication operation?
  12. Configuration file procedure
    Module
    Service
    Session

  13. Which command would you use to set full permission for the owner and group and no permission to other users on the files /home/projects/database?
  14. chmod 660 /home/projects/database
    chmod 440 /home/projects/database
    chmod 550 /home/projects/database
    chmod 770 /home/projects/database

  15. What does the command fsck /dev/sda1 does?
  16. fsck resets the file permissions on the file system /dev/sda1
    fsck repairs the msdos filesystem on /dev/sda1
    fsck repairs the UNIX file system on /dev/sda1
    fsck unmounts the filesystem and then repairs /dev/sda1

  17. What is the main purpose of mounting the file system?
  18. To change permission of the filesystem
    To change the ownership of the filesystem
    To check and repair the filesystem
    To connect the filesystem to the UNIX root filesystem

  19. Which command will display date and time?
  20. echo date
    echo $DATE
    echo "date"
    echo `date`

  21. Which command will take you to the Documents directory inside your home directory?
  22. cd /home/Documents
    cd ~/Documents
    cd /Documents
    cd /root/Documents

  23. Which command clones the content of one device to another?
  24. cp
    dd
    mv
    clone

  25. Which cp command option enables you to copy the contents of a directory and its subdirectories?
  26. -r
    -m
    -b
    -s

  27. Which wc command option returns number of characters in a file?
  28. -l
    -m
    -c
    -r

  29. Which command would you use to send a kill signal to all the processes that are running kpoker command?
  30. kill -6 poker
    kill -HUP poker
    killall -KILL poker
    kill poker

  31. Which command can you use to cause the automatic compilation of source files?
  32. configure
    make
    ldconfig
    make install

  33. Which file is generated by the configure command?
  34. make.conf
    Makefile
    config.log
    make_install

  35. Which runlevel indicates that the system is in multiuser mode running the graphical login program?
  36. 3
    4
    5
    6

  37. Which of the below file can be used to add a banner in your Linux machine?
  38. /etc/banner
    /etc/logininfo
    /etc/issue
    /etc/info

  39. How many KILL signal are there by default in a Linux system?
  40. 61
    62
    63
    64

  41. Which UNIX service requires TCP wrappers to perform IP based access control?
  42. cron
    inetd
    syslog
    xinetd

  43. Which command do you use to access /var/log/messages file?
  44. last
    first
    stat
    lastlog

  45. Which command can you use to make /var/log/errors utilize less space in the directory?
  46. compress
    copytruncate
    create
    truncate

  47. Which option would you use to force the logrotate program to rotate the log files?
  48. logrotate -d
    logrorate -f
    logrotate -r
    logrotate -s

  49. Which command tells the logrotate program to retain logs for a month?
  50. compress 4
    create 4
    rotate 4
    weekly