LX0-103: CompTIA Linux+ Certification Test! Trivia Questions Quiz

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Catherine Halcomb
Catherine Halcomb
Community Contributor
Quizzes Created: 1443 | Total Attempts: 6,686,485
| Attempts: 165
SettingsSettings
Please wait...
  • 1/120 Questions

    Which command is used in a Linux environment to create a new directory? (Specify ONLY the command without any path or parameters.)

Please wait...
About This Quiz

Are you looking for a trivia questions quiz to help you with the Lx0-103: CompTIA Linux+ Certification Test? Every time you get a certificate you have three years till you take the next exam so it is very important to ensure that you are up to date with changes in the information sector. How about you give it a shot and get the well-deserved revision. All the best!

LX0-103: CompTIA Linux+ Certification Test! Trivia Questions Quiz - Quiz

Quiz Preview

  • 2. 

    What is the output of the following command? echo “Hello World” | tr -d aieou

    • Hello World

    • Eoo

    • Hll Wrld

    • Eoo Hll Wrld

    Correct Answer
    A. Hll Wrld
    Explanation
    The given command "echo "Hello World" | tr -d aieou" is a combination of two commands. The "echo" command is used to display the string "Hello World" on the console. The "|" symbol is a pipe operator, which redirects the output of the "echo" command to the input of the "tr" command. The "tr" command is used to delete characters specified in the set "aieou" from the input. Therefore, the output will be "Hll Wrld" as all the vowels (a, i, e, o, u) are removed from the original string "Hello World".

    Rate this question:

  • 3. 

    Which of the following commands replaces each occurrence of ‘bob’ in the file letter with ‘Bob’ and writes the result to the file newletter?

    • Sed ‘s/bob/Bob/g’ letter > newletter

    • Sed ‘s/bob, Bob/’ letter > newletter

    • Sed ‘s/bob/Bob’ letter > newletter

    • Sed ‘/bob/Bob’ letter > newletter

    • Sed s/bob/Bob/ letter < newletter

    Correct Answer
    A. Sed ‘s/bob/Bob/g’ letter > newletter
    Explanation
    The correct answer is "sed 's/bob/Bob/g' letter > newletter" because it uses the sed command with the 's' flag to substitute each occurrence of 'bob' with 'Bob' in the file "letter". The 'g' flag ensures that all occurrences are replaced, not just the first one. The '>' symbol redirects the output to a new file called "newletter".

    Rate this question:

  • 4. 

    Which of the following commands will print the last 10 lines of a text file to the standard output?

    • Tail -n 10 filename

    • Head -n 10 filename

    • Cat -n 10 filename

    • Dump -n 10 filename

    Correct Answer
    A. Tail -n 10 filename
    Explanation
    The correct answer is "tail -n 10 filename". The tail command is used to display the last part of a file. The "-n 10" option specifies that it should display the last 10 lines of the file. Therefore, this command will print the last 10 lines of the text file to the standard output.

    Rate this question:

  • 5. 

    Which of the following options is used in a GRUB Legacy configuration file to define the amount of time that the GRUB menu will be shown to the user?

    • Splash

    • Timeout

    • Hidemenu

    • Showmenu

    Correct Answer
    A. Timeout
    Explanation
    The correct answer is "timeout". In a GRUB Legacy configuration file, the "timeout" option is used to define the amount of time that the GRUB menu will be shown to the user. This option allows the user to select an operating system or boot option before the default option is automatically selected.

    Rate this question:

  • 6. 

    Which command will disable swapping on a device? (Specify ONLY the command without any path or parameters.)

    Correct Answer
    swapoff, /sbin/swapoff
    Explanation
    The command "swapoff" is used to disable swapping on a device. This command is typically located in the "/sbin" directory. By running this command without any path or parameters, the swapping functionality on the device will be turned off.

    Rate this question:

  • 7. 

    What is the purpose of the Bash built-in export command?

    • It makes the command history available to subshells.

    • It sets up environment variables for applications.

    • It runs a command as a process in a subshell.

    • It allows disks to be mounted remotely.

    • It shares NFS partitions for use by other systems on the network.

    Correct Answer
    A. It sets up environment variables for applications.
    Explanation
    The purpose of the Bash built-in export command is to set up environment variables for applications. Environment variables are used to store information that can be accessed by programs running on the system. By using the export command, these variables are made available to all child processes and subshells, allowing them to access and use the information stored in the variables.

    Rate this question:

  • 8. 

    57. What is the difference between the i and a commands of the vi editor?

    • I (insert) inserts text before the current cursor position whereas a (append) inserts text after the cursor.

    • I (independent rows) starts every new line at the first character whereas a (aligned rows) keeps the indentation of the previous line.

    • I (interactive) requires the user to explicitly switch between vi modes whereas a (automatic) switches modes automatically.

    • I (interrupt) temporarily suspends editing of a file to the background whereas a (abort) terminates editing.

    Correct Answer
    A. I (insert) inserts text before the current cursor position whereas a (append) inserts text after the cursor.
    Explanation
    The i command in the vi editor allows the user to insert text before the current cursor position, while the a command allows the user to insert text after the cursor. This means that when using the i command, the text will be inserted at the current cursor position, pushing the existing text forward. On the other hand, when using the a command, the text will be inserted after the cursor, without affecting the existing text.

    Rate this question:

  • 9. 

    Which character, added to the end of a command, runs that command in the background as a child process of the current shell?

    • #

    • !

    • +

    • &

    • %

    Correct Answer
    A. &
    Explanation
    The character "&" added to the end of a command runs that command in the background as a child process of the current shell. This means that the command will be executed separately from the current shell, allowing the user to continue using the shell while the command is running in the background.

    Rate this question:

  • 10. 

    Which of the following commands prints a list of usernames (first column) and their primary group (fourth column) from the /etc/passwd file?

    • Fmt -f 1,4 /etc/passwd

    • Split -c 1,4 /etc/passwd

    • Cut -d : -f 1,4 /etc/passwd

    • Paste -f 1,4 /etc/passwd

    Correct Answer
    A. Cut -d : -f 1,4 /etc/passwd
    Explanation
    The command "cut -d : -f 1,4 /etc/passwd" is the correct answer because it uses the "cut" command to extract specific fields from the /etc/passwd file. The "-d :" option specifies that the fields are delimited by colons, and the "-f 1,4" option specifies that the first and fourth fields should be extracted. This will result in a list of usernames (first column) and their primary groups (fourth column) being printed.

    Rate this question:

  • 11. 

    Which variable defines the directories in which a Bash shell searches for executable commands?

    • BASHEXEC

    • BASHRC

    • PATH

    • EXECPATH

    • PATHRC

    Correct Answer
    A. PATH
    Explanation
    The variable "PATH" defines the directories in which a Bash shell searches for executable commands. It contains a list of directory paths separated by colons, and when a command is entered in the shell, it will search for the command's executable file in each of these directories in the order specified.

    Rate this question:

  • 12. 

    Which of the following commands will write a message to the terminals of all logged in users?

    • Mesg

    • Print

    • Wall

    • Yell

    • Bcast

    Correct Answer
    A. Wall
    Explanation
    The "wall" command is used to write a message to the terminals of all logged in users. It is a broadcast command that sends a message to all users who are currently logged in, regardless of their location or terminal. This command is commonly used by system administrators to send important announcements or notifications to all users on a system.

    Rate this question:

  • 13. 

    Which of the following commands is used to update the list of available packages when using dpkg based package management?

    • Apt-get refresh

    • Apt-cache upgrade

    • Apt-get upgrade

    • Apt-get update

    • Apt-cache update

    Correct Answer
    A. Apt-get update
    Explanation
    The correct answer is apt-get update. This command is used to update the list of available packages when using dpkg based package management. It retrieves the latest package information from the repositories and updates the local package database.

    Rate this question:

  • 14. 

    Which of the following commands moves and resumes in the background the last stopped shell job?

    • Back

    • Run

    • Bg

    • Fg

    Correct Answer
    A. Bg
    Explanation
    The command "bg" is used to move and resume the last stopped shell job in the background. It allows the job to continue running without being attached to the current terminal session. This is useful when a job has been stopped using the "Ctrl+Z" command and needs to be resumed in the background.

    Rate this question:

  • 15. 

    During a system boot cycle, what program is executed after the BIOS completes its tasks?

    • The init program

    • The kernel

    • The inetd program

    • The bootloader

    Correct Answer
    A. The bootloader
    Explanation
    After the BIOS completes its tasks during a system boot cycle, the bootloader program is executed. The bootloader is responsible for loading the operating system into memory and initiating its execution. It is typically stored in a specific location on the computer's hard drive or in a separate boot partition. The bootloader plays a crucial role in the boot process by locating the operating system files and transferring control to the kernel, which is the core of the operating system.

    Rate this question:

  • 16. 

    Which of the following commands kills the process with the PID 123 but allows the process to “clean up” before exiting?

    • Kill -KILL 123

    • Kill -STOP 123

    • Kill -TERM 123

    • Kill -PIPE 123

    Correct Answer
    A. Kill -TERM 123
    Explanation
    The command "kill -TERM 123" kills the process with the PID 123 but allows the process to "clean up" before exiting. The -TERM option sends a termination signal to the process, allowing it to gracefully exit and perform any necessary cleanup tasks before terminating. This is in contrast to the -KILL option, which immediately terminates the process without giving it a chance to clean up. The -STOP and -PIPE options are not relevant to this scenario.

    Rate this question:

  • 17. 

    Which of the following is correct when talking about mount points?

    • Files within a directory are deleted when the directory is used as a mount point.

    • Directories need to have the SetUID flag set to be used as a mount point.

    • Every existing directory can be used as a mount point.

    • Only empty directories can be used as a mount point.

    Correct Answer
    A. Every existing directory can be used as a mount point.
    Explanation
    Every existing directory can be used as a mount point. This means that any directory on a file system can be designated as a mount point for another file system. When a file system is mounted on a directory, the contents of that directory are hidden and replaced by the contents of the mounted file system. It is not necessary for the directory to be empty or have any specific permissions or flags set in order to be used as a mount point.

    Rate this question:

  • 18. 

    Which grep command will print only the lines that do not end with a / in the file foo?

    • Grep ‘/#’ foo

    • Grep -v ‘/$’ foo

    • Grep ‘/$’ foo

    • Grep -v ‘/#’ foo

    Correct Answer
    A. Grep -v ‘/$’ foo
    Explanation
    The correct answer is "grep -v '/$' foo". This command will use the grep utility to search for lines in the file "foo" that do not end with a forward slash ("/"). The "-v" option in grep is used to invert the match, so it will print the lines that do not match the pattern. The pattern in this case is '/$', which represents the end of a line followed by a forward slash. Therefore, this command will print only the lines that do not end with a forward slash in the file "foo".

    Rate this question:

  • 19. 

    When given the following command line. echo “foo bar” | tee bar | cat Which of the following output is created?

    • Cat

    • Foo bar

    • Tee bar

    • Bar

    • Foo

    Correct Answer
    A. Foo bar
    Explanation
    The given command line uses the "echo" command to print the string "foo bar". The "|" symbol is used to redirect the output of the echo command to the "tee" command, which creates a file named "bar" and also displays the output on the screen. The "|" symbol is used again to redirect the output of the tee command to the "cat" command, which simply displays the output on the screen. Therefore, the output created will be "foo bar".

    Rate this question:

  • 20. 

    Which umask value will result in the default access permissions of 600 (rw——-) for files and 700 (rwx——) for directories? (Specify only the numerical umask value.)

    Correct Answer
    0077, 077
    Explanation
    A umask value of 0077 will result in the default access permissions of 600 (rw-------) for files and 700 (rwx------) for directories. The umask value determines the permission bits that are turned off when a new file or directory is created. In this case, the umask value of 0077 means that the read, write, and execute permission bits for the group and others are turned off, resulting in the desired permissions of 600 for files and 700 for directories.

    Rate this question:

  • 21. 

    Which of the following commands displays the contents of a gzip compressed tar archive?

    • Gzip archive.tgz | tar xvf –

    • Tar ztf archive.tgz

    • Gzip -d archive.tgz | tar tvf –

    • Tar cf archive.tgz

    Correct Answer
    A. Tar ztf archive.tgz
    Explanation
    The command "tar ztf archive.tgz" displays the contents of a gzip compressed tar archive. The "z" option is used to specify that the archive is compressed with gzip, and the "t" option is used to list the contents of the archive. The "f" option is used to specify the name of the archive file.

    Rate this question:

  • 22. 

    What happens after issuing the command vi without any additional parameters?

    • Vi starts and loads the last file used and moves the cursor to the position where vi was when it last exited.

    • Vi starts and requires the user to explicitly either create a new or load an existing file.

    • Vi exits with an error message as it cannot be invoked without a file name to operate on.

    • Vi starts in command mode and opens a new empty file.

    • Vi starts and opens a new file which is filled with the content of the vi buffer if the buffer contains text.

    Correct Answer
    A. Vi starts in command mode and opens a new empty file.
    Explanation
    After issuing the command "vi" without any additional parameters, the vi editor will start in command mode and open a new empty file. This means that the user can begin typing and editing text in the newly opened file. The other options are incorrect because they either involve loading a previous file, requiring the user to explicitly create or load a file, or exiting with an error message.

    Rate this question:

  • 23. 

    What command will generate a list of user names from /etc/passwd along with their login shell?

    • Column -s : 1,7 /etc/passwd

    • Chop -c 1,7 /etc/passwd

    • Colrm 1,7 /etc/passwd

    • Cut -d: -f1,7 /etc/passwd

    Correct Answer
    A. Cut -d: -f1,7 /etc/passwd
    Explanation
    The command "cut -d: -f1,7 /etc/passwd" will generate a list of user names from /etc/passwd along with their login shell. The "cut" command is used to extract specific columns from a file, and in this case, the delimiter (-d) is set to ":" and the fields (-f) to be extracted are 1 and 7. This will extract the first field (user name) and the seventh field (login shell) from the /etc/passwd file.

    Rate this question:

  • 24. 

    What is the default nice level when a process is started using the nice command?

    • -10

    • 0

    • 10

    • 20

    Correct Answer
    A. 10
    Explanation
    The default nice level when a process is started using the nice command is 10. The nice command is used in Unix-like operating systems to adjust the scheduling priority of a process. The nice level ranges from -20 to 19, with lower values indicating higher priority. A nice level of 10 means that the process has a relatively lower priority compared to other processes, allowing them to have more CPU time.

    Rate this question:

  • 25. 

    In a nested directory structure, which find command line option would be used to restrict the command to searching down a particular number of subdirectories?

    • -dirmax

    • -maxdepth

    • -maxlevels

    • -n

    • -s

    Correct Answer
    A. -maxdepth
    Explanation
    The correct answer is -maxdepth. This option is used to limit the depth of the search in a nested directory structure. By specifying a number after -maxdepth, the find command will only search for files and directories within that number of subdirectories. For example, if -maxdepth 2 is used, the search will be restricted to only two levels of subdirectories.

    Rate this question:

  • 26. 

    Which of the following commands changes the ownership of file.txt to the user dan and the group staff?

    • Chown dan/staff file.txt

    • Chown dan:staff file.txt

    • Chown -u dan -g staff file.txt

    • Chown dan -g staff file.txt

    Correct Answer
    A. Chown dan:staff file.txt
    Explanation
    The correct answer is "chown dan:staff file.txt". This command uses the chown command to change the ownership of the file.txt to the user "dan" and the group "staff". The colon ":" is used to separate the user and group names in the chown command.

    Rate this question:

  • 27. 

    After running the command umount /mnt, the following error message is displayed: umount: /mnt: device is busy. What is a common reason for this message?

    • The kernel thinks that a process is about to open a file in /mnt for reading.

    • The files in /mnt have been scanned and added to the locate database.

    • The kernel has not finished flushing disk writes to the mounted device.

    • A user has a file open in the /mnt directory.

    • Another file system still contains a symlink to a file inside /mnt.

    Correct Answer
    A. A user has a file open in the /mnt directory.
    Explanation
    When the error message "umount: /mnt: device is busy" is displayed after running the command umount /mnt, it is commonly because a user has a file open in the /mnt directory. This means that there is an active process or program that is currently using a file within the /mnt directory, preventing the unmounting of the device. To successfully unmount the device, the user must close any open files within the /mnt directory and ensure that no processes are actively using those files.

    Rate this question:

  • 28. 

    When removing a package, which of the following dpkg options will completely remove the files including configuration files?

    • –clean

    • –delete

    • –purge

    • –remove

    Correct Answer
    A. –purge
    Explanation
    The option "-purge" is used with the dpkg command to completely remove a package and its associated files, including configuration files. This option ensures that all traces of the package are removed from the system, providing a clean uninstallation. The other options listed (-clean, -delete, -remove) do not remove configuration files, so they are not suitable for completely removing a package.

    Rate this question:

  • 29. 

    Which of the following statements is correct regarding the command foo 1> bar?

    • The command foo receives its stdin from the stdout of the command bar.

    • The stderr from the command foo is saved to the file bar.

    • The stdout from the command foo overwrites the file bar.

    • The stdout from the command foo is appended to the file bar.

    • The command foo receives its stdin from the file bar.

    Correct Answer
    A. The stdout from the command foo overwrites the file bar.
    Explanation
    The correct answer is that the stdout from the command foo overwrites the file bar. This means that the output of the command foo will be written to the file bar, replacing any existing content in the file.

    Rate this question:

  • 30. 

    Which of the following commands is used to change options and positional parameters for a running Bash?

    • Envsetup

    • History

    • Set

    • Bashconf

    • Setsh

    Correct Answer
    A. Set
    Explanation
    The "set" command is used to change options and positional parameters for a running Bash. It allows the user to modify various settings and configurations within the Bash environment. This command is commonly used to enable or disable specific options, define variables, and customize the behavior of the shell. By using the "set" command, users can adjust the settings to suit their preferences and requirements while using Bash.

    Rate this question:

  • 31. 

    Which file should be edited to select the network locations from which Debian installation package files are loaded?

    • /etc/dpkg/dselect.cfg

    • /etc/dpkg/dpkg.cfg

    • /etc/apt/apt.conf

    • /etc/apt/apt.conf.d

    • /etc/apt/sources.list

    Correct Answer
    A. /etc/apt/sources.list
    Explanation
    The file that should be edited to select the network locations from which Debian installation package files are loaded is /etc/apt/sources.list. This file contains a list of repositories from which the package manager retrieves the necessary files and updates for the system. By editing this file, users can add or remove repositories to customize the package sources for their Debian installation.

    Rate this question:

  • 32. 

    Which of the following commands can be used to create a USB storage media from a disk image?

    • Gdisk

    • Dd

    • Cc

    • Fdisk

    • Mount

    Correct Answer
    A. Dd
    Explanation
    The "dd" command can be used to create a USB storage media from a disk image. This command is commonly used in Unix-like operating systems to convert and copy files. In this context, it can be used to create a bootable USB drive by copying the disk image onto the USB storage media. The "dd" command is powerful and can be used for various disk operations, including creating disk images, copying partitions, and backing up data.

    Rate this question:

  • 33. 

    In Bash, inserting 1>&2 after a command redirects

    • Standard output to standard input.

    • Standard error to standard output.

    • Standard input to standard error.

    • Standard error to standard input.

    • Standard output to standard error.

    Correct Answer
    A. Standard output to standard error.
    Explanation
    When "1>&2" is inserted after a command in Bash, it redirects the standard output (file descriptor 1) to the standard error (file descriptor 2). This means that any output generated by the command will be sent to the standard error stream instead of the standard output stream.

    Rate this question:

  • 34. 

    Which of the following files, located in the user home directory, is used to store the Bash history?

    • .history_bash 1

    • .bash_history

    • .bash_histfile

    • .bashrc_history

    • .history

    Correct Answer
    A. .bash_history
    Explanation
    The file ".bash_history" is used to store the Bash history in the user home directory. This file keeps a record of all the commands that have been entered in the Bash shell by the user. It allows users to easily recall and reuse previously executed commands.

    Rate this question:

  • 35. 

    Regarding the command: nice -5 /usr/bin/prog Which of the following statements is correct?

    • /usr/bin/prog is executed with a nice level of -5.

    • /usr/bin/prog is executed with a nice level of 5.

    • /usr/bin/prog is executed with a priority of -5.

    • /usr/bin/prog is executed with a priority of 5.

    Correct Answer
    A. /usr/bin/prog is executed with a nice level of 5.
    Explanation
    The nice command is used to set the priority of a command or process. The nice level ranges from -20 to 19, with lower values indicating higher priority. In this case, the nice level is set to -5, which means the command /usr/bin/prog will be executed with a higher priority. Therefore, the correct statement is that /usr/bin/prog is executed with a nice level of 5, not -5.

    Rate this question:

  • 36. 

    Which of the following is the device file name for the second partition on the only SCSI drive?

    • /dev/hda1

    • /dev/sda2

    • /dev/sd0a2

    • /dev/sd1p2

    Correct Answer
    A. /dev/sda2
    Explanation
    The correct answer is /dev/sda2. This is because the /dev/sda2 device file name follows the naming convention for SCSI drives. The "sda" indicates the first SCSI drive, and the "2" indicates the second partition on that drive. Therefore, /dev/sda2 is the device file name for the second partition on the only SCSI drive.

    Rate this question:

  • 37. 

    Which of the following file permissions belong to a symbolic link?

    • -rwxrwxrwx

    • +rwxrwxrwx

    • Lrwxrwxrwx

    • Srwxrwxrwx

    Correct Answer
    A. Lrwxrwxrwx
    Explanation
    The correct answer is "lrwxrwxrwx". In Linux file systems, the first character of the file permissions represents the file type. In this case, "l" indicates a symbolic link. The remaining nine characters "rwxrwxrwx" represent the permissions for the owner, group, and others, indicating that the symbolic link has read, write, and execute permissions for all.

    Rate this question:

  • 38. 

    Which SysV init configuration file should be modified to disable the ctrl-Alt-delete key combination?

    • /proc/keys

    • /etc/inittab

    • /proc/inittab

    • /etc/reboot

    • /etc/keys

    Correct Answer
    A. /etc/inittab
    Explanation
    The correct answer is /etc/inittab. This file is used by the SysV init system to configure the initialization of the system. By modifying this file, you can disable the ctrl-Alt-delete key combination, which is typically used to initiate a system reboot.

    Rate this question:

  • 39. 

    Which command will display messages from the kernel that were output during the normal boot sequence?

    Correct Answer
    dmesg, /bin/dmesg
    Explanation
    The command "dmesg" or "/bin/dmesg" will display messages from the kernel that were output during the normal boot sequence. This command is commonly used to troubleshoot and diagnose any issues that may have occurred during the boot process. By running this command, users can view important information and error messages related to hardware, drivers, and system initialization, providing valuable insights into the system's health and any potential problems that may need to be addressed.

    Rate this question:

  • 40. 

    Immediately after deleting 3 lines of text in vi and moving the cursor to a different line, which single character command will insert the deleted content below the current line?

    • I (lowercase)

    • P (uppercase)

    • P (lowercase)

    • U (uppercase)

    • U (lowercase)

    Correct Answer
    A. P (lowercase)
    Explanation
    After deleting 3 lines of text in vi and moving the cursor to a different line, the command "p" (lowercase) will insert the deleted content below the current line.

    Rate this question:

  • 41. 

    In compliance with the FHS, in which of the directories are man pages found?

    • /usr/share/man

    • /opt/man

    • /usr/doc/

    • /var/pkg/man

    • /var/man

    Correct Answer
    A. /usr/share/man
    Explanation
    Man pages, which are the documentation files for Unix and Unix-like operating systems, are typically found in the "/usr/share/man" directory. This directory follows the Filesystem Hierarchy Standard (FHS), which provides guidelines for organizing files and directories in Unix-like systems. The "/usr/share/man" directory is commonly used to store system-wide documentation, including man pages, making it the correct answer in this case.

    Rate this question:

  • 42. 

    Which of the following commands will send output from the program myapp to both standard output (stdout) and the file file1.log?

    • Cat < myapp | cat > file1.log

    • Myapp 0>&1 | cat > file1.log

    • Myapp | cat > file1.log

    • Myapp | tee file1.log

    • Tee myapp file1.log

    Correct Answer
    A. Myapp | tee file1.log
    Explanation
    The command "myapp | tee file1.log" will send the output from the program myapp to both standard output (stdout) and the file file1.log. The tee command is used to read from standard input and write to both standard output and files. In this case, it will read the output from myapp and write it to both the console and the file file1.log.

    Rate this question:

  • 43. 

    Which of the following command sets the Bash variable named TEST with the content FOO?

    • Set TEST=”FOO”

    • TEST=”FOO”

    • TEST = “FOO”

    • Var TEST=”FOO”

    Correct Answer
    A. TEST=”FOO”
    Explanation
    The correct answer is "TEST=”FOO”". This command sets the Bash variable named TEST with the content FOO. The syntax "variable_name=value" is used to assign a value to a variable in Bash. In this case, the variable name is TEST and the value assigned to it is "FOO".

    Rate this question:

  • 44. 

    Which of the following commands will change the quota for a specific user?

    • Repquota

    • Quota -e

    • Edquota

    • Quota

    Correct Answer
    A. Edquota
    Explanation
    The "edquota" command is used to change the quota for a specific user. It allows the system administrator to edit the disk quotas for a user, including setting the soft and hard limits for disk space usage. The "repquota" command is used to display the disk usage and quotas for all users, not to change them. The "quota -e" command is used to edit user quotas, but it does not specify a specific user. The "quota" command is used to display disk usage and quota information, but it does not change quotas.

    Rate this question:

  • 45. 

    What is the maximum niceness value that a regular user can assign to a process with the nice command when executing a new process?

    • 9

    • 99

    • 19

    • 49

    Correct Answer
    A. 19
    Explanation
    The maximum niceness value that a regular user can assign to a process with the nice command when executing a new process is 19. Niceness values range from -20 to 19, with lower values indicating higher priority and higher values indicating lower priority. Regular users typically have limited privileges and cannot assign negative niceness values, so the maximum value they can assign is 19.

    Rate this question:

  • 46. 

      When starting a program with the nice command without any additional parameters, which nice level is set for the resulting process?

    • 0

    • 10

    • 20

    • -10

    Correct Answer
    A. 10
    Explanation
    When starting a program with the nice command without any additional parameters, the resulting process is set to a nice level of 10. The nice command is used in Unix-like operating systems to adjust the scheduling priority of a process. The nice level ranges from -20 to 19, with lower values indicating higher priority. By default, the nice command sets the nice level to 10 if no additional parameters are specified.

    Rate this question:

  • 47. 

    Which of the following commands reboots the system when using SysV init? (Choose TWO correct answers.)

    • Telinit 0

    • Telinit 6

    • Shutdown -r “rebooting”

    • Shutdown -r now

    • Shutdown -k now “rebooting”

    Correct Answer(s)
    A. Telinit 6
    A. Shutdown -r now
    Explanation
    The correct answers are "telinit 6" and "shutdown -r now". "telinit 6" is a command that initiates a system reboot in SysV init. "shutdown -r now" is another command that immediately reboots the system.

    Rate this question:

  • 48. 

    What is the name of the main configuration file for GNU GRUB? (Specify the file name only without any path.)

    Correct Answer(s)
    menu.lst, grub.conf, grub.cfg
    Explanation
    The main configuration file for GNU GRUB can be named as menu.lst, grub.conf, or grub.cfg. This file contains the settings and options for the GRUB bootloader, which is responsible for loading the operating system on a computer. The specific name of the file may vary depending on the version and distribution of GNU GRUB being used.

    Rate this question:

  • 49. 

    Which command displays a list of all background tasks running in the current shell? (Specify ONLY the command without any path or parameters.)

    Correct Answer(s)
    jobs
    Explanation
    The command "jobs" displays a list of all background tasks running in the current shell. This can be useful to see what processes are running in the background and manage them accordingly.

    Rate this question:

Quiz Review Timeline (Updated): Mar 21, 2023 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 21, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Feb 05, 2019
    Quiz Created by
    Catherine Halcomb
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.