Hbwsl - Linux Basic Commands

30 Questions

Settings
Please wait...
Linux Commands Quizzes & Trivia

Basic Linux commands.


Questions and Answers
  • 1. 
    What command shows you memory utilization?
  • 2. 
    What command clears the contents of your terminal display?
  • 3. 
    What command is used to change the permissions of a file?
  • 4. 
    What command is used to change ownership of a file?
  • 5. 
    What command allows you to view a file one page at a time?
  • 6. 
    What is the default directory path for system log files?
  • 7. 
    What command is used to copy a file?
  • 8. 
    What command is used to change directories?
  • 9. 
    What do you type in to move to the parent directory
  • 10. 
    What is the command to delete a file?
  • 11. 
    What is the command to run a program with elevated permissions?
  • 12. 
    What is the command to switch to the root user account?
  • 13. 
    If you want to protect files from deletion, you have to
    • A. 

      Change the file write permission

    • B. 

      Change the file read permission

    • C. 

      Change the file's directory write permission

    • D. 

      Change the file's directory read permission

  • 14. 
    If you want to protect files from content modifications, you have to
    • A. 

      Change the file write permission

    • B. 

      Change the file read permission

    • C. 

      Change the file's directory write permission

    • D. 

      Change the file's directory read permission

  • 15. 
    If you want to restrict users from directory content listing, you have to
    • A. 

      Change the file write permission

    • B. 

      Change the file read permission

    • C. 

      Change the directory write permission

    • D. 

      Change the directory read permission

  • 16. 
    Chmod 644 finance.doc644 equals to
    • A. 

      Rwx r-x r-x

    • B. 

      Rw- r-x r-x

    • C. 

      R-- r-- ---

    • D. 

      Rw- r-- r--

    • E. 

      Rw- rw- rw-

  • 17. 
    The difference between "x" permission in file and directory, is
    • A. 

      Both means execute permission in directory and file

    • B. 

      Execute permission in directory, enter permission in file

    • C. 

      Enter permission in directory, execute permission in file

    • D. 

      Execute permission in file, not applicable in directory

  • 18. 
    The command to restrict user not to delete finance.doc within directory /home/budi
    • A. 

      Chmod +w finance.doc

    • B. 

      Chmod -w finance.doc

    • C. 

      Chmod +w /home/budi

    • D. 

      Chmod -w /home/budi

  • 19. 
    You're now in directory X1 (see below). Moving to directory X3 using command:X1 <--- You're here |__     X2      |__          X3
    • A. 

      Cd X3/

    • B. 

      Cd /X3

    • C. 

      Cd /X2/X3

    • D. 

      Cd X2/X3/

  • 20. 
    One single command to completely remove directory X1 and all it's contents (see below)X1 |__     X2      |__          X3
    • A. 

      Rm X1

    • B. 

      Rmdir X1

    • C. 

      Rm -f X1

    • D. 

      Rm -rf X1

  • 21. 
    You're now in directory X3 (see below). Moving to directory X1 using command:X1  |__     X2      |__          X3 <--- You're here
    • A. 

      Cd .

    • B. 

      Cd ..

    • C. 

      Cd ../..

    • D. 

      Cd ../../..

  • 22. 
    One single command to create new directory X3 inside new directory X2 inside new directory X1 (see below)X1 |__     X2      |__          X3
    • A. 

      Mkdir X1 X2 X3

    • B. 

      Mkdir X1/X2/X3

    • C. 

      Mkdir X1 X1/X2 X1/X2/X3

    • D. 

      Mkdir X3 X3/X2 X3/X2/X1

  • 23. 
    The symbol represents home directory is?
    • A. 

      ~

    • B. 

      .

    • C. 

      ..

    • D. 

      -

  • 24. 
    The symbol represents current directory is?
    • A. 

      ~

    • B. 

      .

    • C. 

      ..

    • D. 

      -

  • 25. 
    __________ command used to create an empty file.
    • A. 

      Mtfile

    • B. 

      Touch

    • C. 

      File

    • D. 

      Intouch

    • E. 

      Create

  • 26. 
    You want to change the permissions on the file named “fifteen” so that owner has all permissions while all other users don't have any permissions. Which command should you use?
    • A. 

      Chmod fifteen 700

    • B. 

      Chmod 100 fifteen

    • C. 

      Chmod 700 fifteen

    • D. 

      Chmod fifteen 100

    • E. 

      Chmod 770 fifteen

  • 27. 
    How would you show a list of files and directories that are inside the current directory?
    • A. 

      List

    • B. 

      Ls

    • C. 

      Dir

    • D. 

      Listfiles

    • E. 

      Listout

  • 28. 
    Which command to use for complete details of a command on the shell?
    • A. 

      Help

    • B. 

      ?

    • C. 

      Man

    • D. 

      Hlp

    • E. 

      Info

  • 29. 
    tail file
    • A. 

      Show top 10 lines

    • B. 

      Show bottom 10 lines

    • C. 

      Show contents of files

  • 30. 
    head file
    • A. 

      Show contents of files

    • B. 

      Show top 10 lines

    • C. 

      Show bottom 10 lines