lpic_practice Flashcards Preview

Linux+_acad > lpic_practice > Flashcards

Flashcards in lpic_practice Deck (64):
1

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

True

2

How would you extract information about the boot process?

Use the 'dmesg' command

3

The term 'UID' is short for 'User Identification'.

True

4

Run level 6 can be used to:

Reboot the system

5

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?

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

6

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?

systemctl isolate graphical.target

7

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

0644

8

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

Use the dpkg-reconfigure command.

9

chmod 755 file.txt will

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

10

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

fgrep or grep -F

11

telinit is used specifically for changing runlevels.

True

12

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

True

13

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

rpm --checksig

14

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

dmesg

15

What happens when you set the setuid on a directory?

It is ignored

16

uniq -d will

Print only duplicate lines in a file.

17

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

True

18

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

read

19

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?

pkill httpd

20

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.

True

21

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?

swapon /dev/xvdf

22

ln -s will:

Create a symbolic link.

23

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?

systemctl enable mysqld

24

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.

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

25

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

Specify the file system type.

26

In a 'sysvinit' based distribution, the 'init' process is:

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

27

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?

systemctl set-default graphical.target

28

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

True

29

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

True

30

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

/usr/lib/systemd/system

31

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

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

32

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

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

33

Select the best answer: echo "test" >> test.txt && echo "mysheet" >> test.txt

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

34

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

du -c /home

35

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

True

36

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

systemctl isolate graphical.target

37

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

List all files in the RPM file.

38

0x82 Typcode represents the:

linux swap space

39

dpkg -i file.deb

Will install file.deb package.

40

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

parted, gdisk

41

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

True

42

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

True

43

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

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

44

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

env

45

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

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

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

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

47

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

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

48

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?

/boot/grub/menu.lst

49

The nice priority ranges from:

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

50

/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?

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

51

The modprobe command is

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

52

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

pkill, pgrep

53

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

Prevents accidental overwrites of existing files.

54

The command shutdown -k

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

55

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

find . -mtime +3

56

Which permission bit is used for read?

4

57

Which file system stores files that are changed frequently?

/var

58

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

/proc

59

Hard links cannot exist across file systems.

True

60

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

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

61

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

chmod 700 file.txt

62

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

usrquota

63

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?

systemctl set-default graphical.target

64

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?

nohup