Linux Bible Flashcards

Review the content of book Linux Bible from Cristopher Negus (135 cards)

1
Q

What is Linux based on

A

UNIX, a proprietary OS by AT&T.

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

How can a user direct the output of a command to a file in UNIX

A

By using >.

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

What symbol is used in UNIX to use the output of one command as the input for another

A

|

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

Which license falls under the open-source initiative umbrella and is the most prominent for Linux software products

A

GNU public license.

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

What is a Linux distribution

A

The union of the Linux kernel and the basic components needed for a functioning Linux system.

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

What was the graphical interface of Linux initially based on

A

X, a Window System.

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

What does GNOME shell extension allow users to do

A

Implement additional features not default for GNOME.

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

How can you lock the screen in GNOME

A

Win + Alt + L.

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

What is AIGLX

A

A GUI for a few Linux distros that implemented 3D effects.

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

What is the Linux shell called

A

Bash shell (bourne again shell).

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

What does the PATH variable in the shell contain

A

All paths where the shell looks for executed commands.

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

How can you view the history of commands executed in the shell

A

By using the command history.

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

What does Ctrl + C do in line editing

A

Cancels the line.

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

What does the metacharacter | do

A

Redirects the output of one command into another.

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

What directory contains Linux commands

A

bin directory.

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

What is umask used for

A

To set default permissions for file creation.

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

How do you exit vi and save changes

A

ZZ or :wq.

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

What command is used to search for files based on name, permissions, date, etc.

A

find.

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

How do you search for a word within a file using grep

A

grep <word> <file_name></file_name></word>

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

What parameter of grep is used for a case-insensitive search

A

-i.

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

What parameter of grep is used for a reverse search

A

-v.

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

What parameter of grep is used for a recursive search

A

-r.

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

What does the metacharacter * represent in the filesystem

A

Any number of characters.

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

What does the metacharacter ? represent in the filesystem

A

