Search

Linux Basics commands quiz

Linux Basic Commands quiz

Linux Basic Commands quiz

This is a quiz on basic commands of linux.
  1. Which option with the command "rm" is required to remove a directory

  2. -d
    -f
    -r
    -i

  3. The command used to display the manual pages for any command is

  4. man
    manual
    help
    show

  5. Which of following will show the first 5 lines of the input file

  6. less -5 file
    head -5 file
    more -5 file
    show -5 file

  7. Which option of "ls" will show the hidden files

  8. -h
    -a
    -l
    -i

  9. The command "cat -n file" will

  10. Add a new line after every line of the output
    Add line numbers to every line of the output
    Will show only a count of number of lines in the file.
    Will not print any thing.

  11. The command "echo -n hello" will

  12. Print "hello" and add a new line after it
    Not print any thing
    Print "hello" and not add a new line after it
    Change the case and print HELLO

  13. The command sort by default sorts

  14. Text
    Numbers
    Any thing
    Special symbols

  15. Which of the following will list the users who currently logged in in the system

  16. login
    which
    who
    tty

  17. To change the password of a user we can use the command

  18. password
    passwd
    chpass
    su

  19. Which command can be used to view the content of a file in reverse i.e from last line to first.

  20. cat -r
    rev
    tac
    less

feel free mail tux.think@gmail.com for any corrections or clarifications.

Answers are given at : Answers to Linux commands quiz -1

Follow by Email