Ramdom Flashcards

(194 cards)

1
Q

What type of file system is created by mkfs when it is executed with the block device name only and withouth any additional params

A

ext2

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

What of the following statements are true regarding /dev/ when using udev?

A

Additional rules for udev can be created by adding them to /etc/udev/rules.d/

The /dev/ directory is stored in /etc/udev/dev and is restored during system startup.

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

The system is having trouble and the engineer wants to bypass the usual /sbin/init start up and run /bin/sh. What is the usual way to pass this change to the kernel from your boot loader

A

Pass init=/bin/sh on the kernel param line.

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

Which umask value ensures that new directories can be read, written and listed by their owning user, read and listed by their owning group and are not accessible at all for everyone else?

A

0027

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

What command changes the number of days before the ext3 filesystem on /dev/sda1 has to run through a full filesystem check while booting?

A

tune2fs -i 200 /dev/sda1

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

Command converts spaces in a file to tab characters and prints the result to standard output

A

unexpand

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

which utility would be used to change how oftten a filesystem check is performed on an ext2 filesystem without losing any data stored on that filesystem

A

tune2fs

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

what is the default percentage of reserved space for the root user on a new ext4 filesystem

A

5%

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

What happens when a file system that is not listed in /etc/fstab nor known to the system is manually mounted

A

the command systemctl mountsync can be used to create a mount unit based on the existing mount

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

What is true about mount points

A

Every existing directory can be used as a mount point.

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

Kernel parameter that instructs the kernel to suppress most boot messages

A

quiet

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

FILL BLANK -
Which program updates the database that is used by the locate command? (Specify ONLY the command without any path or parameters).

A

updatedb

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

What does the command mount –bind do?

A

It makes the contents of one directory available in another directory

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

Consider following output

525385 -rw-rw-r– 2 1000 1000 0 Feb 12 19:44 a.txt
526255 lrwxrwxrwx 1 1000 1000 5 Feb 12 19:44 b.txt -> a.txt

How would a new file named c.txt be created with the same inode number as a.txt (Inode 525385)?

A

ln a.txt c.txt

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

what commands will display all currently mounted filesystems

A

cat /proc/self/mounts

mount

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

Command can perform full text search on all available packages on debian system

A

apt-cache

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

updates linker cache of shared libraries

A

ldconfig

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

Consider the following directory:
drwxrwxr-x 2 root sales 4096 Jan 1 15:21 sales
Which command ensures new files created within the directory sales are owned by the group sales? (Choose two.)

A

chgrp -p sales sales

chmod 2775 sales

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

FILL BLANK -
Which command displays the current disk space usage for all mounted file systems? (Specify ONLY the command without any path or parameters.)

A

df

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

Which chown command changes the ownership to dave and the group to staff on a file named data.txt?

A

chown dave:staff data.txt

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

When considering the use of hard links, what are valid reasons not to use hard links?

A

Hard links are specific to one filesystem and cannot point to files on another filesystem

hard links are not availabel on all Linux systems because traditional filesystems, such as ext4, do not suport them

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

In compliance with the FHS in what directory are man pages found?

A

/usr/share/man

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

FILL BLANK -
Which file in the /proc filesystem lists parameters passed from the bootloader to the kernel? (Specify the file name only without any path.)

A

cmdline

/proc/cmdline

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

What is the process ID number of the init process on a SysV init based system?

A

