Bash Basics and Shell Environments Quiz Quiz

  1. Identifying the Shell Prompt

    In a default Bash environment, which character most commonly indicates the shell prompt for a regular user?

    1. $
    2. #
    3. !
    4. %
    5. u0026
  2. File Listing Command

    Which command would you use in Bash to display a list of files and directories in the current working directory?

    1. list
    2. ls
    3. dirct
    4. fl
    5. ld
  3. Changing Directories

    If you are in the home directory and want to move to the Documents folder, which Bash command would you use?

    1. move Documents
    2. jump Documents
    3. cd Documents
    4. chdir Documents
    5. enter Documents
  4. Viewing File Contents

    To quickly view the contents of a text file named notes.txt in the terminal, which Bash command should you use?

    1. show notes.txt
    2. display notes.txt
    3. cat notes.txt
    4. see notes.txt
    5. openfile notes.txt
  5. Understanding Environment Variables

    Which command displays a list of all current environment variables in a Bash shell?

    1. setvars
    2. environment
    3. env
    4. variables
    5. displayenv
  6. Finding Your Current Directory

    If you want to check the full path of your current directory in the Bash shell, which command would you use?

    1. pwd
    2. currentdir
    3. whereami
    4. dirpath
    5. cdpath
  7. Command History Access

    What is the Bash command to display the list of previously entered commands during the current session?

    1. recall
    2. past
    3. log
    4. history
    5. runlist
  8. Creating a New Directory

    Which Bash command should you use to create a new directory named 'projects'?

    1. makedir projects
    2. mkdir projects
    3. createdir projects
    4. dircreate projects
    5. ndir projects
  9. Clearing the Terminal Screen

    If your terminal is cluttered and you want to clear the screen in Bash, which command should you type?

    1. reset
    2. clear
    3. erase
    4. wipescreen
    5. clean
  10. Spelling of the Default Shell

    Which of the following is the correct name of the default shell on many Linux systems?

    1. Dash
    2. Bach
    3. Bash
    4. Bshh
    5. Baash