Linux Essentials Certification Exam Practice Test!
Reviewed by Godwin Iheuwa
Godwin Iheuwa, MS (Computer Science)|
Database Administrator
Review Board Member
Godwin Iheuwa, a Database Administrator at MTN Nigeria, holds an MS in Computer Science, specializing in Agile Methodologies and Database Administration from the University of Bedfordshire and a Bachelor's in Computer Science from the University of Port Harcourt. His proficiency in SQL Server Integration Services (SSIS) and SQL Server Management Studio contributes to his expertise in database management.
, MS (Computer Science)
Approved & Edited byProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Those beginning their Linux careers may find the Linux Essentials certification an excellent place to start before jumping into the more advanced LPIC certifications. Linux Essentials cover necessary skills, such as command-line editing and the Linux operating system. This quiz will give you a chance to revise for the exam. All the best!
Questions and Answers
1.
Which command displays the list of groups to which a user belongs?
A.
Whoami
B.
Isgroup
C.
Who
D.
Id
Correct Answer
D. Id
Explanation The id command in Unix/Linux displays information about the user and the groups to which the user belongs. When you run the id command, it provides the user ID, group ID, and the list of groups the user is a member of. The whoami command only shows the current logged-in username, who displays information about all users currently logged into the system, and Isgroup is not a standard command in Unix/Linux.
Rate this question:
2.
Which of the following can be used to access the command line?
A.
BIOS
B.
Terminal
C.
XWindow
D.
Firefox
E.
Xargs
Correct Answer
B. Terminal
Explanation Terminal is the correct answer because it is a command line interface that allows users to interact with the operating system by typing commands. It provides a text-based environment where users can execute commands, run scripts, and navigate through directories. Unlike graphical user interfaces like XWindow or Firefox, the terminal provides direct access to the command line, making it a powerful tool for advanced users and system administrators. BIOS and Xargs are not used to access the command line, as BIOS is responsible for booting the computer and Xargs is a command used to build and execute command lines from standard input.
Rate this question:
3.
Which of the following commands increases the number of elements in a directory (choose two answers)
A.
Touch newfile
B.
Create newfile
C.
Ls newfile
D.
Rmdir newdirectory
E.
Mkdir newdirectory
Correct Answer(s)
A. Touch newfile E. Mkdir newdirectory
Explanation A) touch newfile: This command creates a new file named "newfile" if it does not already exist. By creating a new file, it increases the number of elements (files and directories) in the directory.
E) mkdir newdirectory: This command creates a new directory named "newdirectory" within the current directory. This also increases the number of elements in the directory by adding a new directory to it.
Rate this question:
4.
Which of the following are correct commands for changing the current directory to the user's home? (Select all that applies)
A.
Cd /home
B.
Cd ~
C.
Cd ..
D.
Cd
E.
Cd /
Correct Answer(s)
B. Cd ~ D. Cd
Explanation The correct commands for changing the current directory to the user's home directory are:
cd ~ - The tilde ~ represents the user's home directory.
cd - Without any arguments, cd will take you to the user's home directory.
Rate this question:
5.
Which option will cause the echo command NOT to output a trailing newline?
A.
-e
B.
-p
C.
-n
D.
-s
Correct Answer
C. -n
Explanation The option "-n" will cause the echo command to not output a trailing newline. This means that when using the echo command with the "-n" option, the text will be displayed without a new line character at the end, allowing the next output to be displayed on the same line.
Rate this question:
6.
Which of the following commands moves the directory ~/summer-vacation and its content to ~/vacation/2011?
A.
Mv ~/vacation/2011 ~/summer-vacation
B.
Move -R ~/summer-vacation ~/vacation/2011
C.
Mv /home/summer-vacation /home/vacation/2011
D.
Mv ~/summer-vacation ~/vacation/2011
E.
Mv -R ~/summer-vacation ~/vacation/2011
Correct Answer
D. Mv ~/summer-vacation ~/vacation/2011
Explanation The correct answer is "mv ~/summer-vacation ~/vacation/2011". This command uses the "mv" command to move the directory ~/summer-vacation and its contents to ~/vacation/2011. The "~" symbol represents the home directory, so this command moves the "summer-vacation" directory from the home directory to the "vacation/2011" directory within the home directory.
Rate this question:
7.
Which of the following commands can be used to create a file?
A.
Touch
B.
Build
C.
Nico
D.
Create
E.
Mkfile
Correct Answer
A. Touch
Explanation The correct answer is touch. The touch command is commonly used in Unix and Linux operating systems to create an empty file. It can also be used to update the access and modification timestamps of an existing file. The other options, build, nico, create, and mkfile, are not valid commands for creating a file.
Rate this question:
8.
Which function does a shell program serve?
A.
It provides a graphical environment
B.
It is responsible for establishing a connection to another computer
C.
It receives user commands and executes them
D.
It is responsible for logging a user into the system
Correct Answer
C. It receives user commands and executes them
Explanation A shell program serves the function of receiving user commands and executing them. It acts as an interface between the user and the operating system, allowing users to interact with the computer by entering commands. The shell program interprets these commands and executes them, performing various tasks such as running programs, managing files, and controlling system resources. It provides a command-line interface where users can enter commands and receive output or perform actions based on those commands.
Rate this question:
9.
How could one search for the file foo.txt under the directory /home?
A.
Search /home -file foo.txt
B.
Search /home foo.txt
C.
Find /home -file foo.txt
D.
Find /home -name foo.txt
E.
Find /home foo.txt
Correct Answer
D. Find /home -name foo.txt
Explanation The correct answer is "find /home -name foo.txt". This is because the "find" command is used to search for files and directories within a specified directory. The "-name" option is used to search for files with a specific name, in this case "foo.txt". The "/home" argument specifies the directory in which to search for the file.
Rate this question:
10.
Which of the following is a Linux-based operating system for use on mobile devices?
A.
IOS
B.
CentOS
C.
Android
D.
Debian
Correct Answer
C. Android
Explanation Android is a Linux-based operating system for use on mobile devices. It was developed by Google and is widely used on smartphones, tablets, and other mobile devices. Android provides a user-friendly interface, supports a wide range of applications, and allows for customization and flexibility. It is known for its open-source nature, which allows developers to modify and enhance the operating system according to their needs.
Rate this question:
11.
Which command will display running process information in realtime?
A.
Top
B.
Show current
C.
Ps current
D.
Process
Correct Answer
A. Top
Explanation The correct answer is "top". The "top" command is used to display real-time information about running processes on a system. It provides a dynamic view of the system's processes, including details such as CPU usage, memory usage, and process IDs. By continuously updating the information, "top" allows users to monitor the system's performance and identify any processes that may be consuming excessive resources.
Rate this question:
12.
Which of the following Linux distributions use the dpkg package management system? (Choose two correct answers)
A.
Suse
B.
Red Hat
C.
Debian
D.
Ubuntu
E.
Mandriva
Correct Answer(s)
C. Debian D. Ubuntu
Explanation Debian and Ubuntu both use the dpkg package management system. Dpkg is a package manager used in Debian-based Linux distributions to install, remove, and manage software packages. Suse, Red Hat, and Mandriva use different package management systems such as RPM (Red Hat Package Manager) or Zypper. Therefore, the correct answers are Debian and Ubuntu.
Rate this question:
13.
What is the first character for a file or directory names if they should not be displayed by commands such as ls unless specifically requested?
A.
\ (backslash)
B.
. (dot)
C.
- (minus)
D.
_ (underscore)
Correct Answer
B. . (dot)
Explanation In Unix-based systems, the dot (.) is used as the first character for file or directory names that should not be displayed by commands like ls unless specifically requested. This convention is commonly used for hidden files or directories, which typically contain configuration files or sensitive data that should not be easily accessible or accidentally modified. By starting the name with a dot, the file or directory is effectively "hidden" from regular directory listings, providing a level of privacy or organization.
Rate this question:
14.
The output of the program date should be saved in the variable actdat. What is the correct statement?
A.
Actdat=$(date)
B.
Set actdat='date'
C.
Date | acdat
D.
Date > $actdat
E.
Actdat=date
Correct Answer
A. Actdat=$(date)
Explanation In a Linux shell script, you can use the date command to retrieve the current date and time. To save the output of this command into a variable named actdat, you can use command substitution, denoted by $(...).
Rate this question:
15.
You have a program called /user/bin/foo. You wish to create a symbolic link, /home/user/bin/foo, that points to it. Which command will do this task?
A.
Ln -sys /home/user/foo /user/bin/foo
B.
Ln -s /user/bin/foo /home/user/bin/foo
C.
Ln /home/user/foo /user/bin/foo
D.
Ln /user/bin/foo /home/user/foo
E.
Ln --symlink /home/user/foo /user/bin/foo
Correct Answer
B. Ln -s /user/bin/foo /home/user/bin/foo
Explanation The correct command to create a symbolic link is "ln -s /user/bin/foo /home/user/bin/foo". This command uses the "ln" command with the "-s" option to create a symbolic link. The first argument "/user/bin/foo" is the target file or directory that we want the link to point to, and the second argument "/home/user/bin/foo" is the name and location of the symbolic link we want to create.
Rate this question:
16.
Which of the following files holds the definition of the local user accounts?
A.
/etc/secret
B.
/etc/users
C.
/etc/passwd
D.
/etc/id
E.
/etc/home
Correct Answer
C. /etc/passwd
Explanation The correct answer is /etc/passwd. This file holds the definition of the local user accounts on a Unix-like operating system. It contains important information such as the username, user ID, group ID, home directory, and shell for each user. This file is used by the system to authenticate users and manage their permissions and access privileges.
Rate this question:
17.
What is the output of the following command?
tail -n 20 test.txt
A.
The first 20 lines of test.txt
B.
The last 20 lines of test.txt omitting the blank lines
C.
The last 20 lines of test.txt with line numbers
D.
The last 20 lines of test.txt including the blank lines
Correct Answer
D. The last 20 lines of test.txt including the blank lines
Explanation The command "tail -n 20 test.txt" is used to display the last 20 lines of the file "test.txt". It includes both the non-blank lines and the blank lines present in the file.
Rate this question:
18.
How can the normal output of a command be written to a file while discarding the error output?
A.
Command>2>file &1>/dev/null
B.
Command /dev/null
C.
Command>2>discard-error>file
D.
Command> /dev/null 2&>1 output
E.
Command > output.txt 2>/dev/null
Correct Answer
E. Command > output.txt 2>/dev/null
Explanation command: The command whose output you want to capture.
>: Redirects the standard output (stdout) of the command to a file named output.txt.
2>/dev/null: Redirects the standard error output (stderr) of the command to /dev/null, which is a special file that discards any data written to it.
This way, only the normal output of the command will be written to the output.txt file, and any error output will be discarded.
Rate this question:
19.
Given the following directory permissions:
drwxrwxrwt 14 root 36864 2012-03-02 11:17 tmp
What is the letter t at the end of drwxrwxrwt indicate?
A.
It is the sticky bit that causes all commands in this directory to be launched as a root.
B.
It means that even though the directory is global writable only the owner can delete their own files.
C.
It makes the directory accessible for everybody.
D.
It indicates that this directory contains only temporary files that may be deleted.
E.
It is a temporary bit that prevents launching commands in this directory
Correct Answer
B. It means that even though the directory is global writable only the owner can delete their own files.
Explanation The letter "t" at the end of "drwxrwxrwt" indicates the sticky bit. This means that even though the directory is globally writable, only the owner of a file within the directory can delete their own files. This is a security measure that prevents unauthorized deletion of files by other users.
Rate this question:
20.
After installing a new package, in which directory are you most likely find its configuration file?
A.
/lib
B.
/conf
C.
/etc
D.
/usr
E.
/opt
Correct Answer
C. /etc
Explanation After installing a new package, you are most likely to find its configuration file in the /etc directory. The /etc directory is commonly used to store system-wide configuration files in Unix-like operating systems. It is the standard location for various configuration files, including those related to installed packages. Therefore, it is the most probable directory to find the configuration file of a newly installed package.
Rate this question:
21.
Which statement about the directory /etc/skel are correct? (Choose two answers)
A.
The personal settings of root are in this directory
B.
The files from the directory are copied to the home directory of the new user when starting the system
C.
The files from the directory are copied to the home directory of the new user when the account is created
D.
The directory contains a default set of configuration files used by the useradd command
E.
The directory contains the global settings for the Linux system
Correct Answer(s)
C. The files from the directory are copied to the home directory of the new user when the account is created D. The directory contains a default set of configuration files used by the useradd command
Explanation The directory /etc/skel contains a default set of configuration files used by the useradd command. When a new user account is created, the files from this directory are copied to the home directory of the new user. This ensures that the new user has a set of default configuration files and settings. However, the directory does not contain the personal settings of root and it does not contain the global settings for the Linux system.
Rate this question:
22.
Which of the following file systems is most commonly used for Linux distributions?
A.
HFS+
B.
Ext4
C.
FAT32
D.
NTFS
Correct Answer
B. Ext4
Explanation ext4 is the most commonly used file system for Linux distributions because it is the default file system for many Linux operating systems. It offers improved performance, reliability, and support for larger file sizes and partitions compared to its predecessor, ext3. Additionally, ext4 supports features such as journaling, which helps to prevent data loss in the event of a system crash. Overall, ext4 is widely adopted and trusted by the Linux community, making it the preferred choice for Linux distributions.
Rate this question:
23.
When a new user is added, where does the user ID get stored?
A.
/etc/users
B.
/etc/realm
C.
/etc/pass
D.
/etc/shpasswd
E.
/etc/passwd
Correct Answer
E. /etc/passwd
Explanation The user ID of a new user is stored in the /etc/passwd file. This file is a system file that contains information about user accounts, including their usernames, user IDs, group IDs, home directories, and login shells. The /etc/passwd file is used by the system for user authentication and to determine various permissions and settings for each user.
Rate this question:
24.
Which one of the following statements concerning Linux passwords is true?
A.
All passwords can be decrypted using the system administrator's master password
B.
Passwords may never start with a non-letter
C.
Users cannot change their password once it has been set
D.
Passwords are only stored in encrypted form
E.
Passwords may be at most six characters long
Correct Answer
D. Passwords are only stored in encrypted form
Explanation Passwords are only stored in encrypted form. This means that when a user sets a password on a Linux system, it is encrypted and stored securely. The encryption ensures that even if someone gains unauthorized access to the system's password file, they will not be able to determine the actual passwords easily. This is an important security measure to protect user accounts and sensitive information.
Rate this question:
25.
Which command lists all files in the current directory that starts with a capital letter?
A.
Ls [A-Z]*
B.
Ls A-Z
C.
Ls A-Z*
D.
Ls --upercasefiles
E.
Ls -uppercase-files
Correct Answer
A. Ls [A-Z]*
Explanation The correct answer is "ls [A-Z]*". This command uses the wildcard character "*" to match any file that starts with a capital letter in the current directory. The "[A-Z]" specifies that the file must start with a capital letter, and the "*" allows for any additional characters after the capital letter.
Rate this question:
26.
What does LAMP mean?
A.
The Linux Advanced Mode Programming Interface which gives advanced capabilities to application developers
B.
The bus ID of an attached USB device that emits light
C.
Short for Lightweight Access Management Protocol which synchronizes permission in a network
D.
The combination of Linux, Apache, MySQL, and PHP and other programming languages
E.
Short for lamport-clock which is important in distributed network computing
Correct Answer
D. The combination of Linux, Apache, MySQL, and pHP and other programming languages
Explanation The correct answer is the combination of Linux, Apache, MySQL, and PHP and other programming languages. LAMP is a popular open-source web development platform that uses these technologies to create dynamic websites and web applications. Linux is the operating system, Apache is the web server software, MySQL is the database management system, and PHP is the programming language. This combination provides a powerful and flexible environment for building and deploying web applications.
Rate this question:
27.
How is it possible to determine if an executable file is a shell script that is ready by Bash?
A.
The r bit is set
B.
The file must end with .sh
C.
The file line starts with #!/bin/bash
D.
/bin/bash has to be run in debug mode
E.
Scripts are never executable files
Correct Answer
C. The file line starts with #!/bin/bash
Explanation The correct answer is "The file line starts with #!/bin/bash". This is because the shebang line, which starts with #!, is used to specify the interpreter for the script. In this case, the shebang line indicates that the script should be interpreted by the Bash shell.
Rate this question:
28.
Which is a suitable command to find the next appearance of the word hidden in a man page being viewed from the command line?
A.
Find hidden
B.
/? hidden
C.
CTRL-F hidden
D.
/hidden
Correct Answer
D. /hidden
Explanation The command "/hidden" is the correct answer because it is the syntax used to search for the next appearance of the word "hidden" in a man page being viewed from the command line. By typing "/hidden" and pressing enter, the command line will search for the next occurrence of the word "hidden" on the man page.
Rate this question:
29.
While deleting all files beginning with the letter a there was still the file Access.txt left. Assuming that it had the correct ownership, why was it not deleted?
A.
Files with extensions need a different treatment
B.
Rm had to be called with the option -R to delete all files
C.
The file Access.txt was probably opened by another application
D.
The file Access.txt was hidden
E.
Linux file names are case sensitive
Correct Answer
E. Linux file names are case sensitive
Explanation The reason the file Access.txt was not deleted is because Linux file names are case sensitive. The command used to delete the files beginning with the letter "a" would only delete files with lowercase "a" as the first letter, while "Access.txt" starts with an uppercase "A". Therefore, it was not deleted.
Rate this question:
30.
Why is the file data.txt empty after executing sort data.txt > data.txt?
A.
Because, if data.txt is empty now, it must have been empty before
B.
Because sort cannot sort text files, only binary files
C.
Because sort detects that both files are the same
D.
Because the file gets truncated before the sort is executed
Correct Answer
D. Because the file gets truncated before the sort is executed
Explanation When the command "sort data.txt > data.txt" is executed, it redirects the sorted output of the "sort" command to the same file "data.txt". However, the ">" operator truncates the file before any data is written to it. Therefore, the file becomes empty before the "sort" command is executed, resulting in an empty "data.txt" file.
Rate this question:
31.
Which of the following commands will output all of the lines that contain either the string Fred or fred? (Select all that apply)
A.
Grep -v fred data_file
B.
Grep '[f]red' data_file
C.
Egrep fred data_file
D.
Grep '[Ff]red' data_file
E.
Grep -i fred data_file
Correct Answer(s)
D. Grep '[Ff]red' data_file E. Grep -i fred data_file
Explanation To output all lines containing either the string "Fred" or "fred," you can use the following commands:
grep '[Ff]red' data_file - This command matches both "Fred" and "fred" by using a character class [Ff] that allows either uppercase "F" or lowercase "f".
grep -i fred data_file - The -i flag makes the search case-insensitive, matching "Fred", "fred", or any other case variation.
The other commands do not correctly match both "Fred" and "fred":
grep -v fred data_file: This will output lines that do not contain "fred."
grep '[f]red' data_file: This matches only "fred" because it does not account for uppercase "F."
egrep fred data_file: This matches only "fred" in lowercase.
Rate this question:
32.
Which of the following statements may be used to access the second command line argument to a script?
A.
"ARG$2"
B.
$1
C.
"$2"
D.
"$1"
Correct Answer
C. "$2"
Explanation The correct answer is "$2" because in most programming languages, including shell scripting, the dollar sign ($) followed by a number is used to access command line arguments. In this case, "$2" would refer to the second command line argument passed to the script.
Rate this question:
33.
Which of the following commands is used to lookup the current IP address of a system?
A.
Less/proc/net/ipconfig
B.
Ifconfig
C.
Showip
D.
Ipconfig
E.
Sysinfo | grep ipaddress
Correct Answer
B. Ifconfig
Explanation The correct answer is "ifconfig". This command is used to lookup the current IP address of a system. It displays the network configuration information of all network interfaces on the system, including the IP address assigned to each interface.
Rate this question:
34.
Which of the following will change the group that is associated with a file?
A.
Chmod
B.
Chmod -w
C.
Chown
D.
Ls -g
Correct Answer
C. Chown
Explanation The command "chown" is used to change the owner of a file, and by extension, it also changes the group associated with that file. This command allows the user to transfer ownership from one user to another, and in doing so, the group association may also be modified. Therefore, "chown" is the correct answer for changing the group associated with a file.
Rate this question:
35.
The following file is found in which system file?root:x:0:0::/root:/bin/bash
A.
/etc/user.cong
B.
/etc/shadow
C.
/etc/passwd
D.
/usr/bin/shadow
E.
/etc/password
Correct Answer
C. /etc/passwd
Explanation The correct answer is /etc/passwd. This file is found in the system file directory and contains essential information about user accounts on the system, such as usernames, user IDs, group IDs, home directories, and default shells. It is a plain text file that can be accessed by privileged users and some system processes for authentication purposes.
Rate this question:
36.
Which of the following commands will create an archive file, named backup.tar, containing all the files from the directory /home?
A.
Tar /home backup.tar
B.
Tar -cf /home backup.tar
C.
Tar -xf /home backup.tar
D.
Tar -xf backup.tar /home
E.
Tar -cf backup.tar /home
Correct Answer
E. Tar -cf backup.tar /home
Explanation The correct answer is "tar -cf backup.tar /home". This command uses the tar utility with the -cf options to create a new archive file named backup.tar. The /home directory is specified as the source directory from which all files will be included in the archive.
Rate this question:
37.
What is the output of the following command?
for token in a b c; do
echo -n ${token}
done
A.
Anbncn
B.
Abc
C.
$token$token$token
D.
{a}{b}{c}
E.
A b c
Correct Answer
B. Abc
Explanation The for loop iterates over the tokens a, b, and c.
The echo -n ${token} command prints each token without a newline.
Therefore, the tokens a, b, and c are printed consecutively on the same line, resulting in the output abc.
Rate this question:
38.
Which of the following is a combined audio/video interface for the transmission of digital data?
A.
ATI
B.
DVD
C.
HDMI
D.
VGA
E.
DVI
Correct Answer
C. HDMI
Explanation HDMI (High-Definition Multimedia Interface) is a combined audio/video interface for the transmission of digital data. It is widely used in consumer electronics such as televisions, computers, and gaming consoles to connect devices and transmit high-quality audio and video signals. HDMI supports both audio and video signals in a single cable, making it convenient and efficient for transmitting digital data.
Rate this question:
39.
Which of the following commands can be used to view a file and do search operations within it while viewing the contents?
A.
Less
B.
Find
C.
Grep
D.
Report
E.
See
Correct Answer
A. Less
Explanation The correct answer is "less" because the "less" command is used to view the contents of a file and allows for searching within the file. It is a pager program that displays text files page by page, and it provides various navigation and search options to easily view and search for specific content within the file.
Rate this question:
40.
Which of the following answers are true for cloud computing? (Choose two correct answers)
A.
Cloud Computing provides new tools to manage IT resources
B.
From the business perspective, Cloud Computing means outsourcing or centralization of IT operations
C.
Cloud Computing is the opposite of the Green IT; i.e., the use of fossil non-regenerative energy for computing
D.
Cloud Computing implies sharing all information with everyone else in 'the cloud'
Correct Answer(s)
A. Cloud Computing provides new tools to manage IT resources B. From the business perspective, Cloud Computing means outsourcing or centralization of IT operations
Explanation Cloud Computing provides new tools to manage IT resources, which means that it offers innovative solutions and technologies for handling and optimizing IT resources. From the business perspective, Cloud Computing involves outsourcing or centralization of IT operations, allowing companies to rely on external providers for their IT needs, resulting in cost savings and increased efficiency.
Rate this question:
41.
What keyword is missing from the following segment of the shell script?for i in*;----cat $idone
A.
Do
B.
Then
C.
Endo
D.
Fi
E.
Run
Correct Answer
A. Do
Explanation The missing keyword in the given shell script segment is "do". The "do" keyword is used in shell scripting to indicate the start of a loop or a block of code that needs to be executed repeatedly. In this case, the "do" keyword is missing before the "cat $idone" line, which suggests that the script is incomplete and the intended loop or block of code is not properly defined.
Rate this question:
42.
A Linux computer has no access to the Internet. Which command displays information about the network gateway for the system?
A.
Traceroute
B.
Ifconfig
C.
Gateway
D.
Route
E.
Ipconfig
Correct Answer
D. Route
Explanation The correct answer is "route". The "route" command displays information about the network gateway for the system. It shows the routing table, which includes information about the network destinations and the corresponding gateway addresses. This command is commonly used in Linux systems to troubleshoot network connectivity issues and to manage the routing configuration.
Rate this question:
43.
What is the usual absolute path of the personal directory for the user foo?
Explanation The usual absolute path of the personal directory for the user "foo" is "/home/foo" or "/home/foo/". This is because in most Linux systems, the personal directories for users are located in the "/home" directory, and the directory for the user "foo" would be named "foo". The trailing slash ("/") at the end of the path is optional and does not affect the correctness of the path.
Rate this question:
44.
When typing a long command line at the shell, what single character can be used to split a command across multiple lines?
Correct Answer \
Explanation The backslash (\) character can be used to split a command across multiple lines when typing a long command line at the shell. This character is known as the line continuation character and it allows the command to continue on the next line, making it easier to read and manage long command lines.
Rate this question:
45.
What is the command that will show system boot time messages?
A.
Dmesg
B.
Echo
C.
Lspci
D.
Display system boot
E.
Messages
Correct Answer
A. Dmesg
Explanation The command "dmesg" is used to display system boot time messages. It allows users to view the kernel ring buffer, which contains information about the system's hardware, drivers, and other messages generated during the boot process. This command is commonly used for troubleshooting purposes and to gather information about the system's initialization and hardware configuration.
Rate this question:
46.
Which of the following statements concerning the General Public License (GPL) is true?
A.
The GPL is designed to ensure that the source code of a software remains freely available
B.
The GPL is identical to the BSD license
C.
GPL software may never be sold for money
D.
If you changed a program you received under the GPL, you must send your changes to the original author for approval
E.
GPL software may not be used to run nuclear reactors or air traffic control systems
Correct Answer
A. The GPL is designed to ensure that the source code of a software remains freely available
Explanation The General Public License (GPL) is a license designed to guarantee that the source code of a software remains freely available. This means that anyone who receives a software under the GPL has the right to access, modify, and distribute its source code. The GPL promotes the idea of open source software and encourages collaboration and innovation within the software community. It does not restrict the selling of GPL software or require approval from the original author for changes made to the program.
Rate this question:
47.
What permissions are set on a file with the command chmod 654 file.txt?
A.
Drw-r-xr--
B.
D--wxr-x--
C.
--wxr-x--x
D.
-rwxrw--x
E.
-rw-r-xr--
Correct Answer
E. -rw-r-xr--
Explanation The first character indicates the file type (in this case, it's a regular file).
The next three characters "rw-" specify the permissions for the file owner (read and write, but not execute).
The next three characters "r-x" specify the permissions for the group (read and execute, but not write).
The last three characters "r--" specify the permissions for others (read only, no write or execute).
Rate this question:
48.
Which of the following commands can be used to extract content from a tar file?
A.
Tar -xvf
B.
Tar -vf
C.
Tar -e
D.
Tar -c
E.
Tar -v
Correct Answer
A. Tar -xvf
Explanation The command "tar -xvf" can be used to extract content from a tar file. The "x" flag stands for extract, the "v" flag stands for verbose (displaying the progress and details of the extraction), and the "f" flag is used to specify the file name. This command will extract the contents of the tar file to the current directory.
Rate this question:
49.
What two-character sequence is present at the beginning of an interpreted script? Please specify two characters only.
Correct Answer #!
Explanation The two character sequence present at the beginning of an interpreted script is "#!". This sequence is known as a shebang or hashbang and is used to specify the interpreter for the script. It tells the operating system which interpreter should be used to execute the script.
Rate this question:
50.
Which of the following programs is not a graphical web browser?
A.
Konqueror
B.
Firefox
C.
Links
D.
Opera
E.
Chrome
Correct Answer
C. Links
Explanation Links is not a graphical web browser because it is a text-based web browser. Unlike graphical web browsers, Links does not display web pages with images or other visual elements. Instead, it focuses on providing a lightweight and efficient browsing experience by rendering web pages in text format. This makes it suitable for low-resource environments or for users who prefer a minimalist browsing experience.
Rate this question:
Godwin Iheuwa |MS (Computer Science)|
Database Administrator
Godwin Iheuwa, a Database Administrator at MTN Nigeria, holds an MS in Computer Science, specializing in Agile Methodologies and Database Administration from the University of Bedfordshire and a Bachelor's in Computer Science from the University of Port Harcourt. His proficiency in SQL Server Integration Services (SSIS) and SQL Server Management Studio contributes to his expertise in database management.
Quiz Review Timeline +
Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.