Any single character.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
What is the purpose of the /etc directory in Linux
It contains administrative configuration files.
26
What tools does Linux offer to show processes
ps and top.
27
What information is associated with each process in Linux
PID, user, and group.
28
How can you run processes together in the background in Linux
By adding & at the end of a command or pressing Ctrl+Z after the process is run.
29
What command is used to control processes running in the background
jobs.
30
How can you bring a background process to the foreground in Linux
Using fg %.
31
What signals can be sent to processes using the kill command
SIGINT, SIGQUIT, SIGABRT, SIGKILL, SIGTERM, SIGCONT, SIGSTOP.
32
What is the "nice" value in Linux
A value between -20 and 19 assigned to processes to determine their CPU priority.
33
What tool allows limiting the resources a process and its child processes are using
cgroups.
34
How can you execute a shell script in Linux
By typing bash with the name of the file or setting the x bit with chmod and executing it.
35
How can you assign the output of a command to a variable in a shell script
By assigning $(command) to the variable.
36
What does $# tell in a shell script
How many arguments have been used.
37
How can you take input during the execution of a shell script
Using the command read -p.
38
What does the "if" statement in a bash script require
A condition followed by then and the code to be executed.
39
What command is used to search for files based on various criteria in Linux
find.
40
What command is used to search within the content of files in Linux
grep.
41
What directory contains logs in Linux
/var/log.
42
What is the purpose of the /etc directory in Linux
It contains configuration files.
43
How can you list PCI buses and the devices connected to them in Linux
lspci.
44
How can you load a module in the Linux kernel
Using the modprobe command.
45
What is used to automate the process of Linux installation
Anaconda.
46
What is GRUB in Linux
The default bootloader.
47
What command is used to manage software packages in Linux
yum (or dnf).
48
What is the purpose of the RPM package manager
To aggregate binary files, documentation, configuration files, and other components for easier installation.
49
How can you update package metadata in Ubuntu
Using the apt-get update command.
50
What tool allows managing software packages through a graphical interface in Linux
Software Center.
51
What GUI app can be used for user management in Linux
Cockpit.
52
How can you create a user account using the command line in Linux
By using the useradd command.
53
What files are involved in creating a user account in Linux
/etc/login.defs, /etc/default/useradd, /etc/passwd, /etc/shadow, /etc/group.
54
Where are groups listed in Linux, and what information do they contain
Groups are listed in the file /etc/group and contain group name, group password (stored in /etc/shadow), group ID, and a list of users in the group.
55
How can you change a user's primary group in Linux
Using the newgrp command.
56
What is ACL in Linux, and how can you set permissions with it
ACL (Access Control List) allows you to set permissions on files by user or group beyond the traditional owner/group/other permissions. You can set ACL permissions using the setfacl command.
57
How can you assign permissions to groups instead of users on a file in Linux
By setting the GID (Group ID) on the file and assigning appropriate permissions.
58
What is the purpose of the sticky bit in Linux file permissions
It prevents users from deleting files in directories that they do not own.
59
What authentication methods can Linux use for user authentication
LDAP and Active Directory (AD).
60
What is LVM in Linux, and what is its purpose
LVM (Logical Volume Manager) systemthat manages storage and disks drives, provide abstractions between the hardware and the SO
61
How can you mount storage into the filesystem in Linux
Using the mount command.
62
What are the run levels in Linux, and how many are there
There are 7 run levels in Linux: 0 (Halt), 1 (Single User Mode), 2 (Multi-User Mode), 3 (Extended Multi-User Mode), 4 (User Defined), 5 (Graphical Mode), 6 (Reboot).
63
What is the purpose of systemd in Linux
It is the initialization daemon and service manager.
64
What are the two types of units managed by systemd
Target units and service units.
65
How can you check the status of a service in systemd
Using the systemctl status command.
66
How can you start, stop, restart, reload, enable, and disable services in systemd
Using systemctl start/stop/restart/reload/enable/disable .
67
What is the default directory for Apache's web content in Linux
/var/www/html.
68
What is SELinux, and what is its role in securing a web server
SELinux is a security module used in Linux to enforce security policies. It can be used to restrict access to files and features, making the system more secure.
69
What is Samba, and what protocol does it use
Samba is a suite of programs that allows Linux to share data with Windows systems. It uses the SMB (Server Message Block) protocol.
70
How can you secure a Samba server in Linux
By configuring firewalls, SELinux, and host/user restrictions.
71
What is NFS, and what is its purpose
NFS (Network File System) is a distributed file system protocol that allows a user on a client computer to access files over a network.
72
How can you export directories for NFS sharing in Linux
By configuring the /etc/exports file.
73
What are the default ports used by NFS
TCP-UDP 2049 (nfs), TCP-UDP 111 (rpcbind), TCP-UDP 20048 (show-mount). You can configure the firewall to allow these ports.
74
What command is used to mount NFS shares on a client in Linux
The mount command.
75
What command is used to export directories listed in the exports file in Linux
exportfs -arv.
76
What is UEFI
UEFI stands for Unified Extensible Firmware Interface. It has replaced BIOS in recent machines and is designed to allow secure boot.
77
What is the role of the bootloader in Linux boot process
The bootloader, such as GRUB, loads the operating system kernel into memory during the boot process.
78
How can you troubleshoot hardware problems or boot issues in Linux
Accessing the BIOS setup screen is a common method to troubleshoot hardware problems or boot issues.
79
How do you check the RPM database for issues, and how can you recreate it if necessary
You can use the rpm check command to check the RPM database for issues. To recreate the RPM database, delete files beginning with _db under /var/lib/rpm and run rpm --initdb.
80
What file can be checked if DNS isn't working in Linux
If DNS isn't working, you can check the /etc/resolv.conf file.
81
What command is used to check the firewall configuration in Linux
The iptables -vnL
82
What is the purpose of rescue mode in Linux, and how can you access it
Rescue mode bypasses the Linux installation on the system and boots from a rescue medium (such as DVD or USB). You can access it by selecting "rescue mode" from the BIOS settings.
83
What is SELinux
SELinux is a security module used in Linux distributions like Fedora and RedHat Enterprise Linux, providing Mandatory Access Control (MAC) security policies.
84
What command can be used to generate asymmetric keys using gpg2 in Linux
The gpg2 --gen-key command is used to generate asymmetric keys.
85
What is PAM
PAM (Pluggable Authentication Modules) is used to facilitate authentication management in Linux, allowing for centralized authentication.
86
What is the purpose of iptables in Linux
iptables is a kernel-level firewall used to manage network traffic in Linux by adding, deleting, or modifying rules.
87
What is firewalld, and how does it differ from iptables
firewalld is a dynamic and customizable software firewall used in some Linux distributions, whereas iptables is a static firewall solution directly managing packet filtering rules.
88
What is the main purpose of firmware in computers
The firmware, such as UEFI or BIOS, initializes hardware components during the boot process.
89
How can you recreate the RPM database if it becomes corrupted in Linux
If the RPM database becomes corrupted, you can delete files starting with _db under /var/lib/rpm and initialize the database using rpm --initdb.
90
What role does the systemd daemon play in the Linux boot process
The systemd daemon starts all the services during the Linux boot process and manages system resources.
91
What is the purpose of the /etc/resolv.conf file in Linux
The /etc/resolv.conf file is used to configure DNS name servers and search domains in Linux.
92
How can you view information about services started by systemd in Linux
You can use the systemctl command to view information about services started by systemd.
93
What is the main difference between SELinux and traditional Linux permissions
SELinux provides Mandatory Access Control (MAC) security policies, whereas traditional Linux permissions use Discretionary Access Control (DAC).
94
How do you check the integrity of RPM packages in Linux
You can use the rpm -V command to check the integrity of RPM packages in Linux.
95
What is the purpose of PAM modules in Linux authentication
PAM modules provide standard functions for authentication management in Linux, such as authentication, account management, and password management.
96
What is the main purpose of iptables chains in Linux
iptables chains categorize packets based on their source, destination, and purpose, allowing for targeted firewall rules.
97
How does firewalld differ from iptables in Linux
firewalld is a dynamic and customizable firewall solution with support for zones, services, and interfaces, while iptables is a static firewall solution directly managing packet filtering rules.
98
How can you troubleshoot networking issues in Linux
Tools like netstat, ping, traceroute, and tcpdump can be used to troubleshoot networking issues in Linux.
99
What is the main function of the BIOS in a computer
The BIOS (Basic Input/Output System) initializes hardware components and performs the initial stages of the boot process in a computer.
100
How does SELinux enhance Linux security
SELinux provides Mandatory Access Control (MAC) security policies, restricting access to system resources and enhancing overall security in Linux systems.
101
What is the main difference between a VM and a container
A container doesn't have its own kernel, unlike a VM.
102
How are container images stored on the internet, and what are they referred to as
Container images are stored in registries, which can be public or private.
103
How do containers differ from the host system in terms of namespaces
Containers use their own set of namespaces, including process table, network interfaces, mount table, and user IDs.
104
What is the purpose of the Dockerfile in Docker container management
The Dockerfile is a file that Docker reads when building a container, specifying instructions like the starting image and copying files into the container.
105
What command is used to start the Docker daemon
`systemctl start docker` is used to start the Docker daemon.
106
How can you check if a container is running in Docker
You can use the `docker ps -a` command to list all containers, including those that are currently running.
107
What is OpenStack commonly used for in the context of cloud computing
OpenStack is often used as a private cloud solution for its flexibility and power, allow the deployment and management of IaaS solutions.
108
What is QEMU in the context of cloud computing
QEMU is a process emulator that tricks virtual machines into thinking they're running on physical hardware.
109
What are the two categories of information associated with deploying instances in the cloud
The two categories are meta-data and user-data.
110
Which AWS service allows you to create and manage virtual machines and containers
Amazon EC2 (Elastic Compute Cloud) is the AWS service for creating and managing virtual machines and containers.
111
What is Ansible used for in infrastructure management
Ansible is used for orchestrating and automating tasks in traditional infrastructure management.
112
How are tasks described in Ansible, and what are they composed of
Tasks are described in playbooks and are composed of modules.
113
What is the purpose of an Ansible inventory file
An Ansible inventory file associates devices into groups and hosts, allowing you to define variables and attributes for each.
114
What are roles used for in Ansible playbooks
Roles are used to create reusable pieces of playbooks that can be imported into other playbooks.
115
How can you run ad hoc commands with Ansible
You can run ad hoc commands with Ansible using the `ansible` command and specifying hosts, users, and tasks.
116
What is Kubernetes primarily used for
Kubernetes is primarily used for orchestrating and managing containerized applications.
117
What components make up a Kubernetes cluster
A Kubernetes cluster consists of master nodes and worker nodes.
118
What is the smallest unit that can run a container in Kubernetes
The smallest unit is a pod.
119
How does Kubernetes handle redundancy between hosts
Kubernetes manages redundancy by moving containers from overloaded or failed hosts to healthy ones.
120
What is the purpose of the kubelet service in a Kubernetes worker node
The kubelet service registers the worker node to the master and executes requests received via the API.
121
What API object is used to describe the needs of a container in Kubernetes
A Pod object is used to describe the needs of a container, including specifications for resources and characteristics.
122
What is the process of deploying an application in Kubernetes referred to as
Deploying an application in Kubernetes involves starting containers in the form of pods.
123
What components are involved in the deployment process in Kubernetes
The deployment process involves accepting requests from the master, running the scheduler to assign pods to nodes, and monitoring the pods.
124
What command is used to build a Docker image using a Dockerfile
The `docker build -t ` command is used to build a Docker image.
125
How can you push a Docker image to a repository for public access
You can push a Docker image to a repository using the `docker push` command, specifying the repository URL.
126
What does the grep command do
It searches for text in files or command output.
127
What does the awk command allow you to do
It processes and manipulates text data using the syntax awk 'pattern { action }' filename.
128
What does SSH stand for
Secure Shell, an encrypted protocol for secure communication.
129
What does the tar command do and what is its syntax
It creates, views, or extracts file archives with the syntax tar options archive.tar files.
130
How do you create a symbolic link and what is it used for
Created with ln -s source_file target_link, it provides a symbolic path to a file or directory.
131
What does the /etc/passwd file contain
It contains information about user accounts.
132
What does the chmod command do and how is it used
It sets access permissions on files using octal numbers or symbols.
133
What does the systemctl command do
It's a tool that control systemd that is the system manager for managing services
134
What does the /etc/fstab file contain
Information about automatically mounted partitions and devices.
135
How do you configure a static IP address
By modifying the network configuration file or using ip addr add.