Linux Commands Multiple Choice

40 Questions | Total Attempts: 6052

SettingsSettingsSettings
Linux Commands Multiple Choice - Quiz

Hey, check out this incredible 'Linux commands multiple-choice quiz' that consists of well-researched questions and answers. This quiz is perfect for anyone who is in college studying Linux, systems administration, or other computer courses and want to test themselves on multiple-choice questions for exams. So, are you ready to take this test? Do you think you can pass it? Let's start the quiz and see how well you score. Good luck!


Questions and Answers
  • 1. 
    During the linux boot process, what happens immediately after the phase called "load kernel"?
    • A. 

      Load initial ramdisk

    • B. 

      Run init

    • C. 

      Mount root filesystem

    • D. 

      Load modules

  • 2. 
    How do you copy an entire directory structure? E.g. from Project to Project.backup
    • A. 

      Cp -r Project Project.backup

    • B. 

      Cp -e Project Project.backup

    • C. 

      Cp -d Project Project.backup

    • D. 

      Cp -s Project Project.backup

  • 3. 
    How do you create a crontab entry?
    • A. 

      Crontab -c

    • B. 

      Crontab -e

    • C. 

      Crontab -make

    • D. 

      Crontab --create

  • 4. 
    How do you delete your crontab entry?
    • A. 

      Crontab -d

    • B. 

      Crontab -e

    • C. 

      Crontab -r

    • D. 

      Del -crontab

  • 5. 
    How do you direct the shell to execute a command in the background?
    • A. 

      Put an & symbol at the end of the command line.

    • B. 

      Key in fg followed by the command name.

    • C. 

      Press Ctrl+c after you have keyed in the command.

    • D. 

      Press Ctrl+d after you have keyed in the command.

  • 6. 
    How do you display the kernel release?
    • A. 

      Kernel -r

    • B. 

      Uname -r

    • C. 

      Cat /proc/etc/kernel/release

    • D. 

      Cat /etc/config/kernel/release

  • 7. 
    How do you display your current crontab entry?
    • A. 

      Crontab -display

    • B. 

      Crontab -d

    • C. 

      List --crontab

    • D. 

      Crontab -l

  • 8. 
    How do you find out information about your identity, including the names of the groups you are in?
    • A. 

      Echo $UID

    • B. 

      Id

    • C. 

      Cat /etc/passwd

    • D. 

      Cat /etc/groups

  • 9. 
    How do you run a job that will continue running even if you are logged out?
    • A. 

      Hup.out command

    • B. 

      Hup command

    • C. 

      Jobc command

    • D. 

      Nohup command

  • 10. 
    How do you see if two files are hard linked to each other?
    • A. 

      Hl -l

    • B. 

      Ln -s

    • C. 

      Ls -i

    • D. 

      Link -s

  • 11. 
    How do you create a crontab entry?
    • A. 

      Crontab --create

    • B. 

      Crontab -make

    • C. 

      Crontab -e

    • D. 

      Crontab -c

  • 12. 
    How would you avoid accidentally removing files?
    • A. 

      Rm -i

    • B. 

      Rm -chk

    • C. 

      Rm -a

    • D. 

      Rm -r

  • 13. 
    How would you continuously display memory usage every 5 seconds?
    • A. 

      Free -s 5

    • B. 

      Top -m 5

    • C. 

      Du -m 5

    • D. 

      Mem -c 5

  • 14. 
    How would you display running httpd processes?
    • A. 

      Ps -C httpd

    • B. 

      Ps -d httpd

    • C. 

      Ps -r httpd

    • D. 

      Ps -D httpd

  • 15. 
    How would you find out what your current login shell is?
    • A. 

      Cat /etc/shell

    • B. 

      Cat /etc/current/shell

    • C. 

      Ps | grep sshd

    • D. 

      Echo $$SHELL

  • 16. 
    How would you list oldest files first and newest ones last?
    • A. 

      Ls /o-d

    • B. 

      Ls -od

    • C. 

      Ls -rt

    • D. 

      Ls -dt

  • 17. 
    How would you lock the user account named csm099?
    • A. 

      Usermod -l csm099

    • B. 

      Usermod -L csm099

    • C. 

      Usermod --l csm099

    • D. 

      Usermod -lock csm099

  • 18. 
    How would you remove a directory that is not empty?
    • A. 

      Rm -r

    • B. 

      Rm -f

    • C. 

      Rmdir -f

    • D. 

      Rmdir -le

  • 19. 
    How would you show process hierarchy in forest format?
    • A. 

      Ps -ef -tree

    • B. 

      Ps -ef --f

    • C. 

      Ps -ef --forest

    • D. 

      Ps -ef -t

  • 20. 
    How would you sort a file called shopping on column 3?
    • A. 

      Sort -n 3 shopping

    • B. 

      Sort -k 3 shopping

    • C. 

      Sort -c 3 shopping

    • D. 

      Sort -c3 shopping

  • 21. 
    How would you switch to virtual terminal 1?
    • A. 

      Ctrl+Alt+F1

    • B. 

      Alt+F1

    • C. 

      Ctrl+F1

    • D. 

      Shift+Ctrl+F1

  • 22. 
    How would you turn on the sticky bit on the directory /tmp?
    • A. 

      Chmod u+s /tmp

    • B. 

      Chmod +st /tmp

    • C. 

      Chmod a+s /tmp

    • D. 

      Chmod o+t /temp

  • 23. 
    In which directory are the crontab files for users stored on suse linux?
    • A. 

      /var/spool/cron/tabs

    • B. 

      /usr/lib/cron

    • C. 

      /usr/bin/cron/crontabs

    • D. 

      /var/spool/cron/users/tabs

  • 24. 
    Some commands, including cat, interpret a minus sign (-) as a shortcut for...
    • A. 

      /dev/stdin

    • B. 

      /dev/stdout

    • C. 

      /dev/stderr

    • D. 

      /dev/hdal

  • 25. 
    Suppose you are in your home directory, /home/raf as in diagram above. What is the relative path for the file called "save" in the Email subdirectory?
    • A. 

      Raf/email/save

    • B. 

      /email/save

    • C. 

      /home/raf/email/save

    • D. 

      Email/save

Back to Top Back to top
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.