lpic_practice Flashcards

1
Q

DMA addresses are used as an alternative to communicating with I/O ports.

A

True

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

How would you extract information about the boot process?

A

Use the ‘dmesg’ command

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

The term ‘UID’ is short for ‘User Identification’.

A

True

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

Run level 6 can be used to:

A

Reboot the system

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

On a systemd-based system, you’ve just installed a MySQL server with no reported errors. However, after reboot, you notice the service is not running. What might be the issue?

A

The service has not been enabled at boot time to start in the default target the system boots into

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

You’re working on a Linux system with systemd as it’s primary init manager. To change into the graphical target, what would you do?

A

systemctl isolate graphical.target

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

What are the default permissions of the /etc/passwd file on a Linux distribution?

A

0644

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

You need to rerun the configuration of a deb package much like the configuration that was run during installation. How would you do this?

A

Use the dpkg-reconfigure command.

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

chmod 755 file.txt will

A

Set the file permissions on file.txt to read/write/execute for the owner and read/execute for the group and everyone else.

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

Which grep variant will interpret the pattern as plain text strings (interpret the pattern literally)?

A

fgrep or grep -F

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

telinit is used specifically for changing runlevels.

A

True

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

fsck is a process that checks and repairs the Linux file system and can only be performed on unmounted file systems.

A

True

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

Which of the following will verify the signature on a package to determine its integrity and origin?

A

rpm –checksig

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

Which command allows you to view the contents of kernel messages in the kernel ring buffer?

A

dmesg

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

What happens when you set the setuid on a directory?

A

It is ignored

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

uniq -d will

A

Print only duplicate lines in a file.

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

/etc/ld.so.conf is used to store shared library paths.

A

True

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

When creating file permissions, the permission designated by the number ‘4’ equates to what permission type?

A

read

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

While attempting to shut down the Apache service with “systemctl stop httpd” you notice that there are httpd processes that are refusing to shut down. How might you send a SIGTERM signal to try and gently stop the processes to all httpd processes?

A

pkill httpd

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

The command ‘wall “shutdown occurring in 5 minutes” ‘, when issued at the command line, will send all users on the system a global standard output message on their running terminal.

A

True

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

You’ve created a Linux swap partition on /dev/xvdf using the mkswap command. Which command do you need to issue next to turn on swap?

A

swapon /dev/xvdf

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

ln -s will:

A

Create a symbolic link.

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

Which command would you execute to cause the mysqld service to start anytime the system is booted into the multi-user.target, assuming the unit configuration file already specifies a WantedBy=multi-user.target option?

A

systemctl enable mysqld

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

You need to create a file full of zeros that is 1 GB in size. Which command will perform this action? Choose the “best” possible answer.

A

dd if=/dev/zero of=filename bs=1M count=1024

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

The -t flag when passed to mkfs requires you to:

A

Specify the file system type.

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

In a ‘sysvinit’ based distribution, the ‘init’ process is:

A

Responsible for launching all other system startup processes and is the first process launched once the boot loader hands off to the system.

27
Q

You’re running an environment that has a GUI-based interface installed on the system. Currently, the default target is the multi-user target. Which task would you execute to change the default target the system changes into at boot time?

A

systemctl set-default graphical.target

28
Q

GPT-based partition tables can hold up to at least 128 primary partitions while MBR based partition tables can only hold four primary partitions.

A

True

29
Q

Brackets [] when used as part of grep are known as a character class.

A

True

30
Q

What directory contains all the system’s primary unit configuration files?

A

/usr/lib/systemd/system

31
Q

Your GRUB2 install has become corrupt; what might you do in order to resolve the issue? (Choose Two)

A

Recreate the grub.cfg configuration file grub-mkconfig > /boot/grub/grub.cfg, Reinstall the GRUB bootloader grub-install /device

32
Q

cat /etc/passwd | grep [a-z]ot will send what to standard output?

A