1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Which daemon handles power management events on a Linux system?
acpid
26
what information is stored in the BIOS
Boot device order Hardware configuration
27
Which of the following statements are true about the boot sequence of a PC using a BIOS? (Choose two.)
Some parts of the boot process can be configured from the BIOS The BIOS initiates the boot process after turning the computer on
28
During a system boot cycle, what program is executed after the BIOS completes its tasks?
The bootloader
29
What is true regarding UEFI firmware?
It can use and read certain file systems It is stored in a special area within the GPT metadata
30
A faulty kernel module is causing issues with a network interface card. Which of the following actions ensures that this module is not loaded automatically when the system boots?
Adding a blacklist line including the name of the offending module to the file /etc/modprobe.d/blacklist.conf
31
When is the content of the kernel ring buffer reset?
When the ring buffer is explicitly reset using the command dmesg --clear When the system is shut down or rebooted
32
which command displays the contents of the Kernel Ring Buffer on the command line? provide only the command name without any options or path information.
dmesg /bin/dmesg
33
What commands reboot the system with using SysV init
shutdown -r now telinit 6
34
What is the first program the Linux kernel starts at boot time when using System V init?
/sbin/init
35
A Debian package creates several files during its installation. What command searches for packages owning the file /etc/debian_version?
dpkg -S /etc/debian_version
36
how is symbolic link called bar.conf pointing to foo.conf created
ln -s foo.conf bar.conf
37
What is contained on the EFI System Partition?
The first stage boot loader
38
directories on a 64 bit Linux system typically contain shared libraries?
~/.lib64/ /lib64/
39
What is the name of the main config file for GUN GRUB
menu.lst grub.cfg grub.conf
40
files exist in a standard GRUB 2 installation?
/boot/grub/i386-pc/lvm.mod /boot/grub/grub.cfg
41
commands installs all packages with a name ending with the string foo?
zypper install "*foo"
42
updates already installed RPM package rpmname
rpm -U rpmname
43
You want to preview where the package file, apache-xml.i386.rpm, will install its files before installing it what commnd do you issue
rpm -qpl apache-xml.i386.rpm
44
properties of a Linux system should be changed when a virtual machine is cloned?
The permissions of /root/ The SSH host keys
45
what does the command grub-install /dev/sda do
installs all required files and configures the boot loader on device/dev/sda
46
partition types is used for Linux swap spaces when partitioning hard disk drives?
82
47
What is true regarding the configuration of yum?
The configuration of package repositories can be divided into multiple files in case /etc/yum.repos.d/ contains files, /etc/yum.comf is ignored Repository configurations can include variables such as $basearch or $releasever
48
Which Debian package management tool asks the configuration questions for a specific already installed package just as if the package were being installed the first time
dpkg-reconfigure
49
After moving data to a new filesystem, how can the former pat of the data be kept intact in order to avoid reconfig of existing apps
by creating symbolic link from old to the new path of data by mounting the new filesystem on the original path of the data.
50
Command used to update the list of available packages when using dpkg based package management
apt-get update
51
apt-get subcommands installs the newest versions of all currently installed packages?
dist-upgrade
52
apt-get command will install the newest versions of all currently installed packages without removing any packages or installing new packages that are already installed.
upgrade
53
uninstalls a package but keeps its configuration files in case the package is re-installed?
dpkg -r pkgname
54
In which directory must definition files be placed to add additional repositories to yum
/etc/yum.repos.d
55
lists the dependencies of the RPM package file foo.rpm?
rpm -qpR foo.rpm
56
What is the maximum niceness value that a regular user can assign to a process with the nice command when executing a new process?
19
57
list all files and directories within the /tmp/ directory and its subdirectories which are owned by the user root?
find /tmp -user root -print find -path /tmp -user root - print
58
valid stream redirection operators within Bash?
< <<< >
59
vi commands deletes two lines, the current and the following line?
2dd
60
The command dbmaint & was used to run dbmaint in the background. However, dbmaint is terminated after logging out of the system. Which alternative dbmaint invocation lets dbmaint continue to run even when the user running the program logs out?unning the program logs out?
bg dbmaint
61
From a Bash shell, which of the following commands directly execute the instructions from the file /usr/local/bin/runme.sh without starting a subshell?
source /usr/local/bin/runme.sh . /usr/local/bin/runme.sh
62
FILL BLANK - Which program runs a command in specific intervals and refreshes the display of the program's output? (Specify ONLY the command without any path or parameters.)
watch
63
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?
p (lowercase)
64
Which of the following commands changes all CR-LF line breaks in the text file userlist.txt to Linux standard LF line breaks and stores the result in newlist.txt?
tr -d '\r' < userlist.txt > newlist.txt
65
txt1.txt atxt.txt txtB.txt What expression turns this input stream into the following output stream? txt1.bak.txt atxt.bak.txt txtB.bak.txt
s/txt/bak.txt/
66
What is correct about /proc/
All changes to files in /proc/ are immediately recognized by the kernel.
67
command must be entered before exiting vi to save the current file as filea.txt?
:w filea.txt
68
following signals is sent to a process when the key combination Ctrl+C is pressed on the keyboard?
SIGINT
69
command displays the output of the foo command on the screen and also writes it to a file called /tmp/foodata?
foo | tee /tmp/foodata
70
What output will be displayed when the user fred executes the following command? echo ˜fred $USER
fred fred
71
Which of the following commands displays the path to the executable file that would be executed when the command foo is invoked?
lsattr foo
72
When redirecting the output of find to the xargs command, what option to find is useful if the filenames contain spaces?
-print0
73
changes quota for specific user
edquota
74
Which top leve system directory is used for files and data that change regularly while the system is running and are to be kept between reboots
/var
75
commands can be used to determine how long the system has been running
uptime top
76
What is true regarding the command ls > files if files does not exist?
files is created and contains the output of ls
77
Which of the following files, located in a user home directory, contains the Bash history?
.bash_history
78
Bash env var defines in which file the user history is stored when exiting a Bash process
HISTFILE
79
wildcards will match the following filenames? ttyS0 ttyS1 ttyS2
tty?[0-5] tty[A-Z][012]
80
displays the contents of a gzip compressed tar archive?
tar ztf archive.tgz
81
following command prints a list of usernames (first column) and their primary group (fourth column) from the /etc/passwd file?
cut -d : -f 1,4 /etc/passwd
82
regular expressions represents a single upper-case letter?
[A-Z]
83
Which command is used to start another command with a given nice level?
nice
84
Given a log file loga.log with timestamps of the format DD/MM/YYYY:hh:mm:ss, which command filters out all log entries in the time period between 8:00 am and 8:59 am?
grep -E ':08[0-9]+:[0-9]+'loga.log
85
Instead of supplying an explicit device in /etc/fstab for mounting, what other options may be used to identify the intended partition?
LABEL UUID
86
A yum repository can declare sets of related packages. Which yum command installs all packages belonging to the group admintools?
yum groupinstall admintools
87
FILL BLANK - What directory contains configuration files for additional yum repositories? (Specify the full path to the directory.)
/etc/yum.conf
88
Which of the following commands installs the GRUB boot files into the currently active file systems and the boot loader into the first partition of the first disk?
grub-install /dev/sda
89
What option to the yum command will update the entire system
yum update yum upgrade
90
files are found in the /boot/ file system?
Linux kernel images systemd target and service units
91
Which file defines the network locations from where the Debian package manager downloads software packages?
/etc/apt/sources.list
92
When removing a package on a system using dpkg package management, which dpkg option ensures configuration files are removed as well?
--purge
93
Which of the following statements are correct when comparing Linux containers with traditional virtual machines (e.g. LXC vs. KVM)? (Choose three.)
Containers are a lightweight virtualization method where the kernel controls process isolation and resource management. Fully virtualized machines can run any operating system for a specific hardware architecture within the virtual machine. The guest environment for fully virtualized machines is created by a hypervisor which provides virtual and emulated hardware devices.
94
The installation of a local Debian package failed due to unsatisfied dependencies. Which of the following commands installs missing dependencies and completes the interrupted package installation?
apt-get install -f
95
Which of the following commands lists all currently installed packages when using RPM package management?
rpm --query --all
96
An admin has issued following cmd grub-install --root-directory=/custom-grub /dev/sda In which directory will new config files be found
/custom-grub/boot/grub/
97
commands are valid in the GRUB 2 configuration file?
menuentry insmod
98
World-writeable directory should be placed on a separate partition in order to prevent users from being able to fill up the / filesystem
/var/tmp tmp
99
purpose of the ldd command?
It lists which shared libraries a binary needs to run.eeds to run.
100
What can the Logical Volume Manager (LVM) be used for?
create snapshots dynamically change the size of logical volumes dynamically create or delete logical volumes
101
main differences between GPT and MBR partition tables regarding maximum number and size of partitions?
GPT - By Default 128 Partitions Partition sizes of 9.4 ZB (1 billion terrabytes) MBR - by default 4 Partitions partition size of 2.2 TB
102
A backup software heavily uses hard links between files which have not been changed in between two backup runs. Which benefits are realized due to these hard links? (Choose two.)
The old backups can be moved to slow backup media, such as tapes, while still serving as hard link target in new backups. The backup consumes less space because the hard links point to the same data on disk instead of storing redundant copies.
103
FILL BLANK - Which file from the /proc/ file system contains a list of all currently mounted devices? (Specify the full name of the file, including path.)
/proc/mounts
104
How many fields are in a syntactically correct line of /etc/fstab?
6
105
Running chmod 640 filea.txt as a regular user doesnt update filea.txts permission. What might be a reason why chmod cannot modify the permissions?
filea.txt is owned by another user and a regular user cannot change the permissions of another user's file. filea.txt is a symbolic link whose permissions are a fixed value which cannot be charged.
106
After modifying GNU GRUB's config files what command must be run for changes to take effect?
No actions required.
107
What is the difference between the --remove and the --purge action with the dpkg command
--remove - removes the program --purge - removes the config files
108
Which of the following Linux filesystems preallocate a fixed number of inodes when creating a new filesystem instead of generating them as needed? (Choose two.)
ext3 ext2
109
Which of the following commands sets the SetUID permission on the executable /bin/foo?
chmod 4755 /bin/foo
110
commands to set the sticky bit for directory /tmp
chmod +t /tmp chmod 1775 /tmp
111
Command makes /bin/foo executable by everyone but writable only by its owner
chmod u=rwx,go=rx /bin/foo
112
Which of the following commands can be used to display the inode number of a given file? (Choose two.)
ls stat
113
settings for umask ensures that new files have the default permissions -rw-r-----?
0027
114
permissions -rwSr-xr-x mean for a binary file when it is executed as a command
The execute flag is not set for the owner. Therefore the SetUID flag is ignored.
115
Which command will display messages from the kernel that were output during the normal boot sequence?
dmesg /bin/dmesg
116
After a power outage, the XFS file system of /dev/sda3 is inconsistent. How can the existing file system errors be fixed?
By running xfs_repair on the file system
117
What command overwrites the bootloader located on /dev/sda without overwriting the partition table or any data following it
dd if=/dev/zero of=/dev/sda bs=440 count=1
118
command can be used to create a new file that is 100kB in size
dd
119
used to locate programs and their corresponding man pages and config files
wheris
120
device file name for second partition on the only SCSI drive
/dev/sda2
121
Which of the following properties of an existing file changes when a hard link pointing to that file is created?
link count
122
FILL BLANK - Following the Filesystem Hierarchy Standard (FHS), where should binaries that have been compiled by the system administrator be placed in order to be made available to all users on the system? (Specify the full path to the directory.)
/usr/local/bin/
123
Which of the following commands show how the shell handles a specific command?
type
124
When in Normal mode in vi, which character can be used to begin a reverse search of the text?
?
125
Regular expression that can be used for the beginning of a line
^
126
commands displays the manual page command from section 1?
man 1 command
127
commands creates or, in case it already exists, overwrites a file called data with the output of ls?
ls > data
128
commands is used to change options and positional parameters within a running Bash shell?
set
129
commands display the IDs of all processes owned by root?
pgrep -u root pgrep -U 0
130
Which of the following sequences in the vi editor saves the opened document and exits the editor?
Esc :wq Esc ZZ
131
effect of the -v option for the egrep command?
It only outputs non-matching lines
132
show the complete path of an executable file that the current shell would execute when starting a command without specifying its complete path?
which type
133
signals is sent to a process when the key combination Ctrl+Z is pressed on the keyboard
SIGSTOP
134
What is the output when the regular expression s/[ABC] [abc]/xx/ is applied to the following string? ABCabc -
xxxxxx
135
print the current working directory when using a Bash shell?
echo ${PWD} pwd
136
cmd used to download RPM package kernel without installing it
yumdownloader kernel
137
outputs test to the shell?
cat <
138
What is the default nice level when a process is started using the nice command?
10
139
A user accidentally created the subdirectory \dir in his home directory. Which of the following commands will remove that directory?
rmdir ~/\\dir
140
can perform searches on file contents using regular expressions?
grep
141
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
-maxdepth
142
determine a files format by using a definition dbase file that contains info about all common file types
file
143
generates a list of user names from /etc/passwd along with their login shell?
cut -d: -f1,7 /etc/passwd
144
If the gzip compressed tar archive texts.tgz contains the files a.txt and b.txt, which files will be present in the current directory after running gunzip texts.tgz?
Only texts.tar and texts.tgz
145
In the vi editor, how can commands such as moving the cursor or copying lines into the buffer be issued multiple times or applied to multiple rows?
By specifying the number right in front of a command such as 41 or 2yj.
146
Which of the following statements is correct for a command ending with an & character?
The command is run in background of the current shell.
147
reads a file and creates separate chunks of a given size from the file contents?
split
148
What is the purpose of the xargs command?
It reads standard input (STDIN) and builds up command lines to execute.
149
Which command displays a list of all background tasks running in the current shell?
jobs
150
Which command is used to change the priority of an already running process?
renice
151
standard output to standard error.
ls >&2
152
Init systems used with Linux
systemd Upstart SysV init
153
When booting from the hard disk, a computer successfully loads the Linux kernel and initramfs but hangs during the subsequent startup tasks. The system is booted using a Linux based rescue CD to investigate the problem. Which of the following methods helps to identify the root cause of the problem?
Investigating the file /var/log on the computers hard disk for possible errors.
154
Where is the bootloader stored on the hard disk of a UEFI system?
On the EFI System Partition (ESP).
155
What is true regarding UEFI firmware
It can use and read certain file systems It is stored in a special area within the GPT metatada
156
examples for Bash file globbing matches a file named root-can-do-this.txt when used in the directory holding that file
root*can?do-this.{txt,odt} r[oOoO]t-can-do*.txt {root,user,admin}-can-??-this.txt
157
What statements are correct about the initial RAM disk involved in the boot process of Linux?
An initramfs is a compressed file system archive, which can be unpacked to examine its contents. After a successful boot, the initramfs contents are available in /run/initramfs/.
158
commands loads a kernel module along with any required dependency modules?
modprobe
159
kernel command line changes the systemd boot target to resue.target instead of default target.
systemd.unit=rescue.target
160
The USB defice filesystem can be found under /proc/____/usb/
bus
161
You suspect that a new eithernet card by be conflicting with another device. Which file should you check within the /proc tree to learn which IRQs are being used by which kernel drivers
interrupts /proc/interrupts
162
What information can the lspci command display about the system hardware?
Device IRQ settings PCI bus speed Device vendor identification
163
Which System V init configuration file is commonly used to set the default run level?
/etc/inittab
164
Which run levels should never be declared as the default run level when using SysV init?
0 and 6
165
You are having some trouble with a disk partition and you need to do maintenance on this partition but your users home directories are on it and several are logged in. What command would disconnect users and allow you to safely execute maintenance tasks.
init 1 telinit 1
166
command instructs SysVinit to reload its config file
telinit q
167
Given the following two symbolic links in a System V init configuration: /etc/rc1.d/K01apache2 /etc/rc2.d/S02apache2 When are the scripts executed that are referenced by these links?
S02apache2 is run when runlevel 2 is entered. K01apache2 is never run because K indicates a deactivated service.
168
what command will write a message to the terminals of all logged in users.
wall
169
Which SysV init comfig file should be modified to disable the ctrl-alt-del key
/etc/inittab
170
The message "Hard Disk Error" is displayed on the screen during Stage 1 of the GRUB boot process - what does this inidicate.
The next Stage cannot be read from the hard disk because GRUB was unable to determine the size and geometry of the disk.
171
Which command will disable swapping on a device
swapoff sbin/swapoff
172
what does mount -a do
ensures all file systems listed with option auto in /etc/fstab are mounted.
173
option in GRUB Legacy config file to define the amount of time that GRUB menu will be shown to user
timeout
174
Signal sent by the kill command by default
SIGTERM (15)
175
To what env var will you assign or append a value if you need to tell the dynamic linker in a build directory for some of a program's shared libraries
LD_LIBRARY_PATH
176
shell command makes already defined TEST visible to new child processes
export TEST
177
RPM command outputs name of the package that supplied /etc/exports?
/etc/exports
178
Env var overrides or extends the list of directories holding shared libraries.
LD_LIBRARY_PATH
179
What command displays the current disk space usage for all mounted file systems
du
180
When using rpm --verify to check files created during the install of RPM package what is taken into consideration
Timestamps MD5 Checksums File sizes
181
file in users home directory contains Bash history
.bash_histfile
182
commands redirects the output of ls to standard error?
ls >&2
183
command changes all CR-LF line breaks in the text file userlist.txt to Linux standard LF line breaks and stores the result in newlist.txt?
tr -d '\r' < userlist.txt > newlist.txt
184
Which command uninstalls a package but keeps its config files in case the package is re-installed
dpkg -r pkgname
185
apt-get subcommand installs the newest versions of all currently installed packages
update
186
Which of the following are valid stream redirection operators with Bash
< 2>&1
187
When redirecting the output of find to the xargs command, what option to find is useful if the filenames contain spaces
-print0
188
Which of the following commands installs GRUB 2 into the master boot record on the third hard disk
grub-install /dev/sdc
189
in bash inserting 2>&1 after a command redirects
standard output to standard error
190
which type of filesystem is created by mkfs when it is executed with the block device name only and without any additional parameters.
ex2
191
Where does the BIOS search for a bootloader?
On all connected storage media in the defined boot device order.
192
What is the purpose of the Filesystem Hierarchy Standard
It is a distribution neutral description of locations of files and directroies.
193
Which of the following commands converts spaces in a file to tab characters and prints the result to standard output
unexpand
194