Linux Command Line Mastery Quiz

  1. Listing Directory Contents

    Which of the following commands in Linux is used to display information about files and directories contained within the current working directory?

    1. pwd
    2. ls
    3. grep
    4. ps
    5. list
  2. Searching for Patterns in Files

    A command-line command in Linux that allows you to search files for lines containing a match to a given pattern is called what?

    1. rm
    2. chmod
    3. find
    4. grep
    5. serch
  3. Navigating the File System

    Which of the Linux command-line commands listed below is used for directory traversal?

    1. cd
    2. dir
    3. ps
    4. dig
    5. dd
  4. System Shutdown and Restart

    The following command can be used for turning off or restarting a Linux host, which command are we talking about?

    1. reboot
    2. shutdown
    3. exit
    4. taskkill
    5. restart
  5. Displaying the Current Working Directory

    A Linux command displaying an absolute path to, that is full filename of, the current working directory is called what?

    1. mv
    2. pwd
    3. rm
    4. dir
    5. pwdd
  6. Changing User Password

    A Linux command-line command allowing a user to change his or her own password is known as what?

    1. pwd
    2. pass
    3. passwd
    4. password
    5. chpasswd
  7. Copying Files and Directories

    Which of the answers listed below refers to a Unix command for copying files and directories?

    1. cp
    2. copy
    3. xcopy
    4. robocopy
    5. cyp
  8. Moving Files and Directories

    A Linux command used for transferring files or directories to a different directory is called what?

    1. replace
    2. export
    3. move
    4. mv
    5. tranfer
  9. Renaming Files and Directories

    What is the name of a Linux command used for renaming files and directories?

    1. rm
    2. ps
    3. mv
    4. ls
    5. rename
  10. Deleting Files and Directories

    A command-line command in Linux used for deleting files and directories is known as what?

    1. erase
    2. rm
    3. del
    4. edit
    5. delete
  11. Which command shows the system's memory usage?

    Which command displays information about how much memory the system is using?

    1. top
    2. free
    3. df
    4. ps
    5. meminfo
  12. Find a file.

    What command is used to locate a file on the filesystem based on a name pattern?

    1. locate
    2. whereis
    3. which
    4. find
    5. fnd
  13. Command to make a directory.

    Which command do you use to create a new directory?

    1. mkdir
    2. touch
    3. newdir
    4. create
    5. md
  14. What command edits files?

    Which text editor command is most commonly used in the Linux CLI?

    1. word
    2. nano
    3. edit
    4. textedit
    5. gedit
  15. Changing file permissions

    What command is used to change the access permissions of a file or directory?

    1. chmod
    2. chown
    3. chgrp
    4. perm
    5. acl