All lower case alphabetical three character sequences that end with the character sequence ‘ot’.

33
Q

Select the best answer: echo “test”&raquo_space; test.txt && echo “mysheet”&raquo_space; test.txt

A

The second echo command will only execute if the first echo command is successful

34
Q

f you need to see the total space used in the /home directory how would you do so?

A

du -c /home

35
Q

If a symbolic link source is removed the symbolic link becomes broken.

A

True

36
Q

How would you move a systemd based system into the graphical.target from the command line?

A

systemctl isolate graphical.target

37
Q

The following command will have what result? rpm -qpl nano.rpm

A

List all files in the RPM file.

38
Q

0x82 Typcode represents the:

A

linux swap space

39
Q

dpkg -i file.deb

A

Will install file.deb package.

40
Q

Which utility (or utilities) can be used for creating and manage GPT partition tables? (Choose Two)

A

parted, gdisk

41
Q

The export command can be used to set a variable and make it available to other shells in the environment.

A

True

42
Q

dpkg is a package manager used for installing .deb packages on Debian/Ubuntu systems.

A

True

43
Q

You need to create a symbolic link with a target of /etc/passwd on /home/user/passwd. How would you do this?

A

ln -s /etc/passwd /home/user/passwd

44
Q

Which command will display just the currently set environment variables for your bash session?

A

env

45
Q

The sticky bit, if enabled as a permission, has what effect?

A

Only the directory’s owner or file’s owner can rename or delete files (chmod +t filename or chmod 1000) instead of anybody with write permissions

46
Q

The command cat /etc/passwd | grep ^root will:

A

Display all the lines in the file that start with the pattern root.

47
Q

After updating the timeout option in /etc/default/grub how do you apply the changes to the GRUB configuration file?

A

grub-mkconfig > /boot/grub/grub.cfg

48
Q

You’ve been tasked to manage an older Linux system running GRUB/GRUB-legacy. You’re attempting to make kernel changes to allow the system to boot into an alternate kernel version. Which configuration file needs to be edited?

A

/boot/grub/menu.lst

49
Q

The nice priority ranges from:

A

-20 (highest priority/most favorable) to 19 (lowest priority)

50
Q

/etc/passwd has the following syntax: linuxacademy:x:501:10::/home/linuxacademy:/bin/bash What will cut -f1 -d: /etc/passwd send to standard output?

A

It will display all the usernames and only the users names from /etc/passwd

51
Q

The modprobe command is

A

Automatically loads any depended upon modules and is generally the preferred way of loading kernel modules

52
Q

Which command(s) are used to search and kill processes based on patterns or regular expressions instead of process ID?

A

pkill, pgrep

53
Q

set -o noclobber enables noclobber on your shell. What function does this perform?

A

Prevents accidental overwrites of existing files.

54
Q

The command shutdown -k

A

Only sends a warning message but does not shut down the system.

55
Q

Which command will find files modified at least 3 days ago in your current working directory?

A

find . -mtime +3

56
Q

Which permission bit is used for read?

A

4

57
Q

Which file system stores files that are changed frequently?

A

/var

58
Q

Which file system contains information about interrupts, IRQ’s, ioports, and dma addresses?

A

/proc

59
Q

Hard links cannot exist across file systems.

A

True

60
Q

While in vi command mode you type 3yy what is the result?

A

Will yank 3 lines starting with the line your cursor is on.

61
Q

How would you set read/write/execute for the owner and no permissions for group/world?

A

chmod 700 file.txt

62
Q

Which of the following options must be added to a disk mount in /etc/fstab in order to enable user disk quotas?

A

usrquota

63
Q

You’ve modified your system and want to boot into the graphical target every time your system boots and completes the boot process. To make this persistent on your system so it boots into the graphical target each time the system starts, what would you do?

A

systemctl set-default graphical.target

64
Q

If you want a command or process to continue running after exiting the system, which of these would you add to the front of the command?

A

nohup