LX2 Flashcards

1
Q

Which statement about users and user groups is correct?
A group can only have one main user
There can be only one user group on a system
Users do not have to belong to a user group
Every user belongs at least to one user group

A
  • Every user belongs at least to one user group

Every user belongs at least to one user group. This means that in a system, every user must be assigned to at least one user group for the purpose of access control and permissions management. User groups are used to categorize users based on their roles, responsibilities, or access privileges, allowing administrators to assign permissions and restrictions to groups rather than individual users. This ensures efficient management of user access and simplifies the process of granting or revoking permissions for multiple users at once.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

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?
Files with extensions need a different treatment
Rm had to be called with the option -R to delete all files
The file Access.txt was probably opened by another application
The file Access.txt was hidden
Linux file names are case sensitive

A
  • Linux file names are case sensitive

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which one of the following statements concerning Linux passwords is true? All passwords can be decrypted using the system administrator’s master password
Passwords may never start with a non-letter
Users cannot change their password once it has been set
Passwords are only stored in encrypted form
Passwords may be at most six characters long

A
  • Passwords are only stored in encrypted form

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the command that will show system boot time messages?
Dmesg
Echo
Lspci
Display system boot
Messages

A
  • Dmesg

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Which of the following commands increases the number of elements in a directory (choose two answers)
Touch newfile
Create newfile
Ls newfile
Rmdir newdirectory
Mkdir newdirectory

A
  • Touch newfile
  • Mkdir newdirectory

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Which command will display the last line of the file foo.txt?
Head -n foo.txt
Tail foo.txt
Last -n 1 foo.txt
Tail -n 1 foo.txt

A
  • Tail -n 1 foo.txt

The command “tail -n 1 foo.txt” will display the last line of the file foo.txt. The “tail” command is used to display the last part of a file, and the “-n 1” option specifies that only the last line should be displayed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How is it possible to determine if an executable file is a shell script that is ready by Bash?
The r bit is set
The file must end with .sh
The file line starts with #!/bin/bash
/bin/bash has to be run in debug mode
Scripts are never executable files

A
  • The file line starts with #!/bin/bash

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Which of the following directories is often used to store log files?
/home
/var
/temp
/dev
/usr

A

-/var

The /var directory is often used to store log files. This directory contains variable data files, including system logs, that are constantly changing in size as the system runs. Storing log files in the /var directory allows for easy access and management of these files. The other directories listed (/home, /temp, /dev, /usr) are not typically used for storing log files.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Which commands provide help for a specific Linux command? (Choose two answers).
Info
Man
Helpme
Ask
Whatdoes

A
  • Info
  • Man

The “info” and “man” commands provide help for specific Linux commands. The “info” command displays detailed information about a command, including its usage, options, and examples. The “man” command displays the manual pages for a command, which contain comprehensive documentation and instructions on how to use the command effectively. These commands are commonly used by Linux users to quickly access information and understand the functionality of specific commands.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What keyword is missing from the following segment of the shell script?for i in*;—-cat $idone
Do
Then
Endo
Fi
Run

A
  • Do

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Which of the following statements concerning the General Public License (GPL) is true?
The GPL is designed to ensure that the source code of a software
remains freely available
The GPL is identical to the BSD license
GPL software may never be sold for money
If you changed a program you received under the GPL, you must
send your changes to the original author for approval
GPL software may not be used to run nuclear reactors or air
traffic control systems

A
  • The GPL is designed to ensure that the source code of a software remains freely available

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Which of the following Linux distributions use the dpkg package management system? (Choose two correct answers)
Suse
Red Hat
Debian
Ubuntu
Mandriva

A
  • Debian
  • Ubuntu

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Which of the following commands is used to list the contents of a directory in Linux?
Cd
Ls
Mkdir
Rm

A
  • Ls

The ls command is a fundamental Linux command used to list the files and directories within a specified directory. It provides various options for customizing the output, such as displaying file sizes, permissions, and modification times. The other options are also common Linux commands: cd (change directory), mkdir (make directory), and rm (remove).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Which of the following files holds the definition of the local user accounts?
/etc/secret
/etc/users
/etc/passwd
/etc/id
/etc/home

A
  • /etc/passwd

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Which of the following programs is not a graphical web browser?
Konqueror
Firefox
Links
Opera
Chrome

A
  • Links

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Which of the following answers are true for cloud computing? (Choose two correct answers)
Cloud Computing provides new tools to manage IT resources
From the business perspective, Cloud Computing means
outsourcing or centralization of IT operations
Cloud Computing is the opposite of the Green IT; i.e., the use of
fossil non-regenerative energy for computing
Cloud Computing implies sharing all information with everyone
else in ‘the cloud’

A
  • Cloud Computing provides new tools to manage IT resources
  • From the business perspective, Cloud Computing means outsourcing or centralization of IT operations

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.

17
Q

What does LAMP mean?

The Linux Advanced Mode Programming Interface which gives
advanced capabilities to application developers

The bus ID of an attached USB device that emits light

Short for Lightweight Access Management Protocol which synchronizes permission in a network

The combination of Linux, Apache, MySQL, and PHP and other programming languages

Short for lamport-clock which is important in distributed network computing

A
  • The combination of Linux, Apache, MySQL, and PHP and other programming languages

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.

18
Q

Which of the following file systems is most commonly used for Linux distributions?
HFS+
Ext4
FAT32
NTFS

A
  • Ext4

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.

19
Q

Which command shows if /usr/bin is in the current shell search path?
Cat PATH
Echo $PATH
Cat %PATH
Echo %PATH%

A
  • Echo $PATH

The command “echo $PATH” is used to display the value of the PATH environment variable in the current shell session. The PATH variable contains a list of directories where the shell searches for executable files when a command is entered. Each directory in the PATH variable is separated by a colon (:). By executing “echo $PATH”, the shell will print out the contents of the PATH variable, showing all the directories included in the search path. If “/usr/bin” is included in the output, it indicates that this directory is part of the current shell’s search path.##**##

20
Q

Which permissions should be given to a file that needs to be opened and edited by the file’s owner and opened read-only by the file’s group?
0751
0466
0540
0640
0444

A
  • 0640

The correct answer is 0640. This permission code indicates that the file’s owner has read and write permissions (6), while the file’s group has only read permissions (4). The other digits in the code represent the permissions for other users, which in this case are set to 0, meaning no permissions. This configuration ensures that the file can be opened and edited by the owner, while the group members can only open it in read-only mode.